emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Inconsistency between org-store-link-functions and org-store-link
Date: Fri, 06 Nov 2015 21:26:10 +0100	[thread overview]
Message-ID: <8737wig9i5.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87ziyrt2b2.fsf@gmail.com> (Aaron Ecay's message of "Fri, 06 Nov 2015 18:23:13 +0000")

Hello,

Aaron Ecay <aaronecay@gmail.com> writes:

> The docstring of org-store-link-functions says: “Each function will be
> called in turn until one returns a non-nil value.”  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’s 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,

-- 
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.

  reply	other threads:[~2015-11-06 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 18:23 Inconsistency between org-store-link-functions and org-store-link Aaron Ecay
2015-11-06 20:26 ` Nicolas Goaziou [this message]
2015-11-07 12:47   ` Aaron Ecay
2015-11-07 16:14     ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737wig9i5.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).