emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-orgmode@gnu.org
Subject: ido, org-insert-link, and completion based on link description
Date: Tue, 6 Sep 2022 21:34:12 +0700	[thread overview]
Message-ID: <tf7lp4$5ha$1@ciao.gmane.io> (raw)


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

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

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. 
- Max Nikulin. Re: Bug: org-store-link uses CUSTOM_ID instead of target 
point. Sat, 6 Nov 2021 19:51:29 +0700. 

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

             reply	other threads:[~2022-09-06 14:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 14:34 Max Nikulin [this message]
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

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:

  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='tf7lp4$5ha$1@ciao.gmane.io' \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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