[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded w
From: |
Tassilo Horn |
Subject: |
[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
- [elpa] externals/auctex ba1cbd2 53/71: Improve handling of key=vals in style/caption.el, (continued)
- [elpa] externals/auctex ba1cbd2 53/71: Improve handling of key=vals in style/caption.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex f6edd15 70/71: Add style/sidecap.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 45d3a11 08/71: ; Fix unbalanced parentheses, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 2d9944d 03/71: ; Improve initial commit., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 9a42bf4 29/71: ; Minor doc fixes, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 4e15656 19/71: Cleanup indentation of verbatim environments, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 2af20f4 27/71: ; Silence TeX warnings, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex ec9362d 16/71: ; * doc/todo.texi (Mid-term Goals): Fix spacing., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex c457aab 35/71: * style/babel.el ("babel"): Use `LaTeX-fontspec-font-features'., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex bc5f7bc 60/71: Add new style/cancel.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex fa309c9 02/71: Fix error when tex.el is loaded while default-directory doesn't exist,
Tassilo Horn <=
- [elpa] externals/auctex f72f849 15/71: Delete obsolete files and targets, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 16bcc8d 21/71: ; * tex.el (TeX-source-correlate-mode): Quote function name by #'., Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 3684fde 17/71: Explain how to support option completion, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 0752650 44/71: Don't use obsolete @inforef, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 5f67eac 50/71: Fix logic again, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex dfd3369 59/71: Add new style/xr.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex e118a53 64/71: ; Prepare for upcoming release, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex db45d9e 41/71: Improve handling of key=vals in style/mdframed.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex accfe51 58/71: Add new style/xr-hyper.el, Tassilo Horn, 2021/12/17
- [elpa] externals/auctex 2ee9a07 71/71: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/12/17