emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Links to external targets with (or despite) org-ref


From: John Kitchin
Subject: Re: Links to external targets with (or despite) org-ref
Date: Mon, 20 Feb 2023 13:07:49 -0500

The quickest thing might be to remove the store properties on the ref links. This should do it.

#+BEGIN_SRC emacs-lisp
(cl-loop for reflink in '("ref" "pageref" "nameref" "eqref" "autoref" "cref" "Cref" "crefrange" "Crefrange")
do
(setf (cdr (assoc reflink org-link-parameters))
      (org-plist-delete (cdr (assoc reflink org-link-parameters)) :store)))
#+END_SRC

I guess I don't have that setup quite right in org-ref, it seems like it should not clobber other ways to store links.

On Sun, Feb 19, 2023 at 10:39 AM Sven Bretfeld <sven.bretfeld@ntnu.no> wrote:
Hi everybody

I'm looking to create labels/links to specific text positions in org
files (not line number, not header).

I know that [[file:~/path_to_file::target]] can be used to jump to
<<target>>. That would be fine and works for me -- IF I write the link
manually.

However, org-ref which I use for citations seems to overwrite the
default behaviour of org-store-link and org-insert-link. So when the
point is on <<target>> and org-store-link is called (C-c l), I get a
prompt "Store link with (default org-ref-store-ref)". No alternatives
are offered when TAB is hit. Hiting RET saves the link as
"Crefrange:target". A corresponding org-insert-link (C-c C-l) produces
a link of the form [[Crefrange:target]] which, when in another file,
of course leads nowhere ("search failed"). How to get the file name
into these links without manually rewriting the link?

I couldn't find anything on this issue in the org-ref manual or on the
internet.

Thanks for help,

Sven


reply via email to

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