[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 604bfd9: oc-csl: be more caution about the csl etc
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 604bfd9: oc-csl: be more caution about the csl etc location |
Date: |
Wed, 14 Jul 2021 15:57:15 -0400 (EDT) |
branch: externals/org
commit 604bfd9d755770e12c368c15148780ec723211df
Author: TEC <tec@tecosaur.com>
Commit: TEC <tec@tecosaur.com>
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 a7a2a60..5e0e272 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -177,9 +177,14 @@ Used only when `second-field-align' is activated by the
used CSL style."
;;; 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org 604bfd9: oc-csl: be more caution about the csl etc location,
ELPA Syncer <=