emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice
       [not found] ` <99056495-17e4-4cc4-86e7-9e506f2a100c@default>
@ 2017-12-01 18:46   ` Nicolas Goaziou
  2017-12-01 20:58     ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Goaziou @ 2017-12-01 18:46 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19914

Hello,

Drew Adams <drew.adams@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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice
  2017-12-01 18:46   ` bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice Nicolas Goaziou
@ 2017-12-01 20:58     ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-12-01 20:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: 19914-done

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Drew Adams <drew.adams@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.

Closing this bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-01 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <c8abaaad-c214-4135-bdec-27c41ca3bda9@default>
     [not found] ` <99056495-17e4-4cc4-86e7-9e506f2a100c@default>
2017-12-01 18:46   ` bug#19914: 25.0.50; `org-store-link' invokes function to add to `org-store-link-functions' twice Nicolas Goaziou
2017-12-01 20:58     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).