From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id CGZDFxOa1V86XAAA0tVLHw (envelope-from ) for ; Sun, 13 Dec 2020 04:35:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id VPEHExOa1V/mJwAAB5/wlQ (envelope-from ) for ; Sun, 13 Dec 2020 04:35:31 +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 BA1A29406F7 for ; Sun, 13 Dec 2020 04:35:28 +0000 (UTC) Received: from localhost ([::1]:43710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koJ6V-00012X-NN for larch@yhetil.org; Sat, 12 Dec 2020 23:35:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1koJ66-00012O-JD for emacs-orgmode@gnu.org; Sat, 12 Dec 2020 23:35:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1koJ66-0006Pc-B7 for emacs-orgmode@gnu.org; Sat, 12 Dec 2020 23:35:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1koJ66-00020v-7u for emacs-orgmode@gnu.org; Sat, 12 Dec 2020 23:35:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45212: org-capture user-error: Abort Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: emacs-orgmode@gnu.org Resent-Date: Sun, 13 Dec 2020 04:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45212 X-GNU-PR-Package: org-mode X-GNU-PR-Keywords: To: daniela-spit@gmx.it Received: via spool by 45212-submit@debbugs.gnu.org id=B45212.16078340447666 (code B ref 45212); Sun, 13 Dec 2020 04:35:02 +0000 Received: (at 45212) by debbugs.gnu.org; 13 Dec 2020 04:34:04 +0000 Received: from localhost ([127.0.0.1]:47260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koJ5A-0001za-Aq for submit@debbugs.gnu.org; Sat, 12 Dec 2020 23:34:04 -0500 Received: from mail-pj1-f47.google.com ([209.85.216.47]:50872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1koJ58-0001z3-N9 for 45212@debbugs.gnu.org; Sat, 12 Dec 2020 23:34:03 -0500 Received: by mail-pj1-f47.google.com with SMTP id lj6so3013710pjb.0 for <45212@debbugs.gnu.org>; Sat, 12 Dec 2020 20:34:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=QL0zd6+2DuFluv706HuHAS2xDlL4Rbh3xQCceOHrX+c=; b=c6BRzY7UNVq/1qs+wimJGgs5KFQgpl5bSG6AlQO1ccjY96ACKK/1sjzvPYBdxg4SOY N5XXVAK3RPM5G2rLP/1zV3KAMLzqvfkmQV28RVXOvKtCrsVkD3LnFw5CA4Ml9koKOg/u zHO7Z7diCat+6yX3hrRqU2EPZWUdMKA9sXdRqQ9w7KxKb7C5BU0Zx6C3/Im1d6hJ/so/ IFXEIqgGKOKGiUvebwfqXt3XxYauIC46bRmAdP6PzqTlNvb3NHpDL8zUKDeM/QaXNkk/ 5v4kwReFO+oTPRh4d1AB4q19d5xyFjsrdg7FW/xIgBGAy5JdXxtfEAXnGv4YrkoYBBkZ /NCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=QL0zd6+2DuFluv706HuHAS2xDlL4Rbh3xQCceOHrX+c=; b=OTD3McFoYFoh+uF/I50ZNWkZvT7ZVslvk5K2mYlO3Qw8RtyGVt7XuBoSo0g6lG4iRb GeYyluYYnq4q24+H7/TBNHlal8rUf18pUY///JR3RUYFf+dFiokwdisORjkwRoxiGY83 smntoXXm8QqpGAVNUUcuG34sSoH3/zTRVm/Y7Pg5aH/0PdXnqjrttVo4nIUXWfHx6RHI hLXegKkW8RK82rt7aH2N3LQWrB3hYrYwluSvuAYvtMpovQ9KcDW9lf9RwAKRojLuUquY NInA/qMMSno7nmhFNFHhSO1kfwp2vHrEOrCeRV5qYSW3F0LYAQslksqewSzQul8LaruV NeNg== X-Gm-Message-State: AOAM53315fU3JHQlRCrsKEQ7vghVxZcaTNR4XzJeUKHhDADa+fNEvsAj mlmoX9cTJnx1swUbIFriL00= X-Google-Smtp-Source: ABdhPJw0oQNwP7GAH6n3P8Mxt4iKl+taKRGyJG/I4yGv0hhhs60l72iepTFnMJu/hdjkHl4gYQ1mCw== X-Received: by 2002:a17:902:bf44:b029:da:d0ee:cef with SMTP id u4-20020a170902bf44b02900dad0ee0cefmr14110662pls.12.1607834036095; Sat, 12 Dec 2020 20:33:56 -0800 (PST) Received: from localhost ([50.7.251.66]) by smtp.gmail.com with ESMTPSA id y5sm16525587pfp.45.2020.12.12.20.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Dec 2020 20:33:55 -0800 (PST) From: Ihor Radchenko In-Reply-To: References: <87sg8a5x98.fsf@localhost> <87bley5sfo.fsf@localhost> Date: Sun, 13 Dec 2020 12:37:45 +0800 Message-ID: <878sa25nja.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45212@debbugs.gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.70 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=c6BRzY7U; 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-Migadu-Queue-Id: BA1A29406F7 X-Spam-Score: -0.70 X-Migadu-Scanner: scn1.migadu.com X-TUID: b+vY7PJqErXi daniela-spit@gmx.it writes: > Can't one throw a capture abort signal instead? Sure, that is possible. However, consider a possibility that some external package wants to detect when capture is aborted. If I was writing such package, I would need to do something like (condition-case err (t )) If org-capture is rewritten using catch-throw, the above code would be broken. Also, there will be no easy way for a user to know if the capture was completed successfully or if it was aborted. Note that I do not oppose this change too firmly. I agree that throw (or even just normal exit) would be cleaner. However, changing user-error to throw may break external packages and should be considered carefully. On the other hand, user-error is internal detail of the implementation. So, changing it should not be a big deal. As a precaution, it can be announced and implemented as a part of major release. If you want this change to happen, I suggest to provide the patch. This will encourage the maintainers to provide feedback. > What case scenarios would rely > on user quitting capture rather than going ahead with an entry? For example, I have a custom capture function from email. The email is removed from inbox upon capture. However, I would not want to proceed with removal if capture is aborted for whatever reason. Best, Ihor