From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: aman <aman_yang@163.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/ox-publish.el: Handle includes with searches
Date: Tue, 29 Dec 2015 22:17:02 +0100 [thread overview]
Message-ID: <87ziwtneep.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <loom.20151229T022229-676@post.gmane.org> (aman's message of "Tue, 29 Dec 2015 01:35:10 +0000 (UTC)")
Hello,
aman <aman_yang@163.com> writes:
> I was using org-publish which was already applied with this patch.
> but I got following error message when I published an org file including
> another one.
> <error message>
> org-publish-cache-ctime-of-src: No such file:
> "/home/emacs/gtd/inbox.org::writing"
> </error>
>
> here's the including block:
> <block>
> * including file
> #+INCLUDE: "../../inbox.org::writing blog" :only-contents t
> </block>
>
> This patch works fine if there's spaces between "inbox.org" and
> "::writing blog".
Indeed.
> - (string-match "^\\(\".+?\"\\|\\S-+\\)" value)
> - ;; Ignore search suffix.
> - (car (split-string
> - (org-remove-double-quotes
> - (match-string 1 value)))))))))
> + (string-match "^\\(\".+?\"\\|\\S-+\\)\\(?:\\s-+\\|$\\)" value)
> + (let ((matched (match-string 1 value)))
> + (when (string-match "\\(::\\(.*?\\)\\)\"?\\'"
> + matched)
> + (setq matched
> + (replace-match "" nil nil matched 1))
> + (print matched))
> + (org-remove-double-quotes matched))
> + )))))
You should remove (print matched). Also, parenthesis should not be alone
on their own line.
I suggest to replace it with:
(let ((matched (match-string 1 value)))
(org-remove-double-quotes
(if (string-match "\\(::\\(.*?\\)\\)\"?\\'" matched)
(substring matched 0 (match-beginning 0))
matched)))
> (when included-file
> - (push (org-publish-cache-ctime-of-src
> + (push (org-publish-cache-ctime-oef-src
Typo.
Eventually, could you provide an appropriate commit message?
Thank you.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2015-12-29 21:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-14 21:56 [PATCH] lisp/ox-publish.el: Handle includes with searches Nick Gunn
2015-11-23 11:11 ` Nicolas Goaziou
2015-12-29 1:35 ` aman
2015-12-29 21:17 ` Nicolas Goaziou [this message]
2015-12-30 6:44 ` aman
2015-12-30 9:20 ` Nicolas Goaziou
2015-12-30 11:28 ` aman
2015-12-30 23:35 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziwtneep.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=aman_yang@163.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).