From 48b50f0ebb5d21ca6b337d78a16a203888161d43 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Mon, 20 Jul 2020 22:11:15 +0200 Subject: [PATCH] org: Remove useless example in docstring * lisp/org.el (org-find-olp): Remove useless example in docstring --- lisp/org.el | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 12a853bd6..9ac513d0c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -13490,29 +13490,23 @@ completion." '((effort . identity) (effort-minutes . org-duration-to-minutes)) nval) (when (string= org-clock-current-task heading) (setq org-clock-effort nval) (org-clock-update-mode-line))) (run-hook-with-args 'org-property-changed-functions key nval))) (defun org-find-olp (path &optional this-buffer) "Return a marker pointing to the entry at outline path OLP. -If anything goes wrong, throw an error. -You can wrap this call to catch the error like this: - - (condition-case msg - (org-mobile-locate-entry (match-string 4)) - (error (nth 1 msg))) - -The return value will then be either a string with the error message, -or a marker if everything is OK. +If anything goes wrong, throw an error, and if you need to do +something based on this error, you can catch it with +`condition-case'. If THIS-BUFFER is set, the outline path does not contain a file, only headings." (let* ((file (if this-buffer buffer-file-name (pop path))) (buffer (if this-buffer (current-buffer) (find-file-noselect file))) (level 1) (lmin 1) (lmax 1) end found flevel) (unless buffer (error "File not found :%s" file)) -- 2.26.2