Max Nikulin <maniku...@gmail.com> writes: >> 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.
This makes sense. Instead of making `org-create-file-search-functions' return a cons cell, we can use the same scheme as in `org-store-link-functions' where the functions can call `org-link-store-props' inside to set e.g. the description. -- Ihor Radchenko, 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