* Need help with HTML export custom postamble
@ 2015-08-27 4:49 David A. Gershman
2015-08-27 6:19 ` Thomas S. Dye
0 siblings, 1 reply; 8+ messages in thread
From: David A. Gershman @ 2015-08-27 4:49 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
Hello Everyone,
I've searched and read and found several examples of making custom
postambles for an HTML export, but I can't seem to find a way to do it
all in a local file.
First, I'm new to HTML exporting (as some of you remember from my last
email). So, I went ahead and inserted a template into my .org file (C-c
C-e # html) and noticed "html-postable" was set to 't'. Based on what I
read, this means it should take the contents of the variable
"org-export-html-postamble-format" and use /that/ for the postamble.
However, I set /org-export-html-postamble-format/ in my .emacs file:
> (setq org-export-html-postamble-format
> '(("en" "<p>From .emacs</p>"))
> )
...and in my .org file had:
#+OPTIONS: html-postamble:t
then I tried
#+OPTIONS: html-postamble:auto
and also removed it. All 3 times the postamble from my .emacs was not used.
Finally, I tried "Local variables"? Never did this before but attempted
it and put:
> # Local Variables:
> # org-html-postamble: t
> # org-export-html-postamble-format: "Hello World"
> # End:
in my .org file and still no luck.
Can a custom pre/postamble be specified on a per file basis? FWIW, no,
I do not have any /org-publish-project-alist/ specified as this seems to
be a "site-based" solution. I'm looking for a page-based solution.
TIA!
--David
[-- Attachment #2: Type: text/html, Size: 1953 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble
2015-08-27 4:49 Need help with HTML export custom postamble David A. Gershman
@ 2015-08-27 6:19 ` Thomas S. Dye
2015-09-01 0:29 ` David A. Gershman
0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2015-08-27 6:19 UTC (permalink / raw)
To: David A. Gershman; +Cc: emacs-orgmode
>
> Finally, I tried "Local variables"? Never did this before but attempted
> it and put:
>
>> # Local Variables:
>> # org-html-postamble: t
>> # org-export-html-postamble-format: "Hello World"
>> # End:
> in my .org file and still no luck.
After you add this to the .org file, you need to refresh the setup. I
do this by moving cursor to the top of the file (with all of the #+
lines) and pressing C-c C-c. You should get a message asking if it is
OK to set local variables. Pressing y should set org-html-postamble and
org-export-html-postamble-format for that buffer.
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble
2015-08-27 6:19 ` Thomas S. Dye
@ 2015-09-01 0:29 ` David A. Gershman
2015-09-01 0:38 ` Thomas S. Dye
0 siblings, 1 reply; 8+ messages in thread
From: David A. Gershman @ 2015-09-01 0:29 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
So I finally was able to test out the C-c C-c. It did ask me if I
wanted to apply and I said yes. When I exported the file, my postamble
(as specified in the variable) was /not/ shown...it was still the default.
Strangely, when I did C-c C-c, Emacs came back with this:
> The local variables list in syllabus.org
> contains values that may not be safe (*).
> Do you want to apply it? You can type
> y -- to apply the local variables list.
> n -- to ignore the local varialbes list.
> ! -- to apply.....
>
> * org-html-postamble : t
> * org-export-hml-postamble-format : "Hello World"
Notice the *'*'* warning not to be safe. But the source .org file is
with '#' as it should be (seen further below).
Thoughts?
On 08/26/2015 11:19 PM, Thomas S. Dye wrote:
>> Finally, I tried "Local variables"? Never did this before but attempted
>> it and put:
>>
>>> # Local Variables:
>>> # org-html-postamble: t
>>> # org-export-html-postamble-format: "Hello World"
>>> # End:
>> in my .org file and still no luck.
> After you add this to the .org file, you need to refresh the setup. I
> do this by moving cursor to the top of the file (with all of the #+
> lines) and pressing C-c C-c. You should get a message asking if it is
> OK to set local variables. Pressing y should set org-html-postamble and
> org-export-html-postamble-format for that buffer.
>
> hth,
> Tom
>
[-- Attachment #2: Type: text/html, Size: 2286 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble
2015-09-01 0:29 ` David A. Gershman
@ 2015-09-01 0:38 ` Thomas S. Dye
2015-09-01 0:46 ` David A. Gershman
0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2015-09-01 0:38 UTC (permalink / raw)
To: David A. Gershman; +Cc: emacs-orgmode
Aloha David,
David A. Gershman <gershman@dagertech.net> writes:
> So I finally was able to test out the C-c C-c. It did ask me if I
> wanted to apply and I said yes. When I exported the file, my postamble
> (as specified in the variable) was /not/ shown...it was still the default.
>
> Strangely, when I did C-c C-c, Emacs came back with this:
>
>> The local variables list in syllabus.org
>> contains values that may not be safe (*).
>> Do you want to apply it? You can type
>> y -- to apply the local variables list.
>> n -- to ignore the local varialbes list.
>> ! -- to apply.....
>>
>> * org-html-postamble : t
>> * org-export-hml-postamble-format : "Hello World"
> Notice the *'*'* warning not to be safe. But the source .org file is
> with '#' as it should be (seen further below).
>
> Thoughts?
Yes, Emacs asks about safe local variables. I read about this once in
the Emacs manual and concluded that my use cases were all safe, so I
just type "y". I suspect you're in the same boat, but you might want to
read the relevant section of the Emacs manual to be certain.
I just noticed that you're setting org-export-hml-postamble-format, but
you probably want html instead of hml.
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble
2015-09-01 0:38 ` Thomas S. Dye
@ 2015-09-01 0:46 ` David A. Gershman
2015-09-01 1:36 ` Thomas S. Dye
0 siblings, 1 reply; 8+ messages in thread
From: David A. Gershman @ 2015-09-01 0:46 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2951 bytes --]
On 08/31/2015 05:38 PM, Thomas S. Dye wrote:
> Aloha David,
>
> David A. Gershman <gershman@dagertech.net> writes:
>
>> So I finally was able to test out the C-c C-c. It did ask me if I
>> wanted to apply and I said yes. When I exported the file, my postamble
>> (as specified in the variable) was /not/ shown...it was still the default.
>>
>> Strangely, when I did C-c C-c, Emacs came back with this:
>>
>>> The local variables list in syllabus.org
>>> contains values that may not be safe (*).
>>> Do you want to apply it? You can type
>>> y -- to apply the local variables list.
>>> n -- to ignore the local varialbes list.
>>> ! -- to apply.....
>>>
>>> * org-html-postamble : t
>>> * org-export-hml-postamble-format : "Hello World"
>> Notice the *'*'* warning not to be safe. But the source .org file is
>> with '#' as it should be (seen further below).
>>
>> Thoughts?
> Yes, Emacs asks about safe local variables. I read about this once in
> the Emacs manual and concluded that my use cases were all safe, so I
> just type "y". I suspect you're in the same boat, but you might want to
> read the relevant section of the Emacs manual to be certain.
I, too, typed 'y' with no luck; and yeah, my use cases are safe as well.
>
> I just noticed that you're setting org-export-hml-postamble-format, but
> you probably want html instead of hml.
>
> hth,
> Tom
>
Sorry, that must have been a typo when transposing it into email (Emacs
didn't let me highlight to copy the text while the question was in the
buffer). The actual .org file /is/ 'html'.
So by typing 'y', I'd expect to see "Hello World" in my
postamble...correct? My seeing the default is still an error then.
Just to make sure all is understood, here is the entire .org file
(content shortened):
> # Last Updated: "2015-08-31 17:44:42"
> #+OPTIONS: html-link-use-abs-url:nil
> #+OPTIONS: html-preamble:t html-scripts:nil html-style:t
> #+OPTIONS: html5-fancy:nil toc:nil num:nil
> #+HTML_DOCTYPE: xhtml-strict
> #+HTML_CONTAINER: div
> #+HTML_HEAD:
> #+HTML_HEAD_EXTRA:
> #+AUTHOR: D. Gershman
> #+CREATOR: <a href="http://www.gnu.org/software/emacs/">Emacs</a>
> 24.4.1 (<a href="http://orgmode.org">Org</a> mode 8.3.1)
> #+TITLE: CS 380 Syllabus
> #+LANGUAGE: en
>
>
> * David A. Gershman, CISSP
> Office hours here
>
> * Course Description
> Network architectures and standards. Layers and protocols. Circuit
> switching, packet switching and routing. Client-server
> concepts. Network security. Web computing. Privacy, intellectual
> property rights and acceptable use. 4
> lectures/problem-solving. Prerequisites: CS 241 and CS 264 with
> grades of C or better, or consent of instructor.
>
>
> # Local Variables:
> # org-html-postamble: t
> # org-export-html-postamble-format: "Hello World"
> # End:
Either typing C-c C-c, or just opening the file will ask me about the
variables. I answer 'y', but still get the default postamble.
Thanks.
[-- Attachment #2: Type: text/html, Size: 4425 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble
2015-09-01 0:46 ` David A. Gershman
@ 2015-09-01 1:36 ` Thomas S. Dye
2015-09-01 1:49 ` Need help with HTML export custom postamble [SOLVED] David A. Gershman
0 siblings, 1 reply; 8+ messages in thread
From: Thomas S. Dye @ 2015-09-01 1:36 UTC (permalink / raw)
To: David A. Gershman; +Cc: emacs-orgmode
David A. Gershman <gershman@dagertech.net> writes:
>> # Local Variables:
>> # org-html-postamble: t
>> # org-export-html-postamble-format: "Hello World"
>> # End:
> Either typing C-c C-c, or just opening the file will ask me about the
> variables. I answer 'y', but still get the default postamble.
Are you using an old Org mode, pre 8.0? I believe that's when the old
org-export-* variables lost the "export" part.
At any rate, the problem appears to be that org-html-postamble-format
(in Org mode > 8.0) is an association list, not a string.
This works for me using a recent Org mode:
# Local Variables:
# org-html-postamble: t
# eval: (add-to-list 'org-html-postamble-format (quote ("en" "Hello World")))
# End:
At least, I get the cons cell added to the association list, and the
change is local to the buffer. I didn't try the export part.
hth,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble [SOLVED]
2015-09-01 1:36 ` Thomas S. Dye
@ 2015-09-01 1:49 ` David A. Gershman
2015-09-01 15:19 ` Nick Dokos
0 siblings, 1 reply; 8+ messages in thread
From: David A. Gershman @ 2015-09-01 1:49 UTC (permalink / raw)
To: emacs-orgmode
*argh* I remember that variation of postamble in my readings...didn't
think to try it. Thank you!!!
I attempted the export as well and it worked as expected. I appreciate
your patience!
FWIW, yes, I'm on the latest Org (8.3.1) and Emacs 24.4.1 (Debian Jessie).
On 08/31/2015 06:36 PM, Thomas S. Dye wrote:
> David A. Gershman <gershman@dagertech.net> writes:
>
>>> # Local Variables:
>>> # org-html-postamble: t
>>> # org-export-html-postamble-format: "Hello World"
>>> # End:
>> Either typing C-c C-c, or just opening the file will ask me about the
>> variables. I answer 'y', but still get the default postamble.
> Are you using an old Org mode, pre 8.0? I believe that's when the old
> org-export-* variables lost the "export" part.
>
> At any rate, the problem appears to be that org-html-postamble-format
> (in Org mode > 8.0) is an association list, not a string.
>
> This works for me using a recent Org mode:
>
> # Local Variables:
> # org-html-postamble: t
> # eval: (add-to-list 'org-html-postamble-format (quote ("en" "Hello World")))
> # End:
>
> At least, I get the cons cell added to the association list, and the
> change is local to the buffer. I didn't try the export part.
>
> hth,
> Tom
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Need help with HTML export custom postamble [SOLVED]
2015-09-01 1:49 ` Need help with HTML export custom postamble [SOLVED] David A. Gershman
@ 2015-09-01 15:19 ` Nick Dokos
0 siblings, 0 replies; 8+ messages in thread
From: Nick Dokos @ 2015-09-01 15:19 UTC (permalink / raw)
To: emacs-orgmode
"David A. Gershman" <gershman@dagertech.net> writes:
> *argh* I remember that variation of postamble in my readings...didn't
> think to try it. Thank you!!!
>
> I attempted the export as well and it worked as expected. I appreciate
> your patience!
>
> FWIW, yes, I'm on the latest Org (8.3.1) and Emacs 24.4.1 (Debian Jessie).
>
> On 08/31/2015 06:36 PM, Thomas S. Dye wrote:
>> David A. Gershman <gershman@dagertech.net> writes:
>>
>>>> # Local Variables:
>>>> # org-html-postamble: t
>>>> # org-export-html-postamble-format: "Hello World"
>>>> # End:
>>> Either typing C-c C-c, or just opening the file will ask me about the
>>> variables. I answer 'y', but still get the default postamble.
>> Are you using an old Org mode, pre 8.0? I believe that's when the old
>> org-export-* variables lost the "export" part.
>>
>> At any rate, the problem appears to be that org-html-postamble-format
>> (in Org mode > 8.0) is an association list, not a string.
>>
>> This works for me using a recent Org mode:
>>
>> # Local Variables:
>> # org-html-postamble: t
>> # eval: (add-to-list 'org-html-postamble-format (quote ("en" "Hello
>> World")))
This is probably more complicated than it needs to be: if you are just
setting the postamble, not appending to it, it would be preferable (and
simpler) to avoid the eval:
# org-html-postamble-format: (quote ("en" "Hello World"))
>> # End:
Nick
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-09-01 15:19 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27 4:49 Need help with HTML export custom postamble David A. Gershman
2015-08-27 6:19 ` Thomas S. Dye
2015-09-01 0:29 ` David A. Gershman
2015-09-01 0:38 ` Thomas S. Dye
2015-09-01 0:46 ` David A. Gershman
2015-09-01 1:36 ` Thomas S. Dye
2015-09-01 1:49 ` Need help with HTML export custom postamble [SOLVED] David A. Gershman
2015-09-01 15:19 ` Nick Dokos
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).