* [PATCH] ox-publish.el: Fix regexp `match' to be non-nil
@ 2017-09-22 9:51 Jens Lechtenboerger
2017-09-24 8:59 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Jens Lechtenboerger @ 2017-09-22 9:51 UTC (permalink / raw)
To: emacs-orgmode
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ox-publish.el: Fix regexp `match' to be non-nil
2017-09-22 9:51 [PATCH] ox-publish.el: Fix regexp `match' to be non-nil Jens Lechtenboerger
@ 2017-09-24 8:59 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-09-24 8:59 UTC (permalink / raw)
To: Jens Lechtenboerger; +Cc: emacs-orgmode
Hello,
Jens Lechtenboerger <lechten@wi.uni-muenster.de> writes:
> recursive publishing fails with base-extension any because a nil
> regexp is passed. The attached patch fixes this.
Thank you!
I applied a slightly different patch, with a test.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-24 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 9:51 [PATCH] ox-publish.el: Fix regexp `match' to be non-nil Jens Lechtenboerger
2017-09-24 8:59 ` 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).