From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kG+jKhKF7GAKPQAAgWs5BA (envelope-from ) for ; Mon, 12 Jul 2021 20:08:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MJxOJhKF7GDGfgAA1q6Kng (envelope-from ) for ; Mon, 12 Jul 2021 18:08:18 +0000 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 3D766EEB5 for ; Mon, 12 Jul 2021 20:08:18 +0200 (CEST) Received: from localhost ([::1]:51354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m30Lo-0004p3-EK for larch@yhetil.org; Mon, 12 Jul 2021 14:08:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m30LP-0004os-Nq for emacs-orgmode@gnu.org; Mon, 12 Jul 2021 14:07:51 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:47070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m30LK-0000Dh-DF for emacs-orgmode@gnu.org; Mon, 12 Jul 2021 14:07:51 -0400 Received: by mail-pf1-x434.google.com with SMTP id x16so17131914pfa.13 for ; Mon, 12 Jul 2021 11:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:message-id:date:mime-version; bh=7bG7pGxctwfcNpzpJnTqFoW6+mMAXkEI5Lax3TLkqnc=; b=cIe6LOz7frZkZXc5JRQO+IIjW95UQRCXyjZUVXm8RC9JzJM0WWAeInKXhA7Zggj8DV twVMQ7iWgGgkB447HpyICHCiI32b9ocQFV9SQrNFzRlz6RLQOrDh7vKrdnvKllWDLOyb xZg8wwCG1Hm2nXDgMCoTxoCY4fQ7j67aNIvsDR8RimwSGOz/BN1ojdJvHq32KZx6Xv6z l5fDSysFVLV3FAZWO+y/EXW/DDzO9feXP68YB6/JeFsMjNjvA7CG4HZ7h4lneJhiarYQ IUrohLbLHUJbtxxFyC1UBevwb3wR4uZw8SNzZy5U5qjVWGt7nTEf7j2XML6aumMBwe8R AFRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:message-id:date :mime-version; bh=7bG7pGxctwfcNpzpJnTqFoW6+mMAXkEI5Lax3TLkqnc=; b=U2I/KvVWsqNzbLiUkRcfNVy+63OXAbIq+xpCPDUVbE+Dj2xCTwsVw321+Cx994qRpe mR5Udym6TErO6dA65VuW3fi9CJ3fSCCsXla4vs+6jlnZDmkhZxuU4RMo/4+OjgZej5WM e4PhVB+iH8RXPieR0eTi40sDREEQ38GUerh3vp3T7fQWzPsTTQXUeIxy7LHujmzGFtO8 AJCrSpjZAStr+zth5Al87xKvWYbKXWodBV2Ybgh1os0rBOwY6jhsAkAqX7a3k2D/znld 0epd3kti6GMbQY/7R3Hc9+t235rVEPklbeUHPqJ82XZVfII/P/ITr1cr7wYe2t+kn5/5 PrLw== X-Gm-Message-State: AOAM533EsxQu8KMDtn8h3d848YbayE+uPKeqwq9YNYFzYH0nN2gfj077 RHGxfl0vzbuq6N/pWPKCBpntkeEwx1w= X-Google-Smtp-Source: ABdhPJw35niZSN2lKy10H9LL98HJC2GG0fZVAjQWKDUhNh7cexHMEyGSb2IeLBn2zayo2N5YFt9OKg== X-Received: by 2002:a05:6a00:2494:b029:326:5453:8c14 with SMTP id c20-20020a056a002494b029032654538c14mr446679pfv.43.1626113263548; Mon, 12 Jul 2021 11:07:43 -0700 (PDT) Received: from localhost (180-150-91-8.b4965b.per.nbn.aussiebb.net. [180.150.91.8]) by smtp.gmail.com with ESMTPSA id iy13sm116560pjb.28.2021.07.12.11.07.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 11:07:43 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 28.0.50 From: Timothy To: org-mode-email Subject: [PATCH] be more cautious when setting csl etc dir location Message-ID: <875yxfjthw.fsf@gmail.com> Date: Tue, 13 Jul 2021 02:07:39 +0800 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=tecosaur@gmail.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=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.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626113298; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4W9krddn3xtq50dzwneCBdoSAED1I9zKBL/hLEhylWg=; b=aMLtoec6c5tWPn00TSN7/OxnYW2qOmSgJDStG1ZBmEa6S7VOElN7bTngJAGDmuaEpNCIPt 2nnKnOZXvVwwCJEE1xNOYDEjaF/sRkCxDPSd7Yi5nwiyg3YnuDFsLneIlwXDtHOzjedbGN nSTXW1oPEio9053MS1ITK0OA5+HJa0zYFIuWPR8ur2nBTOHO4CU8/lIQNUd7YauXkGPdA7 vX8ioJ9lXFGO6KS7OBuEcFtQQhoIA/ILypdBKnzSeoSKmV3qxFKEV0cBpzNlwss0FpAfQo oT6hDu0Rt2S6semZmtgq5qTmxQozvWJCGIiiYkkTD2mGjSroHO23Ox3qynz6pg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626113298; a=rsa-sha256; cv=none; b=kXHGsA5SR0hye9MHSephmgB04VOssRl69goWDlIZsCqBfoAaT2WnXP63Cn3+nowfM2OWlJ Fd1EVFgAtLiOfwJE2b12MY30V/ZdZkZSYo5e8TcCYoIuAvHLjBYYPxqXAQOLE61I0HyGP2 oq3axvdhbbxRWRkrNn++dcLrWsnNvyONfcRAbm95CA0IrTD2vjQrkg1s2l4ZGvakJcea0O XPA1TA5Itxmm8QouclAIuyKIXjPtyezCWsrxiSxy1xCs9oTD/PauVWt2JD0GUPAabov6RG PEfjIVCniuWRYO8cHQaFOxabQvC0D+/Bn5DNuER/unrorChbfkVse3aVuB4swg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=cIe6LOz7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=cIe6LOz7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 3D766EEB5 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0oF58/KiH55x --=-=-= Content-Type: text/plain Hello, It's come to my attention that the current value of org-cite-ctl--etc-dir is problematic for anyone managing Org with package.el or straight. This patch adds a check to see if the initial location actually exists, if it doesn't we try the expected location when using package.el/straight. -- Timothy --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-oc-csl-be-more-caution-about-the-csl-etc-location.patch >From 5e6700177f4ef59131c153d985b8eaeb3b303799 Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 13 Jul 2021 02:00:38 +0800 Subject: [PATCH] oc-csl: be more caution about the csl etc location * lisp/oc-csl.el (org-cite-ctl--etc-dir): The previous value of `org-cite-ctl--etc-dir' is incorrect when using either package.el or straight to manage Org. We can be a bit more considerate by just checking if the initial location exists, and then trying the expected location when using package.el/straight if it doesn't exist. --- lisp/oc-csl.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index a7a2a6042..5e0e27211 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -177,9 +177,14 @@ (defcustom org-cite-csl-latex-hanging-indent "1.5em" ;;; Internal variables (defconst org-cite-csl--etc-dir - (expand-file-name - (concat (file-name-directory (locate-library "oc")) - "../etc/csl/")) + (let* ((oc-root (file-name-directory (locate-library "oc"))) + (oc-etc-dir-1 (expand-file-name "../etc/csl/" oc-root))) + ;; package.el and straight will put all of org-mode/lisp/ in org-mode/. + ;; This will cause .. to resolve to the directory above Org. + ;; To make life easier for people using package.el or straight, we can + ;; check to see if ../etc/csl exists, and if it doesn't try ./etc/csl. + (if (file-exists-p oc-etc-dir-1) oc-etc-dir-1 + (expand-file-name "etc/csl/" oc-root))) "Directory \"etc/\" from repository.") (defconst org-cite-csl--fallback-locales-dir org-cite-csl--etc-dir -- 2.32.0 --=-=-=--