emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>,
	Magnus Therning <magnus@therning.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-create-file-search-functions and description [9.5.5 (release_9.5.5 @ /usr/share/emacs/29.0.50/lisp/org/)]
Date: Mon, 26 Sep 2022 22:13:16 +0700	[thread overview]
Message-ID: <e9b783b7-78d8-887c-8d0f-8e90561f98e0@gmail.com> (raw)
In-Reply-To: <87k05qjpwg.fsf@localhost>

On 26/09/2022 19:12, Ihor Radchenko wrote:
> Magnus Therning writes:
> 
>> The documenation on org-create-file-search-functions contains this
>> piece of text
>>
>>    A function in this hook may also use setq to set the variable
>>    description to provide a suggestion for the descriptive text to
>>    be used for this link when it gets inserted into an Org buffer
>>    with org-insert-link.
>>
>> This doesn't seem to be true though. I really would love for there
>> to be a way to influence the link description, but no matter what
>> the documentation should be corrected.
> 
> Thus, we may as well take this opportunity and allow
> `org-create-file-search-functions' to return a cons cell
> ("search term" . "description"). This will not require unintuitive
> global variables.

There is the `org-store-link-plist' variable used by :store functions 
from `org-link-parameters' but not by the 
`org-create-file-search-functions' hook. Maybe it is enough to add

    (setq desc (plist-get org-store-link-plist :description))

after calling of the hook.

For a while, I hope, it is possible to create a workaround using

   (org-link-set-parameters
    "file"
    :store ...)



  parent reply	other threads:[~2022-09-26 15:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 17:40 [BUG] org-create-file-search-functions and description [9.5.5 (release_9.5.5 @ /usr/share/emacs/29.0.50/lisp/org/)] Magnus Therning
2022-09-26 12:12 ` Ihor Radchenko
2022-09-26 12:15   ` Magnus Therning
2022-09-26 15:13   ` Max Nikulin [this message]
2022-09-27  1:35     ` Ihor Radchenko
2024-05-09 10:43       ` Ihor Radchenko
2022-09-27  1:40     ` [BUG] org-store-link-functions advertizes that the first non-nil return value is used, but it is not how org-store-link handles it (was: [BUG] org-create-file-search-functions and description [9.5.5 (release_9.5.5 @ /usr/share/emacs/29.0.50/lisp/org/)]) Ihor Radchenko
2022-09-27 11:39       ` [BUG] org-store-link-functions advertizes that the first non-nil return value is used, but it is not how org-store-link handles it Max Nikulin
2022-09-28  1:03         ` Ihor Radchenko
2024-05-09 10:44       ` [BUG] org-store-link-functions advertizes that the first non-nil return value is used, but it is not how org-store-link handles it (was: [BUG] org-create-file-search-functions and description [9.5.5 (release_9.5.5 @ /usr/share/emacs/29.0.50/lisp/org/)]) 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=e9b783b7-78d8-887c-8d0f-8e90561f98e0@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=magnus@therning.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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