From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id yF0qHtLhF1+bFgAA0tVLHw (envelope-from ) for ; Wed, 22 Jul 2020 06:50:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cCEJGtLhF1+ASQAA1q6Kng (envelope-from ) for ; Wed, 22 Jul 2020 06:50:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 02367940429 for ; Wed, 22 Jul 2020 06:50:57 +0000 (UTC) Received: from localhost ([::1]:39606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jy8ac-0000W9-Ph for larch@yhetil.org; Wed, 22 Jul 2020 02:50:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jy8Tz-0004h8-67 for emacs-orgmode@gnu.org; Wed, 22 Jul 2020 02:44:03 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:39802) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jy8Tx-00013E-JW for emacs-orgmode@gnu.org; Wed, 22 Jul 2020 02:44:02 -0400 Received: by mail-wr1-x441.google.com with SMTP id q5so737216wru.6 for ; Tue, 21 Jul 2020 23:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=OUeaIagavhHLyzUs2zuX7nyneg25A2cqKUJZSQ5Wcpc=; b=g4WQOfbZ80mzkhlXS3YJ6nfQB45SD70szXaedzGhz9wTtq2yygriiqv7G+HlxK5q1d F1TCJ0NCH843u6ufaQhfnBZlyHTSKOGRdbsC+Kov+SK2I5EAjp/2I3JZOW1WvbSutq1X 7Uc2vzpPGptC6Y6jG55kwZr33k/kW3IXnmwpauroaXVN0u+TFFZgdjtDpHsisKuL7bE9 rrk5uKMimh/ww0T8CDRTRM5DmXeKrIUhtvhsX2HnuAGfeQXHyhbwV/3msFyrca5Krci8 rq7gjAxpoNI3w9g0PjcM4a29nCqoJNP6vOshilK19h1Kx+7+45np8wnaIgbpIjcEu3FM 01mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=OUeaIagavhHLyzUs2zuX7nyneg25A2cqKUJZSQ5Wcpc=; b=CeZ1aXS3YfiSO//h1m1P8CQ630yyVxpEzvwfhL/c7QG952qkaWob57ReftLTqS9yg+ iXHHiEgcIp3sS6nvZC1henhiTc5CuZSqralf7TWd+j/dohXuzjwFu4tlDY+Fs5369FVv 1fTZ8URBlLaX3BdEPLzgSfGEKCbY5LTNSpCTx+vzZgS73fZx7HzD3XlZ+m9pOmv9rS2E jpd6Qvx++dBivNsNJbTsPnFUfwK2VMihVo5T9mBN9XaCB8VPmRAR4Zuk91SLvL6pc508 fKzA1GVr349KYxiSB7j8Mac+3QOYt9+c1G/ifgUV91bYojJ12ih86s1X0MotGWowjYfq RUDA== X-Gm-Message-State: AOAM533OjJLPzKZQwkr8PzIgm7SGP/gFQoMeGX/uzV+LxI9I1qWtKRYM QGl4S4gjr+Cq3qSPQeXjewOvBCQ= X-Google-Smtp-Source: ABdhPJzMdynhTXDwh/ivIRN20kizSdq4pEcKfVtmBA7xg8a8xeiXNunhzuGmZJEx3Cpa2kktXPtH9w== X-Received: by 2002:adf:a19e:: with SMTP id u30mr15834000wru.274.1595400239238; Tue, 21 Jul 2020 23:43:59 -0700 (PDT) Received: from thinkpad.localdomain (avr50-1-82-241-204-20.fbx.proxad.net. [82.241.204.20]) by smtp.gmail.com with ESMTPSA id x18sm39916788wrq.13.2020.07.21.23.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 23:43:58 -0700 (PDT) From: Leo Vivier To: Kyle Meyer Subject: Re: [PATCH] org: Update example in docstring to accommodate new name and new format In-Reply-To: <87h7u0yy0p.fsf@kyleam.com> References: <87h7u0yy0p.fsf@kyleam.com> Date: Wed, 22 Jul 2020 08:43:56 +0200 Message-ID: <87imeg1237.fsf@hidden> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=leo.vivier+dev@gmail.com; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=g4WQOfbZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: +ni9vfHaMlsv --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi there, Kyle Meyer 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=E2=80=99t know about it, so I think we = could keep the mention. The example itself can go. Thanks for the review. HTH, --=20 Leo Vivier --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-Remove-useless-example-in-docstring.patch >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 --=-=-=--