emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ido, org-insert-link, and completion based on link description
@ 2022-09-06 14:34 Max Nikulin
  2022-09-10 11:04 ` [PATCH] ol.el: Restore complete by description for insert link Max Nikulin
  0 siblings, 1 reply; 5+ messages in thread
From: Max Nikulin @ 2022-09-06 14:34 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Does anyone have an idea why it was necessary to drop completion of 
stored links based on their description for the sake of ido?

I am not an ido user, so I am surprised that such feature negatively 
affected usability. I mean the commit

7f096ad37 2012-10-12 14:39:53 +1100 Tony Day: org-insert-link: Use ido 
when inserting links
https://list.orgmode.org/04D0E787-A8A1-4246-8DD2-D607E38D61BA@gmail.com/T/#u

> -		      (mapcar 'cadr org-stored-links))

If I read the code correctly, Bastien added this line to include link 
descriptions to the completion list in response to

Yagnesh Raghava Yakkala. #+LABEL and CUSTOM_ID with reftex. Mon, 21 May 
2012 04:45:29 +0900
https://list.orgmode.org/877gw6ocva.fsf@okhotsk19.lowtem.hokudai.ac.jp/T/#u

https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1e34c5d34
2012-08-03 14:08:20 +0200 Bastien Guerry: org.el: Fontify links to 
current buffer when inserting a link.

The only issue I suspect is that `org-store-link' may add to the list of 
stored links entries with identical path and description causing 
duplicated completion options, but it may be solved in another way.

 From my point of view, currently the code of `org-insert-link' related 
to `auto-desc' is completely confusing. It was added to allow 
description completion, but it was not removed in the commit related to 
ido. It is rather inconsistent, so it may be unintentional.


P.S. My question is related to the following threads:
- Carlos Pita. Adding target and custom id links doesn't ask for 
description. Tue, 2 Aug 2022 14:44:58 -0300. 
https://list.orgmode.org/D99A712C-18D1-4A4F-8093-35A0BFB469C4@gmail.com
- Max Nikulin. Re: Bug: org-store-link uses CUSTOM_ID instead of target 
point. Sat, 6 Nov 2021 19:51:29 +0700. 
https://list.orgmode.org/e2c807a7-1924-6f08-9e63-4f70aee9d3b5@gmail.com

I decided to start a new thread to concentrate on ido, link completion 
by their description, and the `auto-desc' variable.



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

end of thread, other threads:[~2022-09-11 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 14:34 ido, org-insert-link, and completion based on link description Max Nikulin
2022-09-10 11:04 ` [PATCH] ol.el: Restore complete by description for insert link Max Nikulin
2022-09-10 19:19   ` Tim Cross
2022-09-11 12:02     ` Ihor Radchenko
2022-09-11 11:48   ` Ihor Radchenko

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