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: Arash Esbati
Subject: bug#34645: Make TeX-process-check prompt optional?
Date: Tue, 12 Mar 2024 18:59:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Reuben Thomas <rrt@sc3d.org> writes:

> I find myself frequently being prompted by TeX-process-check while
> editing a document that takes a long time to process. I always want to
> kill the process and start a new one.
>
> Would it be possible to add an option to disable the prompt, or is
> there some reason why the prompt should always be offered?

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

Hi Reuben,

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---

> I guess that in situations like mine an even better behaviour might be
> to always let a run continue until it is done, but to queue up another
> run when some change is outstanding. That way, one does not risk the
> output document not updating for a long time if frequent edits are
> being made and no LaTeX run ever completes, because it is always being
> interrupted.

Hmm, not sure about this idea.  This sounds like running LaTeX
continuously.  What do others think?

> Finally, I noticed one typo (version 12.1.2 of AUCTeX): the docstring
> of TeX-process-check says "exist", and should say "exists".

Thanks, I fixed this.

Again, sorry for being late.

Best, Arash





reply via email to

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