Ihor Radchenko <yanta...@posteo.net> writes:

> * lisp/ol.el (org-link-store-existing): New customization controlling
> how to deal with already stored links.
> (org-store-link): Respect the new customization, allowing duplicates
> to (1) be added anyway; (2) be ignored; (3) be moved to front of
> `org-stored-links'.  The default is (3).
> * etc/ORG-NEWS (~org-store-link~ now moves an already stored link to
> front of the ~org-stored-links~): Document the breaking change.

I'm not sure what is the real world use-case for allowing storing the
same link several times.  Maybe one was provided, but I missed it.

I believe the new default behavior makes a lot of sense, thanks for
implementing this.

I'm skeptical about the need for a new dedicated option, though.

The current single universal prefix argument seems not that useful ("A
single `C-u' negates `org-context-in-file-links' for file links or
`org-gnus-prefer-web-links' for links to Usenet articles.") and we
could use it to force storing duplicates, which is more useful.

Here is the suggested new behavior, also modifying other universal
prefix args:

- M-x org-stored-links     : don't store dups, move upfront if dup
- C-u M-x org-stored-links : force storing the link, even if dup
- [2 universal prefix arg] : negates ‘org-context-in-file-links’, etc
- [3 universal prefix arg] : forces skipping storing functions
  that are not part of Org core.

The current behavior for 3 prefix args should be the default when the
region is active.

WDYT?

-- 
 Bastien

Reply via email to