diff --git a/lisp/org-element.el b/lisp/org-element.el index 57e26ffb5..bbc0f3862 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -144,10 +144,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. diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index cfa796743..4775e08ee 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -1226,8 +1226,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)