* [wish] Execute preparation-function before getting base files
@ 2015-10-10 16:55 Arun Isaac
2015-10-11 12:03 ` Eric S Fraga
0 siblings, 1 reply; 7+ messages in thread
From: Arun Isaac @ 2015-10-10 16:55 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
In org-publish-projects, it would be good if the preparation-function is
executed before getting base files using org-publish-get-base-files.
In one of my use cases, my preparation-function generates some source
files which are then to be published by the publishing-function. But,
since the base filenames are collected before the preparation-function
is executed, the publishing-function does not see the generated source
files.
Right now, I'm calling my preparation-function manually before calling
org-publish-project, but it would be nice if I didn't have to do it this
way.
Thanks,
Arun Isaac.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-10 16:55 [wish] Execute preparation-function before getting base files Arun Isaac
@ 2015-10-11 12:03 ` Eric S Fraga
2015-10-12 14:02 ` Arun Isaac
0 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2015-10-11 12:03 UTC (permalink / raw)
To: Arun Isaac; +Cc: emacs-orgmode
On Saturday, 10 Oct 2015 at 22:25, Arun Isaac wrote:
> In org-publish-projects, it would be good if the preparation-function is
> executed before getting base files using org-publish-get-base-files.
I'm not sure of the actual order of execution but it could be that one
or other of the org-export-before-{processing,parsing}-hook hooks could
do what you want?
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-11 12:03 ` Eric S Fraga
@ 2015-10-12 14:02 ` Arun Isaac
2015-10-13 19:41 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Arun Isaac @ 2015-10-12 14:02 UTC (permalink / raw)
To: Emacs orgmode
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
org-export-before-{processing,parsing} hooks are only useful when I have
existing source files and I want to modify them in some way before I
{process,parse} them. In my case, the source files don't exist at all,
before my preparation-function is run.
Regarding the preparation-function, the use case described in the manual
is for running make to update files before publishing.
http://orgmode.org/manual/Sources-and-destinations.html
Therefore, I think it makes sense only if the source filenames are collected
using org-publish-get-base-files after the preparation-function is run.
With the above logic, maybe the order of execution can actually be
considered a bug?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-12 14:02 ` Arun Isaac
@ 2015-10-13 19:41 ` Nicolas Goaziou
2015-10-14 9:45 ` Arun Isaac
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2015-10-13 19:41 UTC (permalink / raw)
To: Arun Isaac; +Cc: Emacs orgmode
Hello,
Arun Isaac <theroarofthedragon@gmail.com> writes:
> org-export-before-{processing,parsing} hooks are only useful when I have
> existing source files and I want to modify them in some way before I
> {process,parse} them. In my case, the source files don't exist at all,
> before my preparation-function is run.
>
> Regarding the preparation-function, the use case described in the manual
> is for running make to update files before publishing.
>
> http://orgmode.org/manual/Sources-and-destinations.html
>
> Therefore, I think it makes sense only if the source filenames are collected
> using org-publish-get-base-files after the preparation-function is run.
>
> With the above logic, maybe the order of execution can actually be
> considered a bug?
I made the change in master. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-13 19:41 ` Nicolas Goaziou
@ 2015-10-14 9:45 ` Arun Isaac
2015-10-14 10:41 ` Nicolas Goaziou
0 siblings, 1 reply; 7+ messages in thread
From: Arun Isaac @ 2015-10-14 9:45 UTC (permalink / raw)
To: Arun Isaac; +Cc: Emacs orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> I made the change in master.
I think a bug has been introduced by your change.
In org-publish-projects, the variable project-plist is accessed (to get
the preparation-function) before it is bound. So, I am getting a
(void-variable project-plist) error.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-14 9:45 ` Arun Isaac
@ 2015-10-14 10:41 ` Nicolas Goaziou
2015-10-14 14:59 ` Arun Isaac
0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2015-10-14 10:41 UTC (permalink / raw)
To: Arun Isaac; +Cc: Emacs orgmode
Arun Isaac <theroarofthedragon@gmail.com> writes:
> I think a bug has been introduced by your change.
>
> In org-publish-projects, the variable project-plist is accessed (to get
> the preparation-function) before it is bound. So, I am getting a
> (void-variable project-plist) error.
Oops. Fixed. Thank you.
Regards,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [wish] Execute preparation-function before getting base files
2015-10-14 10:41 ` Nicolas Goaziou
@ 2015-10-14 14:59 ` Arun Isaac
0 siblings, 0 replies; 7+ messages in thread
From: Arun Isaac @ 2015-10-14 14:59 UTC (permalink / raw)
To: Emacs orgmode
[-- Attachment #1: Type: text/plain, Size: 23 bytes --]
It works now. Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-10-14 14:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-10 16:55 [wish] Execute preparation-function before getting base files Arun Isaac
2015-10-11 12:03 ` Eric S Fraga
2015-10-12 14:02 ` Arun Isaac
2015-10-13 19:41 ` Nicolas Goaziou
2015-10-14 9:45 ` Arun Isaac
2015-10-14 10:41 ` Nicolas Goaziou
2015-10-14 14:59 ` Arun Isaac
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).