auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex ec48f765fb 13/23: Allow preview to work in non-f


From: Tassilo Horn
Subject: [elpa] externals/auctex ec48f765fb 13/23: Allow preview to work in non-file buffers
Date: Thu, 18 Apr 2024 05:43:24 -0400 (EDT)

branch: externals/auctex
commit ec48f765fb511fe5ccc947496fb8863c8575a787
Author: Paul Nelson <ultrono@gmail.com>
Commit: Arash Esbati <arash@gnu.org>

    Allow preview to work in non-file buffers
    
    * tex.el (TeX-region-create): Only make file name relative to
    master when file name is not "<none>".  (bug#70307)
---
 tex.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tex.el b/tex.el
index c905981d2b..c4e4104e77 100644
--- a/tex.el
+++ b/tex.el
@@ -9080,9 +9080,10 @@ original file."
                               (buffer-substring-no-properties
                                (point) (point-max))))))))))
     ;; file name should be relative to master
-    (setq original (TeX-quote-filename (file-relative-name
-                                        original (TeX-master-directory)))
-          master-name (TeX-quote-filename master-name))
+    (unless (string= original "<none>") ; cf. `preview-region'
+      (setq original (TeX-quote-filename (file-relative-name
+                                          original (TeX-master-directory)))))
+    (setq master-name (TeX-quote-filename master-name))
 
     ;; If the first line begins with "%&", put that line separately on
     ;; the very first line of the region file so that the first line




reply via email to

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