all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Vivier <leo.vivier+dev@gmail.com>
To: Kyle Meyer <kyle@kyleam.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org: Update example in docstring to accommodate new name and new format
Date: Wed, 22 Jul 2020 08:43:56 +0200	[thread overview]
Message-ID: <87imeg1237.fsf@hidden> (raw)
In-Reply-To: <87h7u0yy0p.fsf@kyleam.com>

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

Hi there,

Kyle Meyer <kyle@kyleam.com> writes:

> Anyway, in my view the example doesn't really add much value.  What do
> you think about just removing it?

Yeah, I agree.  I thought it was an interesting way to discover
`condition-case' for those who didn’t know about it, so I think we could
keep the mention.  The example itself can go.

Thanks for the review.

HTH,

-- 
Leo Vivier

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-Remove-useless-example-in-docstring.patch --]
[-- Type: text/x-patch, Size: 1687 bytes --]

From 48b50f0ebb5d21ca6b337d78a16a203888161d43 Mon Sep 17 00:00:00 2001
From: Leo Vivier <leo.vivier+dev@gmail.com>
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


  reply	other threads:[~2020-07-22  6:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 20:23 [PATCH] org: Update example in docstring to accommodate new name and new format Leo Vivier
2020-07-21  5:41 ` Leo Vivier
2020-07-22  4:27 ` Kyle Meyer
2020-07-22  6:43   ` Leo Vivier [this message]
2020-07-23  3:40     ` Kyle Meyer
2020-07-23  5:48       ` Leo Vivier
2020-07-23 23:27         ` Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imeg1237.fsf@hidden \
    --to=leo.vivier+dev@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kyle@kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.