emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/org 2f7052619b: Merge branch 'bugfix'


From: ELPA Syncer
Subject: [elpa] externals/org 2f7052619b: Merge branch 'bugfix'
Date: Sat, 7 Jan 2023 07:58:05 -0500 (EST)

branch: externals/org
commit 2f7052619b33a1bcc3c6b4a5f2a7a6487125c003
Merge: b58fbaf834 a6523f1aa0
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    Merge branch 'bugfix'
---
 lisp/org-macs.el | 11 ++++++++---
 lisp/ox.el       |  1 -
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 72929cdd26..07c668a807 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -372,18 +372,23 @@ be set to a buffer or a buffer name.  `shell-command' 
then uses
 it for output."
   (let* ((base-name (file-name-base source))
         (full-name (file-truename source))
-        (out-dir (or (file-name-directory source) "./"))
+         (relative-name (file-relative-name source))
+        (out-dir (if (file-name-directory source)
+                      ;; Expand "~".  Shell expansion will be disabled
+                      ;; in the shell command call.
+                      (file-name-directory full-name)
+                    "./"))
         (output (expand-file-name (concat base-name "." ext) out-dir))
         (time (file-attribute-modification-time (file-attributes output)))
         (err-msg (if (stringp err-msg) (concat ".  " err-msg) "")))
     (save-window-excursion
       (pcase process
-       ((pred functionp) (funcall process (shell-quote-argument source)))
+       ((pred functionp) (funcall process (shell-quote-argument 
relative-name)))
        ((pred consp)
         (let ((log-buf (and log-buf (get-buffer-create log-buf)))
               (spec (append spec
                             `((?b . ,(shell-quote-argument base-name))
-                              (?f . ,(shell-quote-argument source))
+                              (?f . ,(shell-quote-argument relative-name))
                               (?F . ,(shell-quote-argument full-name))
                               (?o . ,(shell-quote-argument out-dir))
                               (?O . ,(shell-quote-argument output))))))
diff --git a/lisp/ox.el b/lisp/ox.el
index d5f9e96c3e..495d273957 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6770,7 +6770,6 @@ Return file name as a string."
          (cond
           (pub-dir (concat (file-name-as-directory pub-dir)
                            (file-name-nondirectory base-name)))
-          ((file-name-absolute-p base-name) base-name)
           (t base-name))))
     ;; If writing to OUTPUT-FILE would overwrite original file, append
     ;; EXTENSION another time to final name.



reply via email to

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