]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/gnorb/gnorb-utils.el
Fix some quoting problems in doc strings
[gnu-emacs-elpa] / packages / gnorb / gnorb-utils.el
index d7f5e8651f28a73cbb2dc6277b0716e5cea8a92f..dcf2898865c4697337b7ad390b25a81714c1089c 100644 (file)
@@ -334,30 +334,33 @@ agenda. Then let the user choose an action from the value of
   "Return pretty outline path of the Org heading indicated by ID.
 
 If the KW argument is true, add the TODO keyword into the path."
-  (org-with-point-at (org-id-find id t)
-    (let ((el (org-element-at-point)))
-      (concat
-       (if kw
-          (format "(%s): "
-                  (org-element-property :todo-keyword el))
-        "")
-       (org-format-outline-path
-       (append
-        (list
-         (file-name-nondirectory
-          (buffer-file-name
-           (org-base-buffer (current-buffer)))))
-        (org-get-outline-path)
-        (list
-         (replace-regexp-in-string
-          org-bracket-link-regexp
-          "\\3" (org-element-property :raw-value el)))))))))
+  (let ((pt (org-id-find id t)))
+    (if pt
+       (org-with-point-at pt
+         (let ((el (org-element-at-point)))
+           (concat
+            (if kw
+                (format "(%s): "
+                        (org-element-property :todo-keyword el))
+              "")
+            (org-format-outline-path
+             (append
+              (list
+               (file-name-nondirectory
+                (buffer-file-name
+                 (org-base-buffer (current-buffer)))))
+              (org-get-outline-path)
+              (list
+               (replace-regexp-in-string
+                org-bracket-link-regexp
+                "\\3" (org-element-property :raw-value el))))))))
+      "[none]")))
 
 (defun gnorb-scan-links (bound &rest types)
   "Scan from point to BOUND looking for links of type in TYPES.
 
-TYPES is a list of symbols, possible values include 'bbdb, 'mail,
-and 'gnus."
+TYPES is a list of symbols, possible values include `bbdb', `mail',
+and `gnus'."
   ;; this function could be refactored somewhat -- lots of code
   ;; repetition. It also should be a little faster for when we're
   ;; scanning for gnus links only, that's a little slow. We should