From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] lisp/ox-publish.el: Handle includes with searches Date: Tue, 29 Dec 2015 22:17:02 +0100 Message-ID: <87ziwtneep.fsf@nicolasgoaziou.fr> References: <1447538173-45139-1-git-send-email-nick@ausimian.net> <87fuzx9di7.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE1bq-00016x-HE for emacs-orgmode@gnu.org; Tue, 29 Dec 2015 16:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aE1bp-00081M-Io for emacs-orgmode@gnu.org; Tue, 29 Dec 2015 16:15:10 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:39518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aE1bp-00081I-CP for emacs-orgmode@gnu.org; Tue, 29 Dec 2015 16:15:09 -0500 In-Reply-To: (aman's message of "Tue, 29 Dec 2015 01:35:10 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: aman Cc: emacs-orgmode@gnu.org Hello, aman 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. > > org-publish-cache-ctime-of-src: No such file: > "/home/emacs/gtd/inbox.org::writing" > > > here's the including block: > > * including file > #+INCLUDE: "../../inbox.org::writing blog" :only-contents t > > > 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