Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-19 Thread Sébastien Gendre
Yes, it make sense. But if I understand correctly how export options are collected: The 3 new options need to have nil as default values to be able to know if they are set with their keyword. Is it right ? Ihor Radchenko writes: > Sébastien Gendre writes: > >> How do prefer the old option `:

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-18 Thread Ihor Radchenko
Sébastien Gendre writes: > How do prefer the old option `:html-divs' be managed in regard to the 3 > new ones ? Do I deprecate `:html-divs' or do I set its default value to > nil ? Or do you have any other preference ? I think that we can leave :html-divs be, but let the new options override/aug

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-17 Thread Sébastien Gendre
Ok, noted. How do prefer the old option `:html-divs' be managed in regard to the 3 new ones ? Do I deprecate `:html-divs' or do I set its default value to nil ? Or do you have any other preference ? signature.asc Description: PGP signature

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-13 Thread Ihor Radchenko
Sébastien Gendre writes: > If I modify how values of option alist keyword are parsed, and if they > are merged with a default value, do you think if it's better to make it > on another patch ? That would be a major breaking change that should be justified. Unless you really think that it is nece

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-13 Thread Sébastien Gendre
If I modify how values of option alist keyword are parsed, and if they are merged with a default value, do you think if it's better to make it on another patch ? signature.asc Description: PGP signature

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-13 Thread Ihor Radchenko
Sébastien Gendre writes: > ... if not all divs > are set with this Keyword, I can still merge with the default value. > > Example: If only postamble is set with #+HTML_DIV, the values of the > preamble and content divs are taken from the org-html-div variable. > > But I wonder if a modification o

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-12 Thread Sébastien Gendre
Using a KEYWORD is a good idea. And as the format of the keyword value that you suggest is the same as #+ATTR_HTML, I can use `org-export-read-attribute'. Like you say, having 1 #+HTML_DIV is more compact, but if not all divs are set with this Keyword, I can still merge with the default value. E

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-12 Thread Ihor Radchenko
Sébastien Gendre writes: > What if I add new export options in the alist: > > * :html-div-preamble > > * :html-div-content > > * :html-div-preamble This might work. I was also thinking along the same lines... > So, a user could set its option like this: > > #+OPTION: html-div-content:(:tag

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-11 Thread Sébastien Gendre
What if I add new export options in the alist: * :html-div-preamble * :html-div-content * :html-div-preamble Each one have nil as default value and can have one of these 2 values: * "tag-name": A tag name (ex: "div") as a string * (:tag "tag-name" :id "id-name" :class "class-name"): A plist

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-11 Thread Ihor Radchenko
Sébastien Gendre writes: > What do you mean by "Allow KEYWORD" ? > > You mean a #+KEYWORD ? But these keyword only accept string as values, > if I made no mistake. I mean #+KEYWORD + modifying parts of ox-html that use :html-divs to understand its value to be a string in addition to alist. --

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-11 Thread Sébastien Gendre
What do you mean by "Allow KEYWORD" ? You mean a #+KEYWORD ? But these keyword only accept string as values, if I made no mistake. signature.asc Description: PGP signature

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-11 Thread Ihor Radchenko
Sébastien Gendre writes: > With the ox-html option `:html-divs', the value is list of lists that > look like this: > > '((preamble "div" "preamble") > (content "div" "content") > (postamble "div" "postamble")) > > It is to long to be set as an OPTION. But a KEYWORD only accept string

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-05-09 Thread Sébastien Gendre
Hello, With the ox-html option `:html-divs', the value is list of lists that look like this: '((preamble "div" "preamble") (content "div" "content") (postamble "div" "postamble")) It is to long to be set as an OPTION. But a KEYWORD only accept string if I understand correctly ? Do

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-28 Thread Ihor Radchenko
Sébastien Gendre writes: > In the file `etc/ORG-NEWS': > > - Do I create a new entry for each KEYWORD/OPTION I have added, like I have > done with `html-self-link-headlines' on my previous patch ? > > - Or do I rewrite the entry about `html-self-link-headlines' to make it > talk about each KE

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-28 Thread Sébastien Gendre
Thank you for your reply. In the file `etc/ORG-NEWS': - Do I create a new entry for each KEYWORD/OPTION I have added, like I have done with `html-self-link-headlines' on my previous patch ? - Or do I rewrite the entry about `html-self-link-headlines' to make it talk about each KEYWORD/OPTION

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-28 Thread Ihor Radchenko
Sébastien Gendre writes: > Do org-mode have a rule to decide if we use a KEYWORD or an OPTION ? See https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=8824b3ce4df7201be081f64aa90d157e5cc805f2 -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-28 Thread Sébastien Gendre
Ok, thank you. Do org-mode have a rule to decide if we use a KEYWORD or an OPTION ? signature.asc Description: PGP signature

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-22 Thread Ihor Radchenko
Sébastien Gendre writes: > I plan to work on the other OPTION/KEYWORD in the next days. > > Do you prefer if I make 1 commit for each of them or 1 for all ? > If I made 1 for each, do I send all of them in 1 e-mail ? I suspect that the changes will be very repetitive. If yes, it will make more s

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-22 Thread Sébastien Gendre
I plan to work on the other OPTION/KEYWORD in the next days. Do you prefer if I make 1 commit for each of them or 1 for all ? If I made 1 for each, do I send all of them in 1 e-mail ? Best regards --- Gendre Sébastien Ihor Radchenko writes: > Sébastien Gendre writes: > >> I have attac

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-21 Thread Sébastien Gendre
Thank you very much. Ihor Radchenko writes: > Sébastien Gendre writes: > >> I have attached, to this e-mail, the corrected patch that include your >> requests. > > Thanks! > Applied, onto main, with minor amendments to the manual text. > https://git.savannah.gnu.org/cgit/emacs/org-mode.git/com

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-19 Thread Sébastien Gendre
e4e57fe28bc2c144b6c3234c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gendre?= Date: Fri, 18 Apr 2025 18:18:12 +0200 Subject: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link * lisp/ox-html.el (html): In the backend options-alist, add an OPTION name to the

Re: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-19 Thread Ihor Radchenko
Sébastien Gendre writes: > Attached to this e-mail you could find a small patch for the HTML export > backend. > > This patch add an in-file option for enabling headlines self link. Thanks for the patch! > Until now, to add a self link on each headline in the HTML export, user > needed to set t

[PATCH] lisp/ox-html.el: Add file level option to manage headlines self link

2025-04-18 Thread Sébastien Gendre
thing more ambitious. Best regards --- Gendre Sébastien From 9e7eddf1a7da640a1a9d4ff9d2ac66c8c870c01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gendre?= Date: Fri, 18 Apr 2025 18:18:12 +0200 Subject: [PATCH] lisp/ox-html.el: Add file level option to manage headlines self li