emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* global macros
@ 2020-05-22  9:29 Dauer, Michael
  2020-05-22 15:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Dauer, Michael @ 2020-05-22  9:29 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

Hi,

I want to set some org-mode macro globally in my init.el. E.g. author
should be set to user-full-name, but I also want other stuff defined.
Having to import these via setup or include files is not an option.

Macros seem to be "buffer-local", which seems to mean that a cannot just
add my macros to org-macro-templates.

So what would be a good way to achieve my requirements?

BTW: What would be a good way to implement a general include file for all
exports, i.e. to generally include a file with each export without having
to write it into each file/branch to be included. I assume there is an
export hook before macro expansion at which I can include the file. Which
hook? What function to include my file?

Thanks,
Michael

[-- Attachment #2: Type: text/html, Size: 911 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: global macros
  2020-05-22  9:29 global macros Dauer, Michael
@ 2020-05-22 15:05 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-05-22 15:05 UTC (permalink / raw)
  To: Dauer, Michael; +Cc: emacs-orgmode

Hello,

"Dauer, Michael" <michael.dauer@smartpm.com> writes:

> I want to set some org-mode macro globally in my init.el. E.g. author
> should be set to user-full-name, but I also want other stuff defined.
> Having to import these via setup or include files is not an option.
>
> Macros seem to be "buffer-local", which seems to mean that a cannot just
> add my macros to org-macro-templates.

See `org-export-global-macros'.

> BTW: What would be a good way to implement a general include file for all
> exports, i.e. to generally include a file with each export without having
> to write it into each file/branch to be included. I assume there is an
> export hook before macro expansion at which I can include the file. Which
> hook? What function to include my file?

See `org-export-before-processing-hook'.

Regards,

-- 
Nicolas Goaziou


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-22 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22  9:29 global macros Dauer, Michael
2020-05-22 15:05 ` Nicolas Goaziou

Code repositories for project(s) associated with this 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).