From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs 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 Message-ID: <6a233903-b1df-3d8b-1c25-e6b4b40b4cd5@gmail.com> References: <86frsho5u2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30025"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72018@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 10 18:18:27 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sRa1T-0007fG-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Jul 2024 18:18:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRa10-0007l0-G9; Wed, 10 Jul 2024 12:17:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sRa0y-0007kg-R2 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 12:17:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sRa0y-0001JD-5r for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 12:17:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sRa13-0007N6-MA for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2024 12:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2024 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72018 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72018-submit@debbugs.gnu.org id=B72018.172062824528287 (code B ref 72018); Wed, 10 Jul 2024 16:18:01 +0000 Original-Received: (at 72018) by debbugs.gnu.org; 10 Jul 2024 16:17:25 +0000 Original-Received: from localhost ([127.0.0.1]:56985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRa0T-0007MB-EJ for submit@debbugs.gnu.org; Wed, 10 Jul 2024 12:17:25 -0400 Original-Received: from mail-pl1-f174.google.com ([209.85.214.174]:52320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sRa0R-0007Lm-BU for 72018@debbugs.gnu.org; Wed, 10 Jul 2024 12:17:23 -0400 Original-Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1fb3cf78ff3so45153075ad.0 for <72018@debbugs.gnu.org>; Wed, 10 Jul 2024 09:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720628171; x=1721232971; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=nI79hCfF8wICgrEcXzIK+Tzai25m248Qs+sbos6yC4E=; b=kZj80hEKDY0LdhOU6iQ4Kn/lKY8K0v+nI4TIem2qzCD3JICLdps9Kj+Nj1Yfw4Czqa V6f3pbz4qmFm8tzwhLfmbwjOs5alu+tc3LsQu+qF37ULb45nTPHeSY/OmrHNl7l44h8N pWKyLJR0DGQCKyK5wCX8ab6cqPTn4z0pG8CuNATyr+U7urLFCDkCse/IWKMvYWNmj/jQ 6HCCFoRHwulsLoRFO48Kk8wLikst25tXXhlAPVgDv1goY8v34uXkwUme4VmJfbP7D07t 3S9gM6Fr+Rcw9G/oj7WFKh0sL9U9s03GXVKVYQYeBB2vJJTu0FImtLpNMWpGIOpJAc9P j4YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720628171; x=1721232971; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nI79hCfF8wICgrEcXzIK+Tzai25m248Qs+sbos6yC4E=; b=UQDH5Oi7Cq9iwCOFpk994VgAwzdxJ7fuygQUrCQJ8sq08DKb6NKi8jxY7xJrNcNquW baGPSAoVC77Uz6dhe7tpGPRF5/NV7zq6kP9gN2Xs9VEsU1eAT9ZHeHA/D/NjJyUcwWAn uj86YZsVWzBM8WGrEFNftAwGsQqg2x1g2sHqrP60wLeQT3K5pXL6n49+JfDt0TXJuThe GgVCxxaFRcUTWpANtFp1ViKc9z5SPXb2CEBzTHl/8DbYtk0XCtLmvmvPzDz3TmddxUjg 0FKsikOl1ww7OZBt43RJeDV516EK70eDfxHKf2RhOqanvlos8kMyUU7cJA29n3R4cSBL wpJQ== X-Gm-Message-State: AOJu0YzDiz8fuDHmKdfklwyRrX58p99HJNux6RAWcEe3hER7cd6VBB0b dUp43JA5P6rS79j+nvrdXYoDjom8qhcOi1fgL0WG5+4qCsRA//iR X-Google-Smtp-Source: AGHT+IHpSH0qYPXr8wcXRQTZDhfQdLtRsKbX+cO++jGjJ5hHbBsEKvHo7wayQna02+y7F/ReSW1xvw== X-Received: by 2002:a17:903:124d:b0:1fb:6d12:2c1c with SMTP id d9443c01a7336-1fbb6d0b6d3mr54064665ad.19.1720628171100; Wed, 10 Jul 2024 09:16:11 -0700 (PDT) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1fbb6ab76aasm35430295ad.161.2024.07.10.09.16.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Jul 2024 09:16:10 -0700 (PDT) Content-Language: en-US In-Reply-To: <86frsho5u2.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288685 Archived-At: On 7/10/2024 4:16 AM, Eli Zaretskii wrote: >> Date: Tue, 9 Jul 2024 11:04:05 -0700 >> From: Jim Porter >> >> 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"?