Here is a very grungy solution:

(defun scimax-store-link-advice (orig-fun &rest args)
  (cl-letf (((symbol-function 'symbol-name)
             (lambda (_)
               "")))
    (apply orig-fun args)))

(advice-add 'org-store-link :around 'scimax-store-link-advice)

It works by temporarily redefining symbol-name to return an empty string.
It's only redeeming qualities are 1) it works, 2) you don't have to modify
the org src code!

John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



On Sat, Jan 2, 2021 at 9:37 AM Daniele Nicolodi <dani...@grinta.net> wrote:

> On 02/01/2021 14:49, John Kitchin wrote:
> > Recently I have had an issue where multiple functions may store a link,
> > e.g. to a bibtex entry.
> >
> > In this case, org-mode seems to prompt me to ask which function to store
> > the link with, with an initial input of the first function, which masks
> > all the options that are available. This happens
> > inside |org-store-link| in ol.el at line 1495 for me. in
> >
> > (apply #'org-link-store-props
> > (cdr (assoc-string
> >       (completing-read
> > "Which function for creating the link? "
> > (mapcar #'car results-alist)
> > nil t (symbol-name name))
> >       results-alist)))
> >
> > because of the (symbol-name name).
> >
> > Is there an easy way to avoid this, or to modify the order of the
> > functions used? I want to see all the options for storing, or better, to
> > just store them all and let me choose later when I use org-insert-link.
>
> I have the exact same problem. I think it comes from having org-bibtex
> and org-ref loaded at the same time. I haven't investigated a possible
> solution.
>
> Cheers,
> Dan
>

Reply via email to