[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex fa309c9 02/71: Fix error when tex
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded while default-directory doesn't exist |
Date: |
Fri, 17 Dec 2021 15:00:24 -0500 (EST) |
branch: externals/auctex
commit fa309c9559f0a6dc3428daca6896f615e7030521
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
Fix error when tex.el is loaded while default-directory doesn't exist
* tex.el (TeX-view-program-select-evince): Bind `default-directory' to
HOME for the shell command testing for the availability of
evince-based viewer. That triggered an error when tex.el is loaded as
response to finding a tex file in a non-existent directory which at
this point is the value of `default-directory' (bug#50225).
---
tex.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/tex.el b/tex.el
index 46d6bbc..65ece76 100644
--- a/tex.el
+++ b/tex.el
@@ -1265,12 +1265,18 @@ viewer."
(if (TeX-evince-dbus-p de app :forward)
(intern (format "TeX-%s-sync-view" app))
`(,app (mode-io-correlate
- ;; With evince 3, -p N opens the page *labeled* N,
- ;; and -i,--page-index the physical page N.
- ,(if (string-match "--page-index"
- (shell-command-to-string (concat app "
--help")))
- " -i %(outpage)"
- " -p %(outpage)")) " %o")))
+ ;; When tex.el is loaded as response to opening a tex file
+ ;; in a non-existent directory, we need to make sure
+ ;; `default-directory' exists, otherwise the shell-command
+ ;; below will error (bug#50225).
+ ,(let ((default-directory (file-name-as-directory
+ (expand-file-name "~"))))
+ ;; With evince 3, -p N opens the page *labeled* N,
+ ;; and -i,--page-index the physical page N.
+ (if (string-match "--page-index"
+ (shell-command-to-string (concat app "
--help")))
+ " -i %(outpage)"
+ " -p %(outpage)"))) " %o")))
(defvar TeX-view-program-list-builtin
(cond
- [AUCTeX-diffs] [elpa] externals/auctex 4e15656 19/71: Cleanup indentation of verbatim environments, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 4e15656 19/71: Cleanup indentation of verbatim environments, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex ba1cbd2 53/71: Improve handling of key=vals in style/caption.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex f72f849 15/71: Delete obsolete files and targets, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 9284ac6 22/71: Explain how to do forward search by mouse, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 43f6398 46/71: Improve handling of key=vals in style/enumitem.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex c457aab 35/71: * style/babel.el ("babel"): Use `LaTeX-fontspec-font-features'., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex dfd3369 59/71: Add new style/xr.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex cd4a1c9 28/71: * style/graphicx.el (LaTeX-graphicx-key-val-options): Add alt key., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 0322057 55/71: Fix misc minor issues, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex ec9362d 16/71: ; * doc/todo.texi (Mid-term Goals): Fix spacing., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded while default-directory doesn't exist,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 5f67eac 50/71: Fix logic again, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex b866110 31/71: Autoload `TeX-check-engine-add-engines' in tex.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex e118a53 64/71: ; Prepare for upcoming release, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex f6edd15 70/71: Add style/sidecap.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 6902d05 42/71: Improve handling of key=vals in style/minted.el, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex fd73414 11/71: ; * doc/changes.texi: Add supplementary notice., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 464fd34 20/71: * tests/latex/latex-test.el (LaTeX-flush-left-indent): New test., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 16bcc8d 21/71: ; * tex.el (TeX-source-correlate-mode): Quote function name by #'., Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 2af20f4 27/71: ; Silence TeX warnings, Tassilo Horn, 2021/12/17
- [AUCTeX-diffs] [elpa] externals/auctex 363b778 56/71: Update style/multicol.el to package version 1.9b, Tassilo Horn, 2021/12/17