* Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
@ 2022-06-10 16:35 Pierre Balayé
2022-06-13 2:45 ` Tim Cross
2022-11-17 4:56 ` Ihor Radchenko
0 siblings, 2 replies; 11+ messages in thread
From: Pierre Balayé @ 2022-06-10 16:35 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 5445 bytes --]
I am using html export feature for org files and I want to change the value
of html-postamble (see [doc](
https://orgmode.org/manual/HTML-preamble-and-postamble.html)).
Here is the `index.org` file:
```
#+title: Home
Welcome
#+options: html-postamble:"TESTSPACE"
```
When I export with `M-x org-html-export-as-html` everything is all right
and I have the following at the end of the html produced buffer:
```html
<div id="postamble" class="status">
TESTSPACE
</div>
```
But if I add a space:
```
#+title: Home
Welcome
#+options: html-postamble:"TEST SPACE"
```
it raises this error I cannot solve:
`org-export--parse-option-keyword: End of file during parsing`
Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw
scroll bars)
of 2022-05-10
Package: Org mode version 9.4.4 (release_9.4.4 @
/usr/local/share/emacs/27.2/lisp/org/)
current state:
==============
(setq
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-link-shell-confirm-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
org-odt-format-headline-function 'org-odt-format-headline-default-function
org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function
org-imenu-get-tree] 2]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
[add-hook change-major-mode-hook org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-archive-hook '(org-attach-archive-delete-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
org-babel-pre-tangle-hook '(save-buffer)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
org-agenda-loop-over-headlines-in-active-region nil
org-occur-hook '(org-first-headline-recenter)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
org-export-before-parsing-hook '(org-attach-expand-links)
org-confirm-shell-link-function 'yes-or-no-p
org-link-parameters '(("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
("id" :follow org-id-open)
("eww" :follow org-eww-open :store org-eww-store-link)
("rmail" :follow org-rmail-open :store org-rmail-store-link)
("mhe" :follow org-mhe-open :store org-mhe-store-link)
("irc" :follow org-irc-visit :store org-irc-store-link :export
org-irc-export)
("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
("gnus" :follow org-gnus-open :store org-gnus-store-link)
("docview" :follow org-docview-open :export org-docview-export
:store org-docview-store-link)
("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
("shell" :follow org-link--open-shell)
("news" :follow
#[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("mailto" :follow
#[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("https" :follow
#[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("http" :follow
#[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("ftp" :follow
#[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6
"\n\n(fn URL ARG)"]
)
("help" :follow org-link--open-help)
("file" :complete org-link-complete-file)
("elisp" :follow org-link--open-elisp)
("doi" :follow org-link--open-doi))
org-latex-format-headline-function
'org-latex-format-headline-default-function
org-link-elisp-confirm-function 'yes-or-no-p
org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
org-html-format-headline-function
'org-html-format-headline-default-function
)
Cordialement,
Dr. Pierre BALAYÉ
*______________________________________________*
*Médecin de Santé Publique et Médecine Sociale*
*AHU en BIostatistiques et Informatique Médicale*
*Doctorant ED446 <http://edbsl.univ-lille2.fr/> | ULR2694
<http://ea2694.univ-lille2.fr/accueil.html> | CERIM
<http://cerim.univ-lille2.fr/> | CHU Lille <https://www.chu-lille.fr/>*
[-- Attachment #2: Type: text/html, Size: 7511 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-06-10 16:35 Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)] Pierre Balayé
@ 2022-06-13 2:45 ` Tim Cross
2022-10-07 8:05 ` Ihor Radchenko
2022-11-17 4:56 ` Ihor Radchenko
1 sibling, 1 reply; 11+ messages in thread
From: Tim Cross @ 2022-06-13 2:45 UTC (permalink / raw)
To: emacs-orgmode
Confirm.
I am able to reproduce this issue with
GNU Emacs 28.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,
cairo version 1.16.0) of 2022-05-29
Org mode version 9.5.4 (9.5.4-gc02c0d @ /home/tim/.emacs.husky/straight/build/org/)
I also feel the manual page could be improved as it doesn't actually
mention setting the html-postamble to a string (that is only mentioned
in the variable docstring).
Pierre Balayé <pierrebalaye@gmail.com> writes:
> I am using html export feature for org files and I want to change the value of html-postamble (see [doc]
> (https://orgmode.org/manual/HTML-preamble-and-postamble.html)).
>
> Here is the `index.org` file:
> ```
> #+title: Home
>
> Welcome
>
> #+options: html-postamble:"TESTSPACE"
> ```
>
> When I export with `M-x org-html-export-as-html` everything is all right and I have the following at the end of the html produced
> buffer:
>
> ```html
> <div id="postamble" class="status">
> TESTSPACE
> </div>
> ```
>
> But if I add a space:
> ```
> #+title: Home
>
> Welcome
>
> #+options: html-postamble:"TEST SPACE"
> ```
>
> it raises this error I cannot solve:
> `org-export--parse-option-keyword: End of file during parsing`
>
> Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
> of 2022-05-10
> Package: Org mode version 9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)
>
> current state:
> ==============
> (setq
> org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
> org-link-shell-confirm-function 'yes-or-no-p
> org-metadown-hook '(org-babel-pop-to-session-maybe)
> org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
> org-html-format-inlinetask-function 'org-html-format-inlinetask-default-function
> org-odt-format-headline-function 'org-odt-format-headline-default-function
> org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
> org-mode-hook '(#[0 "\301\211 \207" [imenu-create-index-function org-imenu-get-tree] 2]
> #[0 "\300\301\302\303\304$\207"
> [add-hook change-major-mode-hook org-show-all append local] 5]
> #[0 "\300\301\302\303\304$\207"
> [add-hook change-major-mode-hook org-babel-show-result-all append local]
> 5]
> org-babel-result-hide-spec org-babel-hide-all-hashes)
> org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
> org-archive-hook '(org-attach-archive-delete-maybe)
> org-confirm-elisp-link-function 'yes-or-no-p
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
> org-metaup-hook '(org-babel-load-in-session-maybe)
> org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3 "\n\n(fn ENTRY)"]
> org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
> org-babel-pre-tangle-hook '(save-buffer)
> org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
> org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS WIDTH)"]
> org-agenda-loop-over-headlines-in-active-region nil
> org-occur-hook '(org-first-headline-recenter)
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
> org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
> org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate)
> org-odt-format-inlinetask-function 'org-odt-format-inlinetask-default-function
> org-export-before-parsing-hook '(org-attach-expand-links)
> org-confirm-shell-link-function 'yes-or-no-p
> org-link-parameters '(("attachment" :follow org-attach-follow :complete
> org-attach-complete-link)
> ("id" :follow org-id-open)
> ("eww" :follow org-eww-open :store org-eww-store-link)
> ("rmail" :follow org-rmail-open :store org-rmail-store-link)
> ("mhe" :follow org-mhe-open :store org-mhe-store-link)
> ("irc" :follow org-irc-visit :store org-irc-store-link :export
> org-irc-export)
> ("info" :follow org-info-open :export org-info-export :store
> org-info-store-link)
> ("gnus" :follow org-gnus-open :store org-gnus-store-link)
> ("docview" :follow org-docview-open :export org-docview-export
> :store org-docview-store-link)
> ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
> ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
> org-bbdb-complete-link :store org-bbdb-store-link)
> ("w3m" :store org-w3m-store-link) ("file+sys") ("file+emacs")
> ("shell" :follow org-link--open-shell)
> ("news" :follow
> #[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6
> "\n\n(fn URL ARG)"]
> )
> ("mailto" :follow
> #[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6
> "\n\n(fn URL ARG)"]
> )
> ("https" :follow
> #[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6
> "\n\n(fn URL ARG)"]
> )
> ("http" :follow
> #[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6
> "\n\n(fn URL ARG)"]
> )
> ("ftp" :follow
> #[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6
> "\n\n(fn URL ARG)"]
> )
> ("help" :follow org-link--open-help)
> ("file" :complete org-link-complete-file)
> ("elisp" :follow org-link--open-elisp)
> ("doi" :follow org-link--open-doi))
> org-latex-format-headline-function 'org-latex-format-headline-default-function
> org-link-elisp-confirm-function 'yes-or-no-p
> org-latex-format-inlinetask-function 'org-latex-format-inlinetask-default-function
> org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
> org-html-format-headline-function 'org-html-format-headline-default-function
> )
>
> Cordialement,
>
> Dr. Pierre BALAYÉ
>
> ______________________________________________
>
> Médecin de Santé Publique et Médecine Sociale
> AHU en BIostatistiques et Informatique Médicale
> Doctorant ED446 | ULR2694 | CERIM | CHU Lille
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-06-13 2:45 ` Tim Cross
@ 2022-10-07 8:05 ` Ihor Radchenko
2022-10-30 22:02 ` Tim Cross
0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2022-10-07 8:05 UTC (permalink / raw)
To: Tim Cross; +Cc: emacs-orgmode
Tim Cross <theophilusx@gmail.com> writes:
> Confirm.
>
> I am able to reproduce this issue with
I might be missing something, but does
`org-export--parse-option-keyword' even support spaces inside values?
> I also feel the manual page could be improved as it doesn't actually
> mention setting the html-postamble to a string (that is only mentioned
> in the variable docstring).
The manual does even mention the "html-postamble" option. Just the
variable. I am confused. Was it removed at some point? (I do not see any
commits doing so)
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-10-07 8:05 ` Ihor Radchenko
@ 2022-10-30 22:02 ` Tim Cross
2022-10-31 1:22 ` Ihor Radchenko
0 siblings, 1 reply; 11+ messages in thread
From: Tim Cross @ 2022-10-30 22:02 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode
Ihor Radchenko <yantar92@gmail.com> writes:
> Tim Cross <theophilusx@gmail.com> writes:
>
>> Confirm.
>>
>> I am able to reproduce this issue with
>
> I might be missing something, but does
> `org-export--parse-option-keyword' even support spaces inside values?
>
>> I also feel the manual page could be improved as it doesn't actually
>> mention setting the html-postamble to a string (that is only mentioned
>> in the variable docstring).
>
> The manual does even mention the "html-postamble" option. Just the
> variable. I am confused. Was it removed at some point? (I do not see any
> commits doing so)
Sorry for late response. Only just noticed this amongst all the items in
my org mailbox.
It was a while ago. I do recall I was able to reproduce the issue, so
there was a bug here. Either it is a code bug or a documentation bug.
My error was in omitting the leading org- for the variable name. Correct
name is org-html-postamble. Apologies.
With regards to the documentation, the section in the manual is
The default value for ‘org-html-postamble’ is ‘auto’, which makes the
HTML exporter build a postamble from looking up author’s name, email
address, creator’s name, and date. Set ‘org-html-postamble’ to ‘t’ to
insert the postamble in the format specified in the
‘org-html-postamble-format’ variable. The HTML exporter does not insert
a postamble if ‘org-html-postamble’ is set to ‘nil’.
Note no mention of string, although the previous paragraph talking about
org-html-preamble does mention string.
and the doc string for the variable is
Non-nil means insert a postamble in HTML export.
When set to ‘auto’, check against the
‘org-export-with-author/email/creator/date’ variables to set the
content of the postamble. When set to a string, use this string
as the postamble. When t, insert a string as defined by the
formatting string in ‘org-html-postamble-format’.
When set to a function, apply this function and insert the
returned string. The function takes the property list of export
options as its only argument.
Setting :html-postamble in publishing projects will take
precedence over this variable.
What probably needs clarifying is
1. mention the string option in the manual
2. If spaces are not allowed in the string, clearly document
that. Currently, the doc string just says that if set to a string, use
that string as the postamble, which I think implies spaces are OK.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-10-30 22:02 ` Tim Cross
@ 2022-10-31 1:22 ` Ihor Radchenko
2022-10-31 1:54 ` Tim Cross
0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2022-10-31 1:22 UTC (permalink / raw)
To: Tim Cross; +Cc: Ihor Radchenko, emacs-orgmode
Tim Cross <theophilusx@gmail.com> writes:
> What probably needs clarifying is
>
> 1. mention the string option in the manual
It is documented in the manual: 13.9.4 HTML preamble and postamble
> 2. If spaces are not allowed in the string, clearly document
> that. Currently, the doc string just says that if set to a string, use
> that string as the postamble, which I think implies spaces are OK.
They are allowed. It is just #+OPTIONS keyword that does not allow
strings as values. I have no idea why.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-10-31 1:22 ` Ihor Radchenko
@ 2022-10-31 1:54 ` Tim Cross
2022-11-02 4:35 ` Ihor Radchenko
0 siblings, 1 reply; 11+ messages in thread
From: Tim Cross @ 2022-10-31 1:54 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Ihor Radchenko, emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> Tim Cross <theophilusx@gmail.com> writes:
>
>> What probably needs clarifying is
>>
>> 1. mention the string option in the manual
>
> It is documented in the manual: 13.9.4 HTML preamble and postamble
>
You snipped out the relevant paragraph I copied from the manual. If you
look at it, you will see that it does not mention string as an option
for org-html-postamble. Furthermore, the previous paragraph, which talks
about org-html-preamble, which does mention string, states that if the
string matches the name of a function, it will be called 9and expected
to return a string). This is not mentioned at all in the doc string for
org-html-postamble.
Therefore, I still think there is inconsistency between what the doc
string of the variable states and what the manual states. There is no
mention of function matching against strings in the cod string of the
variable. There is no mention of string as an option in the paragraph
referring to org-html-postamble in the manual.
>> 2. If spaces are not allowed in the string, clearly document
>> that. Currently, the doc string just says that if set to a string, use
>> that string as the postamble, which I think implies spaces are OK.
>
> They are allowed. It is just #+OPTIONS keyword that does not allow
> strings as values. I have no idea why.
This is all an aside to the actual bug, so please don't miss that
(unless it has been fixed) i.e. a org-html-postamble string with a space
in it does not work.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-10-31 1:54 ` Tim Cross
@ 2022-11-02 4:35 ` Ihor Radchenko
2022-11-16 4:50 ` Ihor Radchenko
2022-11-16 21:49 ` Tim Cross
0 siblings, 2 replies; 11+ messages in thread
From: Ihor Radchenko @ 2022-11-02 4:35 UTC (permalink / raw)
To: Tim Cross; +Cc: Ihor Radchenko, emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]
Tim Cross <theophilusx@gmail.com> writes:
>>> What probably needs clarifying is
>>>
>>> 1. mention the string option in the manual
>>
>> It is documented in the manual: 13.9.4 HTML preamble and postamble
>>
>
> You snipped out the relevant paragraph I copied from the manual. If you
> look at it, you will see that it does not mention string as an option
> for org-html-postamble.
I see. I tried to clarify similarities and differences between pre- and
postamble in the manual. See the attached.
> Furthermore, the previous paragraph, which talks
> about org-html-preamble, which does mention string, states that if the
> string matches the name of a function, it will be called 9and expected
> to return a string).
That's wrong on the manual part. `org-html-preamble' can be set to a
function. When it is set to string, the string is only treated as a
format string. No function names. See the attached patches.
> This is not mentioned at all in the doc string for
> org-html-postamble.
Fixed in the attached.
> Therefore, I still think there is inconsistency between what the doc
> string of the variable states and what the manual states. There is no
> mention of function matching against strings in the cod string of the
> variable. There is no mention of string as an option in the paragraph
> referring to org-html-postamble in the manual.
I hope I clarified the actual situation in the attached patches. Also, I
fixed the actual code allowing org-html-preamble to be set to 'auto (the
same code is used to format preamble and postamble). It does not make
sense.
>>> 2. If spaces are not allowed in the string, clearly document
>>> that. Currently, the doc string just says that if set to a string, use
>>> that string as the postamble, which I think implies spaces are OK.
>>
>> They are allowed. It is just #+OPTIONS keyword that does not allow
>> strings as values. I have no idea why.
>
> This is all an aside to the actual bug, so please don't miss that
> (unless it has been fixed) i.e. a org-html-postamble string with a space
> in it does not work.
I am confused here.
The original bug talked specifically about situation like
#+options: html-postamble:"test with spaces"
Are you saying that you cannot have spaces in org-html-postamble
variable? If yes, could you please provide a reproducer?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-html-Do-not-allow-org-html-preamble-to-be-auto.patch --]
[-- Type: text/x-patch, Size: 1096 bytes --]
From fecd0a1af6eba4099e31295fc3e00b003f538d45 Mon Sep 17 00:00:00 2001
Message-Id: <fecd0a1af6eba4099e31295fc3e00b003f538d45.1667363392.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Wed, 2 Nov 2022 12:21:01 +0800
Subject: [PATCH 1/3] ox-html: Do not allow `org-html-preamble' to be 'auto
* lisp/ox-html.el (org-html--build-pre/postamble): Avoid building
date/author/email info line when `org-html-preamble' is set to
'auto. This is only meaningful in `org-html-postamble'.
---
lisp/ox-html.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index cad06aebf..36fcd536c 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1993,7 +1993,7 @@ (defun org-html--build-pre/postamble (type info)
(if (functionp section) (funcall section info)
(cond
((stringp section) (format-spec section spec))
- ((eq section 'auto)
+ ((and (eq section 'auto) (eq type 'postamble))
(let ((date (cdr (assq ?d spec)))
(author (cdr (assq ?a spec)))
(email (cdr (assq ?e spec)))
--
2.35.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-org-manual-Clarify-similarities-and-differences-betw.patch --]
[-- Type: text/x-patch, Size: 2483 bytes --]
From 93cff0b3849c97300d979d3f95fcc5eb2a6b917c Mon Sep 17 00:00:00 2001
Message-Id: <93cff0b3849c97300d979d3f95fcc5eb2a6b917c.1667363392.git.yantar92@posteo.net>
In-Reply-To: <fecd0a1af6eba4099e31295fc3e00b003f538d45.1667363392.git.yantar92@posteo.net>
References: <fecd0a1af6eba4099e31295fc3e00b003f538d45.1667363392.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Wed, 2 Nov 2022 12:22:36 +0800
Subject: [PATCH 2/3] org-manual: Clarify similarities and differences between
HTML pre/postamble
* doc/org-manual.org (HTML preamble and postamble): Clarify that
`org-html-postamble' can take the same values with
`org-html-preamble'. Highlight, that `org-html-postamble' can also be
set to `auto'.
Reported-by: Tim Cross <theophilusx@gmail.com>
Link: https://orgmode.org/list/86wn8gbvk0.fsf@gmail.com
---
doc/org-manual.org | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/doc/org-manual.org b/doc/org-manual.org
index dc2fc57cd..f07466dff 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13027,17 +13027,17 @@ *** HTML preamble and postamble
~org-html-preamble-format~ for the format string.
Set ~org-html-preamble~ to a string to override the default format
-string. If the string is a function, the HTML exporter expects the
-function to return a string upon execution. The HTML exporter inserts
-this string in the preamble. The HTML exporter does not insert
-a preamble if ~org-html-preamble~ is set ~nil~.
-
-The default value for ~org-html-postamble~ is ~auto~, which makes the
-HTML exporter build a postamble from looking up author's name, email
-address, creator's name, and date. Set ~org-html-postamble~ to ~t~ to
-insert the postamble in the format specified in the
-~org-html-postamble-format~ variable. The HTML exporter does not
-insert a postamble if ~org-html-postamble~ is set to ~nil~.
+string. If set to a function, the HTML exporter expects the function
+to return a string upon execution. The HTML exporter inserts this
+string in the preamble. The HTML exporter does not insert a preamble
+if ~org-html-preamble~ is set ~nil~.
+
+The above also applies to ~org-html-postamble~ and
+~org-html-postamble-format~. In addition, ~org-html-postamble~ can be
+set to ~auto~ (its default value), which makes the HTML exporter build
+a postamble from looking up author's name, email address, creator's
+name, and date.
+
*** Quoting HTML tags
:PROPERTIES:
--
2.35.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-org-html-postamble-Clarify-that-string-value-is-form.patch --]
[-- Type: text/x-patch, Size: 1701 bytes --]
From a87629f416f9a06099f6ce78aeeffb9a4233e5c1 Mon Sep 17 00:00:00 2001
Message-Id: <a87629f416f9a06099f6ce78aeeffb9a4233e5c1.1667363392.git.yantar92@posteo.net>
In-Reply-To: <fecd0a1af6eba4099e31295fc3e00b003f538d45.1667363392.git.yantar92@posteo.net>
References: <fecd0a1af6eba4099e31295fc3e00b003f538d45.1667363392.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Wed, 2 Nov 2022 12:28:52 +0800
Subject: [PATCH 3/3] org-html-postamble: Clarify that string value is format
string
* lisp/ox-html.el (org-html-postamble): Clarify that string value of
the variable is not inserted verbatim, but used as format string.
Reported-by: Tim Cross <theophilusx@gmail.com>
Link: https://orgmode.org/list/86wn8gbvk0.fsf@gmail.com
---
lisp/ox-html.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 36fcd536c..81f192d46 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1276,9 +1276,11 @@ (defcustom org-html-postamble 'auto
When set to `auto', check against the
`org-export-with-author/email/creator/date' variables to set the
-content of the postamble. When set to a string, use this string
-as the postamble. When t, insert a string as defined by the
-formatting string in `org-html-postamble-format'.
+content of the postamble. When t, insert a string as defined by the
+formatting string in `org-html-postamble-format'. When set to a
+string, use this formatting string instead (see
+`org-html-postamble-format' for an example of such a formatting
+string).
When set to a function, apply this function and insert the
returned string. The function takes the property list of export
--
2.35.1
[-- Attachment #5: Type: text/plain, Size: 224 bytes --]
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-11-02 4:35 ` Ihor Radchenko
@ 2022-11-16 4:50 ` Ihor Radchenko
2022-11-16 21:49 ` Tim Cross
1 sibling, 0 replies; 11+ messages in thread
From: Ihor Radchenko @ 2022-11-16 4:50 UTC (permalink / raw)
To: Tim Cross; +Cc: Ihor Radchenko, emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
> Fixed in the attached.
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=84b487868
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=d4299eeac
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5c247fb27
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-11-02 4:35 ` Ihor Radchenko
2022-11-16 4:50 ` Ihor Radchenko
@ 2022-11-16 21:49 ` Tim Cross
2022-11-17 5:49 ` Ihor Radchenko
1 sibling, 1 reply; 11+ messages in thread
From: Tim Cross @ 2022-11-16 21:49 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: Ihor Radchenko, emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> writes:
>>
>> This is all an aside to the actual bug, so please don't miss that
>> (unless it has been fixed) i.e. a org-html-postamble string with a space
>> in it does not work.
>
> I am confused here.
>
> The original bug talked specifically about situation like
>
> #+options: html-postamble:"test with spaces"
>
> Are you saying that you cannot have spaces in org-html-postamble
> variable? If yes, could you please provide a reproducer?
>
To be honest, it was so long ago when I looked into verifying this
issue, I no longer recall the precise details. My memory was that just
having a space in the footer triggered the issue - it didn't have to be
only when the value was set via #+options, but I could be wrong. If you
cannot reproduce the bug just using spaces set, for example, with a
setting in org-publish-project-alist, then I'd say the issue is
resolved.
My main concern here was that it wasn't clear whether the underlying
issue had been addressed and while the doc improvements are great, I
didn't want the actual triggering issue to get lost amongst all the
rest.
Tim
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-06-10 16:35 Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)] Pierre Balayé
2022-06-13 2:45 ` Tim Cross
@ 2022-11-17 4:56 ` Ihor Radchenko
1 sibling, 0 replies; 11+ messages in thread
From: Ihor Radchenko @ 2022-11-17 4:56 UTC (permalink / raw)
To: Pierre Balayé; +Cc: emacs-orgmode
Pierre Balayé <pierrebalaye@gmail.com> writes:
> #+options: html-postamble:"TEST SPACE"
> ```
>
> it raises this error I cannot solve:
> `org-export--parse-option-keyword: End of file during parsing`
Fixed on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=ad623799849177cc837e344d89bbfc654bf389dd
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)]
2022-11-16 21:49 ` Tim Cross
@ 2022-11-17 5:49 ` Ihor Radchenko
0 siblings, 0 replies; 11+ messages in thread
From: Ihor Radchenko @ 2022-11-17 5:49 UTC (permalink / raw)
To: Tim Cross; +Cc: Ihor Radchenko, emacs-orgmode
Tim Cross <theophilusx@gmail.com> writes:
>> Are you saying that you cannot have spaces in org-html-postamble
>> variable? If yes, could you please provide a reproducer?
>>
>
> To be honest, it was so long ago when I looked into verifying this
> issue, I no longer recall the precise details. My memory was that just
> having a space in the footer triggered the issue - it didn't have to be
> only when the value was set via #+options, but I could be wrong. If you
> cannot reproduce the bug just using spaces set, for example, with a
> setting in org-publish-project-alist, then I'd say the issue is
> resolved.
I do not see in the code how space could matter once the variable/option
is set.
> My main concern here was that it wasn't clear whether the underlying
> issue had been addressed and while the doc improvements are great, I
> didn't want the actual triggering issue to get lost amongst all the
> rest.
Fixed already. Do not worry. I just wanted to address more recent
comments first.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-11-17 5:49 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10 16:35 Bug: html-postamble string does not allow space [9.4.4 (release_9.4.4 @ /usr/local/share/emacs/27.2/lisp/org/)] Pierre Balayé
2022-06-13 2:45 ` Tim Cross
2022-10-07 8:05 ` Ihor Radchenko
2022-10-30 22:02 ` Tim Cross
2022-10-31 1:22 ` Ihor Radchenko
2022-10-31 1:54 ` Tim Cross
2022-11-02 4:35 ` Ihor Radchenko
2022-11-16 4:50 ` Ihor Radchenko
2022-11-16 21:49 ` Tim Cross
2022-11-17 5:49 ` Ihor Radchenko
2022-11-17 4:56 ` Ihor Radchenko
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.