* Bug: Determining file name of included files for ox-publish caching
@ 2018-01-18 18:19 Joseph Carter Osborn
2018-01-18 22:44 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Carter Osborn @ 2018-01-18 18:19 UTC (permalink / raw)
To: emacs-orgmode
I have an org-mode document that imports sections from other org-mode
documents, like so:
#+BEGIN_QUOTE
* Part 1
#+INCLUDE: "./other.org::*Heading"
# and so on
#+END_QUOTE
I set up publishing for this document and encounter errors like this in
my *messages* buffer:
#+BEGIN_QUOTE
org-publish-cache-ctime-of-src: No such file: "/Users/jcosborn/path/to/project/“./other.org"
#+END_QUOTE
If I leave off the "::*..." component of the include I have no such
errors. I believe the culprit is the capture in the regular expression
on ox-publish.el:1173, but I'm not sure why the bug exhibits in this
particular way with the stray quote being thrown into the string.
It seems like the regular expression should treat included org files
specially and split the string to avoid treating searches as part of the
file.
A minimal example has two org files "including.org" and "included.org",
where "included.org" has a heading "* Hello" and "including.org" just
has '#+INCLUDE: "./included.org::*Hello"'.
Then set up a trivial project like:
#+BEGIN_SRC elisp
(setq org-publish-project-alist
'(("test"
:base-directory "~/test/"
:publishing-directory "~/test/"
:publishing-function org-latex-publish-to-latex)))
#+END_SRC
and try to publish it, or run:
#+BEGIN_SRC elisp
(org-publish-cache-file-needs-publishing "including.org")
#+END_SRC
And you, too, should encounter the same error.
For now I will work around it by turning off caching, but I do like the
caching feature so I hope to be able to use it again someday.
Emacs : GNU Emacs 25.3.1 (x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
of 2017-09-13
Package: Org mode version 9.1.6 (9.1.6-16-g86a382-elpaplus @ /Users/jcosborn/.emacs.d/elpa/org-plus-contrib-20180115/)
Thanks to the mailing list, as always, for being such an excellent
resource!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: Determining file name of included files for ox-publish caching
2018-01-18 18:19 Bug: Determining file name of included files for ox-publish caching Joseph Carter Osborn
@ 2018-01-18 22:44 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-01-18 22:44 UTC (permalink / raw)
To: Joseph Carter Osborn; +Cc: emacs-orgmode
Hello,
Joseph Carter Osborn <jcosborn@ucsc.edu> writes:
> I have an org-mode document that imports sections from other org-mode
> documents, like so:
>
> #+BEGIN_QUOTE
>
> * Part 1
> #+INCLUDE: "./other.org::*Heading"
> # and so on
>
> #+END_QUOTE
>
>
> I set up publishing for this document and encounter errors like this in
> my *messages* buffer:
>
> #+BEGIN_QUOTE
> org-publish-cache-ctime-of-src: No such file: "/Users/jcosborn/path/to/project/./other.org"
> #+END_QUOTE
>
>
> If I leave off the "::*..." component of the include I have no such
> errors. I believe the culprit is the capture in the regular expression
> on ox-publish.el:1173, but I'm not sure why the bug exhibits in this
> particular way with the stray quote being thrown into the string.
> It seems like the regular expression should treat included org files
> specially and split the string to avoid treating searches as part of the
> file.
>
> A minimal example has two org files "including.org" and "included.org",
> where "included.org" has a heading "* Hello" and "including.org" just
> has '#+INCLUDE: "./included.org::*Hello"'.
>
> Then set up a trivial project like:
>
> #+BEGIN_SRC elisp
> (setq org-publish-project-alist
> '(("test"
> :base-directory "~/test/"
> :publishing-directory "~/test/"
> :publishing-function org-latex-publish-to-latex)))
> #+END_SRC
>
>
> and try to publish it, or run:
>
> #+BEGIN_SRC elisp
> (org-publish-cache-file-needs-publishing "including.org")
> #+END_SRC
>
> And you, too, should encounter the same error.
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-18 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-18 18:19 Bug: Determining file name of included files for ox-publish caching Joseph Carter Osborn
2018-01-18 22:44 ` Nicolas Goaziou
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).