emacs-orgmode
[Top][All Lists]
Advanced

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

Re: org-insert-link completion by description (Re: what is the purpose o


From: Samuel Wales
Subject: Re: org-insert-link completion by description (Re: what is the purpose of "This link has already been stored"?)
Date: Tue, 4 Jul 2023 17:10:33 -0700

On 7/4/23, Ihor Radchenko <yantar92@posteo.net> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>>> -UUU:**--F1  *Org Links*    Top L1     (Fundamental)
>>
>> this buffer contains nothing useful and shortens the above buffer.
>
> This is fine. I assume that you can simply hide it away using
> `display-buffer-alist'.

i have struggled with this in a wider context and gotten nowhere for years.

>
>> ---------------
>>> http:                      https:
>>> id:                        id:e69336ca-ca50-4535-9bad-63a31e030f31
>>> info:                      irc:
>>> mailto:                    mhe:
>>> news:                      rmail:
>>> shell:                     title
>>> w3m:
>>
>> these prefixes like http: i do not understand thier use.  i want
>> descriptions of headings.  the id link is not one.
>
> Org shows link prefixes, stored links, and link description in the
> completion. The relevant code in `org-insert-link' is:

what is the purpose of the prefixes?

where is the description in this case?  was it a bare link?  that is
unusual for an id link.

>
> (org-completing-read
>                  "Link: "
>                  (append
>                   (mapcar (lambda (x) (concat x ":")) all-prefixes)
>                   (mapcar #'car org-stored-links)
>                     ;; Allow description completion.  Avoid "nil" option
>                     ;; in the case of `completing-read-default' and
>                     ;; an error in `ido-completing-read' when some links
>                     ;; have no description.
>                     (delq nil (mapcar 'cadr org-stored-links)))
>                  nil nil nil
>                  'org-link--history
>                  (caar org-stored-links))
>
>>> Notice that "title" is present among the completion options.
>>
>> title does not show in my case and nots ure the signiricance.  i use
>> large fonts.  that might or might nto be relevant.
>
> Completing descriptions feature has been added by Max 10 months ago - it
> is a fairly recent addition:

please note that it is of course not my intention to criticize anybody
or anybody's code.  merely saying what i need.  max is trying to be
helpful.  iu am not even sure how we got on this topic as my original
report was the already stored bug.

in the context of mindless store/insert, which is what i do most
frequently, if the most recently stored is set to the completion
default, this topic is moot as presumably others agree this is
desirable.  in the context of choosing a different link from the
default, the short url-like prefixes being there in front of specific
links confuses me.

for me, i just want the original buffer where you are pasting, and
minibuffer completion.  only.


then there is the more fancy question of grabbing random links from
all over your org files in order to paste them all in one place which
i will not cover here.

>
> 0432f4fe6ba9b07c17ac555beab1527d8f844234
> Author:     Max Nikulin <manikulin@gmail.com>
> ol.el: Restore complete by description for insert link
>
> * lisp/ol.el (org-insert-link): Allow completion of link target by its
> description.  Almost certainly the feature was removed unintentionally.

definitely in favor of copleting by the description of the link.
htank you for any effort toward that.

>
> This commit is a part of Org 9.6.
> May it be that you are using older Org version?

9.6.7, most recent bugfix.  comments apply to vanilla.

>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



reply via email to

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