GNU bug report logs - #19914
25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice

Previous Next

Package: org-mode;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sat, 21 Feb 2015 17:38:02 UTC

Severity: normal

Found in version 25.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 19914 <at> debbugs.gnu.org
Subject: bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice
Date: Fri, 01 Dec 2017 19:46:48 +0100
Hello,

Drew Adams <drew.adams <at> oracle.com> 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.

Thank you.

Regrads,

-- 
Nicolas Goaziou                                                0x80A93738




This bug report was last modified 7 years and 226 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.