From unknown Tue Jun 24 15:44:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11491: 23.0.96; org-mode: in org-publish.el: #+INCLUDE: cannot deal with spaces in a filename, like this "file name.org" Resent-From: Albert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 May 2012 19:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11491 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11491@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13371978018864 (code B ref -1); Wed, 16 May 2012 19:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 May 2012 19:50:01 +0000 Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUkET-0002Iu-7u for submit@debbugs.gnu.org; Wed, 16 May 2012 15:50:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56682) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUkEQ-0002Ii-QD for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUkE8-0001E7-Ty for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE8-0001Dw-Ob for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE6-0000SA-SN for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUkE4-0001Ct-Qx for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:38 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:45286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE4-0001CT-J0 for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:36 -0400 Received: by wefh52 with SMTP id h52so930782wef.0 for ; Wed, 16 May 2012 12:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yWIM1wE5E2al5+rJxvEeqgnemn9klX/LoHze/UtAE+Y=; b=DD5tbqPbEpbeH6Wzk6KjARwBV0aYQ4G3gdHwcoKcwuwSgEGSzvK3wiCcFrzeUBWs/x aVNrvDKD8Tr7vGJlPeMc8kmuOAWQop61aW2pRAt2l9YxNnEfCHTQDjLki48iy08P7Svl +S9RrhW6H6GHjGNHM/KI1vS0+uANTT1fREgKI0cpm5d/HrOmaTtWh3GvMa+fl0Vf7jYq OBupNkiNdoMxdj1/WRTXXN/tkBdKZMwhvH+ZB35FvoJQoIGrCQcPQfar49XYmnXjITV2 8UDXKvqg6OxlC6BSd6AoBMZf0MhghA0rQyAIdkKOBgrMSdnswqN59uHs35e6UyGybW+t VegQ== MIME-Version: 1.0 Received: by 10.180.84.4 with SMTP id u4mr11205040wiy.2.1337197774523; Wed, 16 May 2012 12:49:34 -0700 (PDT) Received: by 10.216.173.141 with HTTP; Wed, 16 May 2012 12:49:34 -0700 (PDT) Date: Wed, 16 May 2012 21:49:34 +0200 Message-ID: From: Albert Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) It showed up in a quite difficult set-up, but looking at the regexp used it seems obvious the code has problems with this: in the function org-publish-cache-file-needs-publishing there is the line (the only line in org-publish containing the string "INCLUDE") (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) this tries to catch a filename, see #+INCLUDE in the org manual, if I see it correctly (and I have seen the result confirming this) the parentheses catch everything from after the first ", if there is one, up till the first space, tab, newline, carriage return or second ". Up till the first space is a problem. If needed I can try to provide a simple recipe to reproduce my problem, but I think the problem is obvious. I myself removed the ? 's after the " 's to make the " around the filename mandatory and then also removed the space after the ^, as in (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t) This solves my problem. For easy reference I have included here the whole defun: (defun org-publish-cache-file-needs-publishing (filename &optional pub-dir pub-func) "Check the timestamp of the last publishing of FILENAME. Return `t', if the file needs publishing. The function also checks if any included files have been more recently published, so that the file including them will be republished as well." (unless org-publish-cache (error "%s" "`org-publish-cache-file-needs-publishing' called, but no cache present")) (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func)) (pstamp (org-publish-cache-get key)) (visiting (find-buffer-visiting filename)) included-files-ctime buf) (when (equal (file-name-extension filename) "org") (setq buf (find-file (expand-file-name filename))) (with-current-buffer buf (goto-char (point-min)) (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) (let* ((included-file (expand-file-name (match-string 1)))) (add-to-list 'included-files-ctime (org-publish-cache-ctime-of-src included-file) t)))) ;; FIXME don't kill current buffer (unless visiting (kill-buffer buf))) (if (null pstamp) t (let ((ctime (org-publish-cache-ctime-of-src filename))) (or (< pstamp ctime) (when included-files-ctime (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) included-files-ctime)))))))))) Best regards, Albert. From unknown Tue Jun 24 15:44:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11491: 24.0.96 instead of 23.0.96 References: In-Reply-To: Resent-From: Albert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Fri, 18 May 2012 02:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11491 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: To: 11491@debbugs.gnu.org Received: via spool by 11491-submit@debbugs.gnu.org id=B11491.133730806432185 (code B ref 11491); Fri, 18 May 2012 02:28:02 +0000 Received: (at 11491) by debbugs.gnu.org; 18 May 2012 02:27:44 +0000 Received: from localhost ([127.0.0.1]:59926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVCuu-0008N4-10 for submit@debbugs.gnu.org; Thu, 17 May 2012 22:27:44 -0400 Received: from mail-we0-f172.google.com ([74.125.82.172]:57753) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVCus-0008Mq-Pg for 11491@debbugs.gnu.org; Thu, 17 May 2012 22:27:43 -0400 Received: by werb13 with SMTP id b13so174329wer.3 for <11491@debbugs.gnu.org>; Thu, 17 May 2012 19:27:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=meh75mH4qMdIbxybvThN228I3NS6Q6zF0uPD6n+Npds=; b=EajqwXBFcEGyl2Z6IT3ItKPoQLSEPlQeumeoMhAy32gZZOtbqhueuoiAaazXl+aBNm JRjrfKoUBW5JbSwosqPhWVHCM2FQkv7IU7//v0r7K/rkqaTYX1tDu35YdsYLb0XPr5Ve wYIto8gpfe5fy95zYhy8HfHIgetJJI6v/xgAx6VPFh0ueBg2YC+9y2RDLwrksdq2ReDd OH6gvd3pxcGzspt8RIDYHhyN8pj2dihLVN+pITYA3YsYVOR2msdFl54g1Z58x8JN6rI5 Y1buPRImjbamDum4FKWu7UD9hS/CVutgv+hyk6xVliNGtM5NFBZ/iU5nPnKb2co0BUE4 iucA== MIME-Version: 1.0 Received: by 10.180.85.129 with SMTP id h1mr23777348wiz.2.1337308038455; Thu, 17 May 2012 19:27:18 -0700 (PDT) Received: by 10.216.173.141 with HTTP; Thu, 17 May 2012 19:27:18 -0700 (PDT) Date: Fri, 18 May 2012 04:27:18 +0200 Message-ID: From: Albert Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) The version string has an typo in the original report. I guess it is better to send it again with the correct version in the subject. Should/Can I close this bug-report? I will try. Albert. From unknown Tue Jun 24 15:44:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11491: 24.0.96 instead of 23.0.96 Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Fri, 18 May 2012 02:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11491 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: To: Albert Cc: 11491@debbugs.gnu.org Received: via spool by 11491-submit@debbugs.gnu.org id=B11491.1337308434310 (code B ref 11491); Fri, 18 May 2012 02:34:01 +0000 Received: (at 11491) by debbugs.gnu.org; 18 May 2012 02:33:54 +0000 Received: from localhost ([127.0.0.1]:59938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVD0r-00004x-Ud for submit@debbugs.gnu.org; Thu, 17 May 2012 22:33:54 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:49302 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVD0q-00004q-0o for 11491@debbugs.gnu.org; Thu, 17 May 2012 22:33:52 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SVD0W-0005b4-02; Thu, 17 May 2012 22:33:32 -0400 From: Glenn Morris References: X-Spook: Plame spies Telex jihad Qaddafi clones Osama dictionary X-Ran: ]:f5J(,6c'"XLTu5sU/8%P?o)"Ew~4{JwLj`&}wGd+#zOwX=BXO{JxiCiYPmdL)mTX_WPK X-Hue: white X-Attribution: GM Date: Thu, 17 May 2012 22:33:31 -0400 In-Reply-To: (Albert's message of "Fri, 18 May 2012 04:27:18 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Albert wrote: > The version string has an typo in the original report. > > I guess it is better to send it again with the correct version in the > subject. > > Should/Can I close this bug-report? No, please don't close/resend it for such a reason. I doubt anyone cares about the title, but I will retitle it. From debbugs-submit-bounces@debbugs.gnu.org Thu May 17 22:35:44 2012 Received: (at control) by debbugs.gnu.org; 18 May 2012 02:35:44 +0000 Received: from localhost ([127.0.0.1]:59944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVD2e-00007u-7x for submit@debbugs.gnu.org; Thu, 17 May 2012 22:35:44 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:49318 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVD2c-00007n-HS for control@debbugs.gnu.org; Thu, 17 May 2012 22:35:43 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SVD2J-0005jI-Oa for control@debbugs.gnu.org; Thu, 17 May 2012 22:35:23 -0400 Date: Thu, 17 May 2012 22:35:23 -0400 Message-Id: Subject: control message for bug 11491 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) notfound 11491 23.0.96 found 11491 24.0.96 retitle 11491 24.0.96; org-mode: in org-publish.el: #+INCLUDE: cannot deal with spaces in a filename, like this "file name.org" From unknown Tue Jun 24 15:44:07 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Albert Subject: bug#11491: closed (Re: bug#11491: 24.0.96 instead of 23.0.96) Message-ID: References: <87zk96vtu3.fsf@altern.org> X-Gnu-PR-Message: they-closed 11491 X-Gnu-PR-Package: emacs,org-mode Reply-To: 11491@debbugs.gnu.org Date: Fri, 18 May 2012 07:21:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1337325662-31992-1" This is a multi-part message in MIME format... ------------=_1337325662-31992-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11491: 24.0.96; org-mode: in org-publish.el: #+INCLUDE: cannot deal with s= paces in a filename, like this "file name.org" which was filed against the emacs,org-mode package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11491@debbugs.gnu.org. --=20 11491: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11491 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1337325662-31992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11491-done) by debbugs.gnu.org; 18 May 2012 07:20:14 +0000 Received: from localhost ([127.0.0.1]:60079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVHTx-0008Ix-Ab for submit@debbugs.gnu.org; Fri, 18 May 2012 03:20:13 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38241) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SVHTd-0008Hu-CI for 11491-done@debbugs.gnu.org; Fri, 18 May 2012 03:20:12 -0400 Received: by wibhj6 with SMTP id hj6so2256266wib.15 for <11491-done@debbugs.gnu.org>; Fri, 18 May 2012 00:19:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type; bh=Rq7X+r37K3fUwBhIzSnFJF6OO15ynqfUZH3jXFZVItc=; b=jSarwmC+XW02NC3F1vZ2lFsupUtwcoy5WVnR1BYsCMXJeubD86pwV41bRywlEm1u33 Qvf967SuG7gedSIiwa2JJYx18LdEIogo3D9dEzrdlLeRUDZuEDth4ryDub1WAyiREAyV Zj8RseV//4utUQlziFDAmLhCT/IyBHrxZjowLtWDLtOLwGSr+vLmnfhY/NMOnVS+Ji7r mjmuXASUtGVK6WIAJptEY93lROB+mjIYid96zkcVewGzVeC18TSQkeAqcivR90SS6Dyv KcMMKlQKpChpgPlr1PicSKkKogND5Y6YoHgn9d0oO6yYhH7uGgx+HAG2f6+zsAUfU3oD I5tA== Received: by 10.180.98.201 with SMTP id ek9mr23711793wib.7.1337325568104; Fri, 18 May 2012 00:19:28 -0700 (PDT) Received: from myhost.localdomain (pha75-11-82-236-86-204.fbx.proxad.net. [82.236.86.204]) by mx.google.com with ESMTPS id fm1sm62737172wib.10.2012.05.18.00.19.26 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 18 May 2012 00:19:27 -0700 (PDT) Received: by myhost.localdomain (Postfix, from userid 1000) id 5E77D86F9; Fri, 18 May 2012 09:20:20 +0200 (CEST) From: Bastien To: Albert Subject: Re: bug#11491: 24.0.96 instead of 23.0.96 In-Reply-To: (Glenn Morris's message of "Thu, 17 May 2012 22:33:31 -0400") Organization: GNU References: User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) Date: Fri, 18 May 2012 09:20:20 +0200 Message-ID: <87zk96vtu3.fsf@altern.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11491-done Cc: Glenn Morris , 11491-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Fixed in latest Org (from git.) Quotes are now mandatory and filenames can contain spaces. Thanks for suggesting this. -- Bastien ------------=_1337325662-31992-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 May 2012 19:50:01 +0000 Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUkET-0002Iu-7u for submit@debbugs.gnu.org; Wed, 16 May 2012 15:50:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56682) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SUkEQ-0002Ii-QD for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUkE8-0001E7-Ty for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:44651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE8-0001Dw-Ob for submit@debbugs.gnu.org; Wed, 16 May 2012 15:49:40 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE6-0000SA-SN for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUkE4-0001Ct-Qx for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:38 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:45286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUkE4-0001CT-J0 for bug-gnu-emacs@gnu.org; Wed, 16 May 2012 15:49:36 -0400 Received: by wefh52 with SMTP id h52so930782wef.0 for ; Wed, 16 May 2012 12:49:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yWIM1wE5E2al5+rJxvEeqgnemn9klX/LoHze/UtAE+Y=; b=DD5tbqPbEpbeH6Wzk6KjARwBV0aYQ4G3gdHwcoKcwuwSgEGSzvK3wiCcFrzeUBWs/x aVNrvDKD8Tr7vGJlPeMc8kmuOAWQop61aW2pRAt2l9YxNnEfCHTQDjLki48iy08P7Svl +S9RrhW6H6GHjGNHM/KI1vS0+uANTT1fREgKI0cpm5d/HrOmaTtWh3GvMa+fl0Vf7jYq OBupNkiNdoMxdj1/WRTXXN/tkBdKZMwhvH+ZB35FvoJQoIGrCQcPQfar49XYmnXjITV2 8UDXKvqg6OxlC6BSd6AoBMZf0MhghA0rQyAIdkKOBgrMSdnswqN59uHs35e6UyGybW+t VegQ== MIME-Version: 1.0 Received: by 10.180.84.4 with SMTP id u4mr11205040wiy.2.1337197774523; Wed, 16 May 2012 12:49:34 -0700 (PDT) Received: by 10.216.173.141 with HTTP; Wed, 16 May 2012 12:49:34 -0700 (PDT) Date: Wed, 16 May 2012 21:49:34 +0200 Message-ID: Subject: 23.0.96; org-mode: in org-publish.el: #+INCLUDE: cannot deal with spaces in a filename, like this "file name.org" From: Albert To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) It showed up in a quite difficult set-up, but looking at the regexp used it seems obvious the code has problems with this: in the function org-publish-cache-file-needs-publishing there is the line (the only line in org-publish containing the string "INCLUDE") (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) this tries to catch a filename, see #+INCLUDE in the org manual, if I see it correctly (and I have seen the result confirming this) the parentheses catch everything from after the first ", if there is one, up till the first space, tab, newline, carriage return or second ". Up till the first space is a problem. If needed I can try to provide a simple recipe to reproduce my problem, but I think the problem is obvious. I myself removed the ? 's after the " 's to make the " around the filename mandatory and then also removed the space after the ^, as in (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"\\([^\t\n\r\"]*\\)\"[ \t]*.*$" nil t) This solves my problem. For easy reference I have included here the whole defun: (defun org-publish-cache-file-needs-publishing (filename &optional pub-dir pub-func) "Check the timestamp of the last publishing of FILENAME. Return `t', if the file needs publishing. The function also checks if any included files have been more recently published, so that the file including them will be republished as well." (unless org-publish-cache (error "%s" "`org-publish-cache-file-needs-publishing' called, but no cache present")) (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func)) (pstamp (org-publish-cache-get key)) (visiting (find-buffer-visiting filename)) included-files-ctime buf) (when (equal (file-name-extension filename) "org") (setq buf (find-file (expand-file-name filename))) (with-current-buffer buf (goto-char (point-min)) (while (re-search-forward "^#\\+INCLUDE:[ \t]+\"?\\([^ \t\n\r\"]*\\)\"?[ \t]*.*$" nil t) (let* ((included-file (expand-file-name (match-string 1)))) (add-to-list 'included-files-ctime (org-publish-cache-ctime-of-src included-file) t)))) ;; FIXME don't kill current buffer (unless visiting (kill-buffer buf))) (if (null pstamp) t (let ((ctime (org-publish-cache-ctime-of-src filename))) (or (< pstamp ctime) (when included-files-ctime (not (null (delq nil (mapcar (lambda(ct) (< ctime ct)) included-files-ctime)))))))))) Best regards, Albert. ------------=_1337325662-31992-1--