From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice Date: Fri, 01 Dec 2017 21:58:37 +0100 Message-ID: <87374uf9mq.fsf@nicolasgoaziou.fr> References: <99056495-17e4-4cc4-86e7-9e506f2a100c@default> <87h8taguav.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eKsOp-00035M-8N for emacs-orgmode@gnu.org; Fri, 01 Dec 2017 15:59:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eKsOk-0003rz-UC for emacs-orgmode@gnu.org; Fri, 01 Dec 2017 15:59:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:60143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eKsOk-0003rn-RF for emacs-orgmode@gnu.org; Fri, 01 Dec 2017 15:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eKsOk-0004j9-E0 for emacs-orgmode@gnu.org; Fri, 01 Dec 2017 15:59:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87h8taguav.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 01 Dec 2017 19:46:48 +0100") 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" To: Drew Adams Cc: 19914-done@debbugs.gnu.org Nicolas Goaziou writes: > Hello, > > Drew Adams writes: > >>> This means that it will have done its thing TWICE: once just to check >>> whether it should/could do its thing and another time so that it does >>> its thing. >> >> Also, the doc of `org-store-link-functions' says nothing about the >> function being called twice. It says only: >> >> "Each function should check if it is responsible for creating >> this link (for example by looking at the major mode). >> If not, it must exit and return nil. >> If yes, it should return a non-nil value after a calling >> `org-store-link-props' with a list of properties and values." >> >> (And "a calling" is a typo - it should be "calling".) >> >> This doc is essentially a spec telling you what a function for this >> list should do. From the doc, its purpose is to (a) check whether >> it should call `org-store-link-props' and (b) if so, call it and >> return non-nil, else return nil (without calling it). >> >> Nothing suggests that the function, if invoked to define a link, >> will be invoked twice: once for (a) (even though (b) will also be >> done then) and a second time for (b). > > This function no longer invokes twice the function used to create the > link. Closing this bug.