[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AucTeX and TRAMP
From: |
Philip Kaludercic |
Subject: |
AucTeX and TRAMP |
Date: |
Wed, 04 May 2022 21:07:21 +0000 |
Hi,
I was wondering if there is a reason that AucTeX (apparently) doesn't
support TRAMP by default? I have a laptop without a Texlive
installation, so I'd build my documents on a server. This doesn't work
by default, but after applying this patch that uses `process-file' and
`start-file-process' it appears to work as indented:
>From 2cfa44593670f9559570b83e20248a3a4c790847 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Wed, 4 May 2022 23:04:40 +0200
Subject: [PATCH] Use process-file and start-file-process
---
preview.el.in | 8 ++++----
tex.el | 42 +++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index a995485d..54231719 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3739,7 +3739,7 @@ The fourth value is the transparent border thickness."
process)
(setq mode-line-process ": run")
(force-mode-line-update)
- (call-process TeX-shell nil (current-buffer) nil
+ (process-file TeX-shell nil (current-buffer) nil
TeX-shell-command-option
command))))
@@ -3781,7 +3781,7 @@ If FAST is set, do a fast conversion."
process)
(setq mode-line-process ": run")
(force-mode-line-update)
- (call-process TeX-shell nil (current-buffer) nil
+ (process-file TeX-shell nil (current-buffer) nil
TeX-shell-command-option
command))))
@@ -3823,7 +3823,7 @@ If FAST is set, do a fast conversion."
process)
(setq mode-line-process ": run")
(force-mode-line-update)
- (call-process TeX-shell nil (current-buffer) nil
+ (process-file TeX-shell nil (current-buffer) nil
TeX-shell-command-option
command))))
@@ -4278,7 +4278,7 @@ If not a regular release, the date of the last change.")
(lambda ()
(insert (format "\nOutput from running `%s -h':\n"
preview-gs-command))
- (call-process preview-gs-command nil t nil "-h")
+ (process-file preview-gs-command nil t nil "-h")
(insert "\n"))
"Remember to cover the basics. Including a minimal LaTeX example
file exhibiting the problem might help."
diff --git a/tex.el b/tex.el
index 8a80f13f..542859ab 100644
--- a/tex.el
+++ b/tex.el
@@ -1697,7 +1697,7 @@ This is the case if
`TeX-source-correlate-start-server-flag' is non-nil."
"Determine which method is available for forward and inverse search."
(let ((help (condition-case nil
(with-output-to-string
- (call-process LaTeX-command
+ (process-file LaTeX-command
nil (list standard-output nil) nil "--help"))
(error ""))))
(if (string-match "^[ ]*-?-synctex" help)
@@ -1776,7 +1776,7 @@ does the trick. Some other users use the external wmctrl
tool to
raise the Emacs frame like so:
(lambda ()
- (call-process
+ (process-file
\"wmctrl\" nil nil nil \"-i\" \"-R\"
(frame-parameter (selected-frame) \\='outer-window-id)))"
:type 'function
@@ -1956,7 +1956,7 @@ This method assumes that the document was compiled with
SyncTeX
enabled and the `synctex' binary is available."
(let ((synctex-output
(with-output-to-string
- (call-process "synctex" nil (list standard-output nil) nil "view"
+ (process-file "synctex" nil (list standard-output nil) nil "view"
"-i" (format "%s:%s:%s" (1+ (TeX-current-offset))
;; FIXME: Using `current-column'
;; here is dubious. See comment in
@@ -2587,7 +2587,7 @@ Usually return \":\" or \";\". If auto detect fails for
some reason,
return nil."
(let ((res (ignore-errors
(with-output-to-string
- (call-process "kpsewhich" nil
+ (process-file "kpsewhich" nil
(list standard-output nil) nil
"--expand-path" "{.,..}")))))
;; kpsewhich expands "{.,..}" to ".:SOMEDIR" or ".;SOMEDIR"
@@ -2633,7 +2633,7 @@ are returned."
(path-list (ignore-errors
(with-output-to-string
(setq exit-status
- (apply #'call-process
+ (apply #'process-file
"kpsewhich" nil
(list standard-output nil) nil
args))))))
@@ -6328,7 +6328,7 @@ show."
(cond
((null (executable-find "texdoc"))
;; Note: `shell-command-to-string' uses shell, only
- ;; `call-process' looks at `exec-path', thus only here makes
+ ;; `process-file' looks at `exec-path', thus only here makes
;; sense to use `executable-find' to test whether texdoc is
;; available.
(message "texdoc not found"))
@@ -6341,7 +6341,7 @@ show."
(when (setq doc
(cdr (assoc (TeX-read-string "Please enter \
the number of the file to view, anything else to skip: ") list)))
- (call-process "texdoc" nil 0 nil "--just-view" doc))
+ (process-file "texdoc" nil 0 nil "--just-view" doc))
;; Exit gently if a `quit' signal is thrown.
(quit nil)))
(t (message "No documentation found for %s" pkg)))
@@ -6391,7 +6391,7 @@ the number of the file to view, anything else to skip: ")
list)))
(lambda (doc)
;; texdoc in MiKTeX requires --view in order to start
;; the viewer instead of an intermediate web page.
- (call-process "texdoc" nil 0 nil "--view" doc)))
+ (process-file "texdoc" nil 0 nil "--view" doc)))
(latex-info (latex-mode)
(lambda ()
(mapcar (lambda (x)
@@ -6443,7 +6443,7 @@ NAME may be a package, a command, or a document."
(if (executable-find "texdoc")
;; Fallback if we did not find anything via the backend list.
(let ((doc (read-from-minibuffer "Input for `texdoc': ")))
- (when doc (call-process "texdoc" nil 0 nil "--view" doc)))
+ (when doc (process-file "texdoc" nil 0 nil "--view" doc)))
;; Give up.
(message "No documentation found")))
;; Ask the user about the package, command, or document.
@@ -7238,7 +7238,7 @@ been set."
(and TeX-check-TeX
(member name '("TeX" "LaTeX" "AmSTeX" "ConTeXt" "ConTeXt Full"))
(= TeX-check-TeX-command-not-found
- (call-process TeX-shell nil nil nil
+ (process-file TeX-shell nil nil nil
TeX-shell-command-option TeX-command))
(error (format "ERROR: AUCTeX cannot find a working TeX distribution.
Make sure you have one and that TeX binaries are in PATH environment
variable%s"
@@ -7795,8 +7795,8 @@ Return the new process."
(lambda (_process name)
(message (concat name ": done."))))
(if TeX-process-asynchronous
- (let ((process (start-process name buffer TeX-shell
- TeX-shell-command-option command)))
+ (let ((process (start-file-process name buffer TeX-shell
+ TeX-shell-command-option command)))
(if TeX-after-start-process-function
(funcall TeX-after-start-process-function process))
(TeX-command-mode-line process)
@@ -7807,7 +7807,7 @@ Return the new process."
process)
(setq mode-line-process ": run")
(force-mode-line-update)
- (call-process TeX-shell nil buffer nil
+ (process-file TeX-shell nil buffer nil
TeX-shell-command-option command))))
(defun TeX-run-set-command (name command)
@@ -7994,7 +7994,7 @@ run of `TeX-run-format', use
"Start COMMAND as process, discarding its output.
NAME and FILE are ignored."
(let ((default-directory (TeX-master-directory)))
- (call-process TeX-shell
+ (process-file TeX-shell
nil 0 nil
TeX-shell-command-option
command)))
@@ -8004,7 +8004,7 @@ NAME and FILE are ignored."
With support for MS-DOS, especially when dviout is used with PC-9801 series."
(if (and (boundp 'dos-machine-type) (eq dos-machine-type 'pc98)) ;if PC-9801
(send-string-to-terminal "\e[2J")) ; clear screen
- (call-process TeX-shell (if (eq system-type 'ms-dos) "con") nil nil
+ (process-file TeX-shell (if (eq system-type 'ms-dos) "con") nil nil
TeX-shell-command-option command)
(if (eq system-type 'ms-dos)
(redraw-display)))
@@ -8016,9 +8016,9 @@ With support for MS-DOS, especially when dviout is used
with PC-9801 series."
(set-buffer (get-buffer-create "*TeX background*"))
(if dir (cd dir))
(erase-buffer)
- (let ((process (start-process (concat name " background")
- nil TeX-shell
- TeX-shell-command-option command)))
+ (let ((process (start-file-process (concat name " background")
+ nil TeX-shell
+ TeX-shell-command-option command)))
(if TeX-after-start-process-function
(funcall TeX-after-start-process-function process))
(set-process-filter process #'TeX-background-filter)
@@ -8030,9 +8030,9 @@ With support for MS-DOS, especially when dviout is used
with PC-9801 series."
(set-buffer (get-buffer-create "*TeX silent*"))
(if dir (cd dir))
(erase-buffer)
- (let ((process (start-process (concat name " silent")
- (current-buffer) TeX-shell
- TeX-shell-command-option command)))
+ (let ((process (start-file-process (concat name " silent")
+ (current-buffer) TeX-shell
+ TeX-shell-command-option command)))
(if TeX-after-start-process-function
(funcall TeX-after-start-process-function process))
(set-process-query-on-exit-flag process nil))))
--
2.30.2
- AucTeX and TRAMP,
Philip Kaludercic <=