emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* #+include and org-export-before-processing-hook
@ 2020-12-13 16:28 Eric S Fraga
  2020-12-13 17:26 ` Juan Manuel Macías
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2020-12-13 16:28 UTC (permalink / raw)
  To: Emacs Org mode mailing list

Hello,

I have a particular function that I want to invoke when exporting an org
file.  This works just fine, adding this function to the
org-export-before-processing-hook, for simple org files.  However, if I
have an org file which uses #+include: to include other org files, it
seems like the processing doesn't happen on included files.

How can I get the function in the hook to process included files?  In
other words, I wish to process the complete org file that results from
incorporating the include files.

I have tried both
#+include: included.org
and
#+include: included.org src org
and neither works.

Thank you,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-160-g7c8dce


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

* Re: #+include and org-export-before-processing-hook
  2020-12-13 16:28 #+include and org-export-before-processing-hook Eric S Fraga
@ 2020-12-13 17:26 ` Juan Manuel Macías
  2020-12-13 20:05   ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Juan Manuel Macías @ 2020-12-13 17:26 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: orgmode

Hello,

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Hello,
>
> I have a particular function that I want to invoke when exporting an org
> file.  This works just fine, adding this function to the
> org-export-before-processing-hook, for simple org files.  However, if I
> have an org file which uses #+include: to include other org files, it
> seems like the processing doesn't happen on included files.

I have the same problem with a function that I wrote to not export
certain footnotes, and to date I have not been able to fix it. According
to the `org-export-before-processing-hook' docstring:

" *This is run before include keywords and macros are expanded*
and Babel code blocks executed, on a copy of the original buffer
being exported.  Visibility and narrowing are preserved.  Point
is at the beginning of the buffer.

Regards,

Juan Manuel 


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

* Re: #+include and org-export-before-processing-hook
  2020-12-13 17:26 ` Juan Manuel Macías
@ 2020-12-13 20:05   ` Nicolas Goaziou
  2020-12-13 21:24     ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2020-12-13 20:05 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode, Eric S Fraga

Hello,

Juan Manuel Macías <maciaschain@posteo.net> writes:

> I have the same problem with a function that I wrote to not export
> certain footnotes, and to date I have not been able to fix it. According
> to the `org-export-before-processing-hook' docstring:
>
> " *This is run before include keywords and macros are expanded*
> and Babel code blocks executed, on a copy of the original buffer
> being exported.  Visibility and narrowing are preserved.  Point
> is at the beginning of the buffer.

There is also `org-export-before-parsing-hook'.

Regards,
-- 
Nicolas Goaziou


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

* Re: #+include and org-export-before-processing-hook
  2020-12-13 20:05   ` Nicolas Goaziou
@ 2020-12-13 21:24     ` Eric S Fraga
  0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2020-12-13 21:24 UTC (permalink / raw)
  To: Juan Manuel Macías; +Cc: orgmode

On Sunday, 13 Dec 2020 at 21:05, Nicolas Goaziou wrote:
> There is also `org-export-before-parsing-hook'.

<blush> missed this.  Thank you both.  Using the right hook allows me to
do what I wanted perfectly!

As always, if there's something I want to do in org, the feature is
already there.  It is simply that I am not so good at finding it...  :-)

Thanks again,
eric

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4-160-g7c8dce


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

end of thread, other threads:[~2020-12-13 21:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-13 16:28 #+include and org-export-before-processing-hook Eric S Fraga
2020-12-13 17:26 ` Juan Manuel Macías
2020-12-13 20:05   ` Nicolas Goaziou
2020-12-13 21:24     ` Eric S Fraga

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).