emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: what is the purpose of "This link has already been store


From: Bastien
Subject: Re: [PATCH] Re: what is the purpose of "This link has already been stored"?
Date: Sun, 06 Aug 2023 20:47:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@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

[Prev in Thread] Current Thread [Next in Thread]