From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aPaTIZtHJGScbwAASxT56A (envelope-from ) for ; Wed, 29 Mar 2023 16:13:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qCGYIJtHJGSE4wAAG6o9tA (envelope-from ) for ; Wed, 29 Mar 2023 16:13:47 +0200 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 1919E277CA for ; Wed, 29 Mar 2023 16:13:47 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phWXm-0003KQ-7V; Wed, 29 Mar 2023 10:12:54 -0400 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 1phWXl-0003Cv-0n for emacs-orgmode@gnu.org; Wed, 29 Mar 2023 10:12:53 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phWXi-00034u-AV for emacs-orgmode@gnu.org; Wed, 29 Mar 2023 10:12:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B6E3E240487 for ; Wed, 29 Mar 2023 16:12:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1680099167; bh=/n6uX/QWJLAJ/k8QSshZxTm/hMePoNc3s4ETJlIBw8o=; h=From:To:Cc:Subject:Date:From; b=gmsjZE/iU3CbfxfFHF3650lhpIcl9/MQ9oBh1IASd8bmkrqmwCBtprTPYT/w7mMss 45QTRZaVa9Zl2XE2e2VqpmYwfY4NdJLebujHwc+QGRZY+by2e7cXguUVKxGcZJRuPU izx6UpJQi+TF3krlkA9g4nIDzM2K99TkhsgBnIyvHJY4h0dqSBBSf3sGoSlYRbHHux xP/Rr26Om4ussx8ceoge67/ldMysS8umOZIH75CVeA+4oB2xzmr0VfDKxPZt+4oCy3 H5nilFXag9XUGNmE/wxTeKjzGYV/5x2xcfwSgo4kZRFCs2ff5+W2ojFBd18c0Tfjd5 oESTYFz0A0ekw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PmpRM1pRMz9rxK; Wed, 29 Mar 2023 16:12:47 +0200 (CEST) From: Ihor Radchenko To: Pedro Andres Aranda Gutierrez Cc: Org Mode List Subject: Re: Friendly exchange of thoughts: citations and LaTeX In-Reply-To: References: Date: Wed, 29 Mar 2023 14:14:51 +0000 Message-ID: <87ilejmyp0.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680099227; a=rsa-sha256; cv=none; b=vAvMVjNmkCW46h7a0OoiEfkkMpf+C7rnL3E2NBKoRV1bxIQUHBFMhs/a7F3YQkgbJz3Umz ZWu7gCcFk3CS1mHN/RjSa+aYH1g+yDClV1mpiW/mFJP8ciKXvNYx7HKqk++S/TmF1r8im5 YlOb2s0JG1XO4Vi26mtsQX91rvFFb6c+kfqc1AFFP8eCWCtTZ59W42mG6QuWPfmN8eNo7I 5z9WlDXhNzKLc6Xy5bsf3cP7N1Xv7c1P2Yw9/vspfg/EBaqaFAj/QMt7+u66yiLKJR48jw yeYirDPUVe9j6eDMTV3uSHXRwoLuNK+jYU4kHlrkNxA0I+Xyh/LN3cDtlf03zw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gmsjZE/i"; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680099227; 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=aArtsl2hupS0GYQXZoeCPBCTIl4+YMQnYFCldTk/WhQ=; b=eZ2kevLjkkW+oz2exWHbdfmyzJzFr0RWSVqUH/yrssNfp1VhiDsdBd4aOWtkYodFQ0m+AH dnRITOyI/1Ij3d2cEG/iBZ3MxAQDO/sSt8GIoKRkf/0wfsf9XMvbzmPJFD9d0/qkl5/0Yw +fT+2trjfnP/V9LCzNkuNm6ynz+k8ZciNMzelATXZVlJFbfyCJrLDVoBeRJANzSBX3P+Z5 8mMB/zSpCG9TXIBTItao1YPmpjCDhgf6/e9Qd1Y9oEcGRceM65nSDLPME0xGB4LcmcTtCw PfqT6uRt5cyzbvPXsgiO1z22dxvkCtR1ZfLOCBSBCD/4dbDvqHMg/1zNplyw2A== X-Migadu-Spam-Score: -10.34 X-Spam-Score: -10.34 X-Migadu-Queue-Id: 1919E277CA X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gmsjZE/i"; dmarc=pass (policy=none) header.from=posteo.net; 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" X-TUID: SW/SZGFoc/gZ --=-=-= Content-Type: text/plain Pedro Andres Aranda Gutierrez writes: > Having said that, I was also (just a bit) bugged by the fact that > bibliography file names are completely expanded when generating LaTeX. > Couldn't we avoid that for LaTeX export? It is in `org-cite-list-bibliography-files'. AFIAU, full path is forced there to make #+SETUP containing local bibliography path work: ---- main.org ----- #+SETUP: settings.org ------ end -------- ---- ../settings.org ----- #+BIBLIOGRAPHY: local.bib -------------------------- One reasonable option could be keeping relative paths relative iff the #+BIBLIOGRAPHY is derived from a file inside the same directory with the exported file. Tentative patch attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-cite-list-bibliography-files-Preserve-local-bibl.patch >From f068094cc850e7387633bbd57e1c0bfc7e395b21 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Wed, 29 Mar 2023 16:13:29 +0200 Subject: [PATCH] org-cite-list-bibliography-files: Preserve local bibliography path * lisp/oc.el (org-cite-list-bibliography-files): When the bibliography path is relative to the exported file location, keep the path relative. Link: https://orgmode.org/list/CAO48Bk_upR4h-xd0YL+FxeKtWvDoqH+Eju6F_Vzds_m6oxBKcg@mail.gmail.com --- lisp/oc.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/oc.el b/lisp/oc.el index dde6f3a32..a69165506 100644 --- a/lisp/oc.el +++ b/lisp/oc.el @@ -602,7 +602,12 @@ (defun org-cite-list-bibliography-files () (append (mapcar (lambda (value) (pcase value (`(,f . ,d) - (expand-file-name (org-strip-quotes f) d)))) + ;; Keep the bibliography path relative in + ;; current directory. + (if (equal d default-directory) f + ;; Expand bibliography path for #+SETUP + ;; files located in other directory. + (expand-file-name (org-strip-quotes f) d))))) (pcase (org-collect-keywords '("BIBLIOGRAPHY") nil '("BIBLIOGRAPHY")) (`(("BIBLIOGRAPHY" . ,pairs)) pairs))) -- 2.39.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--