all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72018@debbugs.gnu.org
Subject: bug#72018: 30.0.60; [PATCH] Don't emit a prompt when a background Eshell process is killed
Date: Wed, 10 Jul 2024 09:16:11 -0700	[thread overview]
Message-ID: <6a233903-b1df-3d8b-1c25-e6b4b40b4cd5@gmail.com> (raw)
In-Reply-To: <86frsho5u2.fsf@gnu.org>

On 7/10/2024 4:16 AM, Eli Zaretskii wrote:
>> Date: Tue, 9 Jul 2024 11:04:05 -0700
>> From: Jim Porter <jporterbugs@gmail.com>
>>
>> This is a regression from Emacs 29, likely due to some changes I made to
>> improve support for complex background commands. Eli, is this ok to
>> merge to the release branch?
> 
> I don't think I understand the essence of the change, and thus cannot
> appreciate its effects enough to be able to answer this.  What is the
> significance of '(car command)' in this hunk:

'command' is a "command entry", and the result of 
'eshell-commands-for-process', which returns a list of elements of the form:

     (BACKGROUND FORM PROCESSES)

BACKGROUND is non-nil if the command is being run in the background.

>> +          ;; Reset the prompt if the command we just aborted was in the
>> +          ;; foreground.
>> +          (unless (car command)
>> +            (declare-function eshell-reset "esh-mode" (&optional no-hooks))
>> +            (eshell-reset)))))))
> 
> IOW, why '(car command)' is used as an indication of a fore/background
> command?  Also, why does the comment say "foreground" while your text
> says we don't want the prompt if the killed program was in the
> background?

We want to reset the prompt (this just emits a new command prompt) for 
foreground commands, but for background commands, we don't need to do 
anything. Would it be clearer if I inverted the wording in the comment, 
like, "Don't reset the prompt if the command we just aborted was in the 
background"?





  reply	other threads:[~2024-07-10 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 18:04 bug#72018: 30.0.60; [PATCH] Don't emit a prompt when a background Eshell process is killed Jim Porter
2024-07-10 11:16 ` Eli Zaretskii
2024-07-10 16:16   ` Jim Porter [this message]
2024-07-10 17:34     ` Eli Zaretskii
2024-07-10 19:55       ` Jim Porter
2024-07-11  4:34         ` Eli Zaretskii
2024-07-11 23:44           ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a233903-b1df-3d8b-1c25-e6b4b40b4cd5@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=72018@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.