From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Inconsistency between org-store-link-functions and org-store-link Date: Fri, 06 Nov 2015 21:26:10 +0100 Message-ID: <8737wig9i5.fsf@nicolasgoaziou.fr> References: <87ziyrt2b2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZunYg-0000s0-MZ for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 15:24:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZunYf-0008DG-Qj for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 15:24:26 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:41987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZunYf-0008BO-KW for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 15:24:25 -0500 Received: from selenimh (unknown [IPv6:2a01:6600:8080:9601::2de]) (Authenticated sender: mail@nicolasgoaziou.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 8D418172077 for ; Fri, 6 Nov 2015 21:24:24 +0100 (CET) In-Reply-To: <87ziyrt2b2.fsf@gmail.com> (Aaron Ecay's message of "Fri, 06 Nov 2015 18:23:13 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: orgmode Hello, Aaron Ecay writes: > The docstring of org-store-link-functions says: =E2=80=9CEach function wi= ll be > called in turn until one returns a non-nil value.=E2=80=9D However, the = code of > org-store-link actually calls all the functions, and if more than one > returns a non-nil value raises a prompt asking the user to choose (and > then calls that function a second time). > > Should we change the code to match the doc, or vice versa? The former, IMO. > Aaron > > PS I vote for keeping the semantics described in the doc, because the > current implementation=E2=80=99s double calling of the selected function > means that store-link functions that have side effects will behave > unpredictably. Imagine a store-link function for image buffers that > uploads the buffer to imgur or a similar hosting site, and stores the > http url of the uploaded file. The current implementation would > upload the image twice. I agree. Regards, --=20 Nicolas Goaziou P.S: next release is AFAIK "8.4", not "9.0", you may want to update your recent changes advertising the latter. Thank you.