From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Inconsistency between org-store-link-functions and org-store-link Date: Fri, 06 Nov 2015 18:23:13 +0000 Message-ID: <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]:37446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZulfT-0006Nc-D4 for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 13:23:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZulfQ-0004PH-7l for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 13:23:19 -0500 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:33864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZulfQ-0004P1-2B for emacs-orgmode@gnu.org; Fri, 06 Nov 2015 13:23:16 -0500 Received: by wikq8 with SMTP id q8so35445837wik.1 for ; Fri, 06 Nov 2015 10:23:15 -0800 (PST) Received: from localhost (natvip7.york.ac.uk. [144.32.240.7]) by smtp.gmail.com with ESMTPSA id l1sm170939wmg.21.2015.11.06.10.23.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2015 10:23:14 -0800 (PST) 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 all, The docstring of org-store-link-functions says: =E2=80=9CEach function will= be called in turn until one returns a non-nil value.=E2=80=9D However, the co= de 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? 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. --=20 Aaron Ecay