Explorar el Código

Fix `org-display-inline-images'

* lisp/org.el (org-display-inline-images): Fix regexp.

Reported-by: Leslie Watter <watter@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00455.html>
Nicolas Goaziou hace 7 años
padre
commit
8860fe2938
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      lisp/org.el

+ 3 - 3
lisp/org.el

@@ -19335,9 +19335,9 @@ boundaries."
 	    ;; "file:" links.  Also check link abbreviations since
 	    ;; some might expand to "file" links.
 	    (file-types-re (format "[][]\\[\\(?:file\\|[./~]%s\\)"
-				   (and link-abbrevs
-					(format "\\|\\(?:%s:\\)"
-						(regexp-opt link-abbrevs))))))
+				   (if (not link-abbrevs) ""
+				     (format "\\|\\(?:%s:\\)"
+					     (regexp-opt link-abbrevs))))))
        (while (re-search-forward file-types-re end t)
 	 (let ((link (save-match-data (org-element-context))))
 	   ;; Check if we're at an inline image, i.e., an image file