Browse Source

ox-publish: No error when resolving external fuzzy links outside publishing

* lisp/ox-publish.el (org-publish-resolve-external-fuzzy-link): No
  error when resolving external fuzzy links outside publishing.  Though
  search option for these links will not be resolved.
Nicolas Goaziou 12 years ago
parent
commit
de4669d3b7
1 changed files with 5 additions and 4 deletions
  1. 5 4
      lisp/ox-publish.el

+ 5 - 4
lisp/ox-publish.el

@@ -1051,10 +1051,11 @@ Return value is a list of numbers, or nil.  This function allows
 to resolve external fuzzy links like:
 
   [[file.org::*fuzzy][description]"
-  (cdr (assoc (org-split-string
-	       (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy))
-	      (org-publish-cache-get-file-property
-	       (expand-file-name file) :numbering nil t))))
+  (when org-publish-cache
+    (cdr (assoc (org-split-string
+		 (if (eq (aref fuzzy 0) ?*) (substring fuzzy 1) fuzzy))
+		(org-publish-cache-get-file-property
+		 (expand-file-name file) :numbering nil t)))))