bug-auctex
[Top][All Lists]
Advanced

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

bug#34645: Make TeX-process-check prompt optional?


From: Reuben Thomas
Subject: bug#34645: Make TeX-process-check prompt optional?
Date: Tue, 12 Mar 2024 19:23:31 +0100

On Tue, 12 Mar 2024 at 18:59, Arash Esbati <arash@gnu.org> wrote:

are you thinking about something like this:

--8<---------------cut here---------------start------------->8---
(defun TeX-process-check (name)
  "Check if a process for the TeX document NAME already exists.
If so, give the user the choice of aborting the process or the current
command."
  (let (process)
    (while (and (setq process (TeX-process name))
                (eq (process-status process) 'run))
      (cond
       ((or TeX-kill-process-no-query ; (t or nil)
            (yes-or-no-p (concat "Process `"
                                 (process-name process)
                                 "' for document `"
                                 name
                                 "' running, kill it? ")))
        (delete-process process))
       ((eq (process-status process) 'run)
        (error "Cannot have two processes for the same document"))))))
--8<---------------cut here---------------end--------------->8---

Yes, that looks good!

Thanks for looking at this old bug report.
 
--
https://rrt.sc3d.org

reply via email to

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