branch: externals/auctex commit ec48f765fb511fe5ccc947496fb8863c8575a787 Author: Paul Nelson <ultr...@gmail.com> Commit: Arash Esbati <ar...@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