emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jens Lechtenboerger <lechten@wi.uni-muenster.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] ox-publish.el: Fix regexp `match' to be non-nil
Date: Fri, 22 Sep 2017 11:51:52 +0200	[thread overview]
Message-ID: <871smzkqmf.fsf@wi.uni-muenster.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

Hi there,

recursive publishing fails with base-extension any because a nil
regexp is passed.  The attached patch fixes this.

Best wishes
Jens

P.S. I did the necessary paperwork (copyright assignment) for Emacs.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-publish.el-Fix-regexp-match-to-be-non-nil.patch --]
[-- Type: text/x-diff, Size: 1160 bytes --]

From 6584a78c350016e39c199bb61d203bc12c0c4c53 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jens=20Lechtenb=C3=B6rger?= <jens.lechtenboerger@fsfe.org>
Date: Fri, 22 Sep 2017 11:30:13 +0200
Subject: [PATCH] ox-publish.el: Fix regexp `match' to be non-nil

* lisp/ox-publish.el (org-publish-get-base-files): Make sure `match'
is a string (not nil) before calling `directory-files-recursively'.
---
 lisp/ox-publish.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 753176b..b592bc9 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -435,8 +435,9 @@ This splices all the components into the list."
   (let* ((base-dir (file-name-as-directory
 		    (org-publish-property :base-directory project)))
 	 (extension (or (org-publish-property :base-extension project) "org"))
-	 (match (and (not (eq extension 'any))
-		     (concat "^[^\\.].*\\.\\(" extension "\\)$")))
+	 (match (or (and (not (eq extension 'any))
+			 (concat "^[^\\.].*\\.\\(" extension "\\)$"))
+		    ""))
 	 (base-files
 	  (cl-remove-if #'file-directory-p
 			(if (org-publish-property :recursive project)
-- 
2.1.4


             reply	other threads:[~2017-09-22  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22  9:51 Jens Lechtenboerger [this message]
2017-09-24  8:59 ` [PATCH] ox-publish.el: Fix regexp `match' to be non-nil 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=871smzkqmf.fsf@wi.uni-muenster.de \
    --to=lechten@wi.uni-muenster.de \
    --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).