|
From: | Max Nikulin |
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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
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 ...)
[Prev in Thread] | Current Thread | [Next in Thread] |