From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YLoqJGi382NAXgEAbAwnHQ (envelope-from ) for ; Mon, 20 Feb 2023 19:09:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CBgCJGi382PsGQAAauVa8A (envelope-from ) for ; Mon, 20 Feb 2023 19:09:44 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1D15614E34 for ; Mon, 20 Feb 2023 19:09:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUAaW-0004C5-9c; Mon, 20 Feb 2023 13:08:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUAaQ-0004Ah-Iu for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 13:08:27 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUAaL-0005wF-Js for emacs-orgmode@gnu.org; Mon, 20 Feb 2023 13:08:26 -0500 Received: by mail-wm1-x333.google.com with SMTP id o4-20020a05600c4fc400b003e1f5f2a29cso1790673wmq.4 for ; Mon, 20 Feb 2023 10:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Ek1PdvimiaUw51lq1hhV4Bfdn1rb1m3kOVKaRlpfFbM=; b=VBSzT0Pxyob2Fo6bVD38f/jLQQzwLI1sMpQbwGHEFwWrpWJu/qt6A96gMMunYt0GVQ M8S4KDV8Oy+1EHa2gLy1neHWN46kdbr96ultHAAcvVD36iuQ4yW0/r9aA7knnevMhR05 vXkr50jeUZKTQK2EEAkuOYw87IaxDFFEWRg0y/BSMmtSfHUtnPV31o7wVb6aJgmcYz9D DnY4XgjSnP8xNS08C6wzAurkx57CdFyxPNBo29SPJdkJoUMZpEVvnMgxpXHdqfIrPun+ Kdg8ymga9bZ03ASPrshoF9nA5JblTHONA/iXOhTV6chAz9jeBbE3R+cu/mDB7eitnbQg sVNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ek1PdvimiaUw51lq1hhV4Bfdn1rb1m3kOVKaRlpfFbM=; b=5oxq/cPUIa1nCYoUEga99lfd9gW8CWz0nkEuXI1P3st1T0e4FhQia+IBsoI+8or/oI PKYgZ8OqIqZ/pQlxxNQqEc3jFWouUek6c8xeyPgAllmBzz6N1z8skcoZscLBsSigNSi2 cpwncDlsktC/zYb9FqeuawIcOOMAdNu1uLbvPum48NXMU9/C5fB9ebKRYDrnLfCLEnAP ghDwZizFpr8vKVTaNcT2vMk74Et+fIPRh24fjnzFPTPTuCCgRKNj8u3s7WHHjhxI4AWx l9M9VTFDQQMS1QaPRzpTzaNps9bcOTZDyR0Bwvjs8QqTVU4R5Iq/3XRKIppeoekxpF1D WKFg== X-Gm-Message-State: AO0yUKXgzE1EfNYWcz3nLCGk798safzjyOAwKjLAH/wHqaSVU2xX6Nk+ 04Mkf6EJRfIp6GUpVWjf5cE2vhWm2bsqUT4NXdzm4w== X-Google-Smtp-Source: AK7set92adCK0q4kLbfzG/sM54S1GdanxjQlIK4eRI9a7HFYWWqsuy7eKH9YtkOuUHs2ChiEnnNYGp0JDn0UPJBKFhU= X-Received: by 2002:a05:600c:a4c:b0:3e0:14a:6977 with SMTP id c12-20020a05600c0a4c00b003e0014a6977mr166587wmq.176.1676916479755; Mon, 20 Feb 2023 10:07:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: John Kitchin Date: Mon, 20 Feb 2023 13:07:49 -0500 Message-ID: Subject: Re: Links to external targets with (or despite) org-ref To: Sven Bretfeld Cc: Emacs Orgmode Content-Type: multipart/alternative; boundary="00000000000018156b05f5258b74" Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=jkitchin@andrew.cmu.edu; helo=mail-wm1-x333.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676916584; a=rsa-sha256; cv=none; b=nRO/SQ2/8EuvpSYdaWpz660ufauQx7vwio4h/4c/URLeL4TmVcdraCfkQJ2AjmBSXkipGQ 6hINC4iPbS4dD/i1zMzotePb4kAAJfb1XaS/EIYXY5YGL8rlQlZQ1Fh6ctLkE5wYEiNiOk kVN8IlIt+HIk3t77HH1KrVNNGkOvLPJyX/9INO04Z2hysmZX5ESH3ya4kY++wZkPXkPeo9 biDQ5SAN+ihg03j9JTIiJf9pLGIbzBwdj+1XV33Vvo0+Jbyoy2Q2lTKO8fWL7+0Gb5K8Ha mbyiZDP6ychtklonq4Q899b3IBifZF55wZnQI3UfUU/PwZGpBAijI2pS8SW9dA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=VBSzT0Px; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=andrew.cmu.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676916584; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Ek1PdvimiaUw51lq1hhV4Bfdn1rb1m3kOVKaRlpfFbM=; b=LaV0sCIMNc9/1f7ufMQHRgsU/XZKTicVZwG4/tcz1vj2AV51Boo3vHu9XfnfeKOlHigRgd d55Z2I5f055ggPxerd8m3dmLz1yMfhqIm+eWYfc+SWPbnEDAIzzIaaJFW1PeX2CJCHnMlq Zg526FSgTECJNIOfZK3t0D/bWQGZMhcWOrMFNyH6EBd2x1oJmYP/NfOaL7+lhKMt0Z3rTA KYDu4L/xV47ujioWCbNw72tVzXMpKoksIFxLDKWJvApNZxNrxRc3PL+0ABKW1IPu+byEiJ OuHm1s4jQrEuL8n6tZd6lZNb1oibQ0F16II3NTEt1UIKgPwRBehV9ZUP0AUvcg== X-Spam-Score: -5.91 X-Migadu-Queue-Id: 1D15614E34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b=VBSzT0Px; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=andrew.cmu.edu X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.91 X-TUID: 9vnsiumk0ds9 --00000000000018156b05f5258b74 Content-Type: text/plain; charset="UTF-8" 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 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 > <>. 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 <> 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 > > --00000000000018156b05f5258b74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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" &= quot;nameref" "eqref" "autoref" "cref" &= quot;Cref" "crefrange" "Crefrange")
do
(= setf (cdr (assoc reflink org-link-parameters))
=C2=A0 =C2=A0 =C2=A0 (o= rg-plist-delete (cdr (assoc reflink org-link-parameters)) :store)))
#+EN= D_SRC

I guess I don't have that setup quit= e 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 t= he 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 alternat= ives
are offered when TAB is hit. Hiting RET saves the link as
"Crefrange:target". A corresponding org-insert-link (C-c C-l) pro= duces
a link of the form [[Crefrange:target]] which, when in another file,
of course leads nowhere ("search failed"). How to get the file na= me
into these links without manually rewriting the link?

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

Thanks for help,

Sven

--00000000000018156b05f5258b74--