From 7bee47120b71c3e87e528b809d2661b6b2633c45 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Nov 2013 23:19:48 +0100 Subject: [PATCH 1/2] org-element: Update paragraph separate regexp * lisp/org-element.el (org-element-paragraph-separate): More accurate regexp. --- lisp/org-element.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index 55efb5008..61623833f 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -143,10 +143,12 @@ "$" "\\|" ;; Tables (any type). "\\(?:|\\|\\+-[-+]\\)" "\\|" - ;; Blocks (any type), Babel calls, drawers (any type), - ;; fixed-width areas and keywords. Note: this is only an - ;; indication and need some thorough check. - "[#:]" "\\|" + ;; Blocks (any type), Babel calls and keywords. Note: this + ;; is only an indication and need some thorough check. + "#\\(?:[+ ]\\|$\\)" "\\|" + ;; Drawers (any type) and fixed-width areas. This is also + ;; only an indication. + ":" "\\|" ;; Horizontal rules. "-\\{5,\\}[ \t]*$" "\\|" ;; LaTeX environments. From 3ead82a3211c011428289930c33ea9094e602312 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Nov 2013 23:31:35 +0100 Subject: [PATCH 2/2] ox-publish: Error when publishing non-existent file * lisp/ox-publish.el (org-publish-cache-ctime-of-src): Return an error when publishing a non-existent file. Suggested-by: Arne Babenhauserheide --- 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 67a57fa38..d87326d56 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -1225,8 +1225,9 @@ Returns value on success, else nil." (let ((attr (file-attributes (expand-file-name (or (file-symlink-p file) file) (file-name-directory file))))) - (+ (lsh (car (nth 5 attr)) 16) - (cadr (nth 5 attr))))) + (if (not attr) (error "No such file: \"%s\"" file) + (+ (lsh (car (nth 5 attr)) 16) + (cadr (nth 5 attr)))))) (provide 'ox-publish)