From unknown Fri Aug 15 20:02:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#69078: [PATCH] esh-mode: Allow eshell-kill-output to actually kill the output. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Feb 2024 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69078 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 69078@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170775512728901 (code B ref -1); Mon, 12 Feb 2024 16:26:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Feb 2024 16:25:27 +0000 Received: from localhost ([127.0.0.1]:40294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZZ7W-0007W2-Hf for submit@debbugs.gnu.org; Mon, 12 Feb 2024 11:25:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rZZ7V-0007VL-AI for submit@debbugs.gnu.org; Mon, 12 Feb 2024 11:25:25 -0500 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 <~@wolfsden.cz>) id 1rZZ78-00078J-Oh for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 11:25:02 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rZZ76-0003aa-ID for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 11:25:02 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 35E64288DC2; Mon, 12 Feb 2024 16:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1707755096; bh=FBaC0ovYAwM4n959QAM6+TAcfjXaatFLB7je4YfwSN8=; h=From:To:Cc:Subject:Date; b=BNSCti9tpEd+MlMqDbxwgacseVXHE8O22rhdxOVefF1BppKtsGJm30UaSHzG1cOoF 9JVfu3kVOXr1MFLyKdjPHQC95pXLyprCQuK9d39h6u5Mi+yf8Ec4+rz6iErr58Sbra kQnoVccNltgQxVeTtTsy5HmfJgldZaYQStyQatIcHmH2IYltyPiL82MpodADGlMKOc cTSXgRYhtrK6S6oEG7QEDn0Ca+bmQKZR+F00vLXFs71rcSAZhPwbV18Y1Jy/FiU2GV QQ5qWSfV1zSqr3zHCOLaQF6tOYvuWWTNl/rsCqT2GlKsOvZO0rAjVFLSPKIMEn5yh3 aFEFIrE2/J13ki5G+TLFzfqq6xzEfX2bUZyOG8ewpR4SCjSE7+8HtaJU3VIpcgybVo RioJaltIeOEMqwQym7+MyX2qGsFhqYgrqotZ5KMVwbqANHK3nKdhoZxHv+YCmHmeQZ xFeL+1x1zcb1sqqJ0LhlOMyRkprZPA3oBlJPOEnc7NhsC8pBpkH/eboQYPD8p1Wos/ X3lOjCkhZQHzRXDy+/KTVqzjJE2KudsB7xEMi+ta16601KcohqfkRj7YtVIOf6Eguj KAgN8rGSTiZtvcthwTFWevLHzlvlFBNnVH985V+6SsAJBRmrM0fKQqFCHNdCN5qqRd TlGOP8J7OofTeYaUjQGknAYc= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.159]) by wolfsden.cz (Postfix) with ESMTPSA id 56329288B59; Mon, 12 Feb 2024 16:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1707755095; bh=FBaC0ovYAwM4n959QAM6+TAcfjXaatFLB7je4YfwSN8=; h=From:To:Cc:Subject:Date; b=FeKk8dAdrHwsMnBzqKy904rST2bz+aY36QF8yQGGMLRKlTq4DfkdJGpufHXkaO6nb /YLC0NDLwko7vfl5AEKZoxoxCIRtwvWRKyYfa3zoyE5yHb/M0bhnEeZYmb49zQCkIJ LcKk14IaZx2CKLXcKGBiZWzEtnmq1ubX2NiWVKroKsKjn7xLjGoXlDmm2tIO8ATDIj hWeYyjg8aMOwrM2lmEL60SE6E9faiy3vaLBJfhsUluNtB65GWcltpjP65WrGCnidOP qh2Vpc4keOhbm+WOgwd2Ksetg+A6CvcJ+AcplJYSEden+UDbdkdMf7JsGDXEYQy6JF lJ3XRpaYRIqZglOpLfkYkCdmK9KtrxnRhk7VXyq0B7B/MGgDTWbH+66RFEt8YR/ZEb ZihO70yaUsh6dIJxVCVUyJVQw76+in9IQL+MFH8oDcFN4Rt1IlQpf8rEua/RiytdAe AJ4uY3h5P7AGBMXLQiG9FU5oyLNbwImxk/qevst10lY79BxzMbR2CWTcF7F3wuV4un NoVaBI5FzemVa8KNuPUU+vU+XYYAnLP2C8r++DjFigNl7NaCiMDR5l3sS22+t32lzO 4qQ/1tSuiuL1dCRrgtyOz8tkg+vdZYMbBnRFkcW6HpDPuN979Ggk9hYrSje5BNZSBu tRboNLJK0NvVRtKrUxd7AwE8= From: Tomas Volf <~@wolfsden.cz> Date: Mon, 12 Feb 2024 17:22:39 +0100 Message-ID: <20240212162451.30490-1-~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Before this commit, the function eshell-kill-output, despite the name, did not allow to kill the output, it always just deleted it. This commit fixes that, allowing to do the kill with C-u. This mimics how comint mode operates, so from this commit C-c C-o and C-u C-c C-o will work the same way in eshell-mode and shell-mode. * lisp/eshell/esh-mode.el (eshell-kill-output): New optional argument, kill. --- The function name is misleading (and in comint is is called coming-delete-output), but changing it could break code, so I do not think it is worth it. Adding the argument should be enough. I do not have a copyright assignment, however the change is trivial, and mostly copied from comint-delete-output, so I do not think it is necessary. lisp/eshell/esh-mode.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index fd279f61673..882fc67b9a1 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -832,13 +832,18 @@ This function should be in the list `eshell-output-filter-functions'." eshell-last-output-start eshell-last-output-end)) -(defun eshell-kill-output () - "Kill all output from interpreter since last input. -Does not delete the prompt." - (interactive) +(defun eshell-kill-output (&optional kill) + "Delete all output from interpreter since last input. +If KILL (interactively, the prefix), save the killed text in the +kill ring. + +This command does not delete the prompt." + (interactive "P") (save-excursion (goto-char (eshell-beginning-of-output)) (insert "*** output flushed ***\n") + (when kill + (copy-region-as-kill (point) (eshell-end-of-output))) (delete-region (point) (eshell-end-of-output)))) (defun eshell-show-output (&optional arg) -- 2.41.0 From unknown Fri Aug 15 20:02:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tomas Volf <~@wolfsden.cz> Subject: bug#69078: closed (Re: bug#69078: [PATCH] esh-mode: Allow eshell-kill-output to actually kill the output.) Message-ID: References: <20240212162451.30490-1-~@wolfsden.cz> X-Gnu-PR-Message: they-closed 69078 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 69078@debbugs.gnu.org Date: Fri, 16 Feb 2024 02:30:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1708050602-21942-1" This is a multi-part message in MIME format... ------------=_1708050602-21942-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69078: [PATCH] esh-mode: Allow eshell-kill-output to actually kill the out= put. which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69078@debbugs.gnu.org. --=20 69078: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69078 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1708050602-21942-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69078-done) by debbugs.gnu.org; 16 Feb 2024 02:29:02 +0000 Received: from localhost ([127.0.0.1]:57698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ranyH-0005gL-Uq for submit@debbugs.gnu.org; Thu, 15 Feb 2024 21:29:02 -0500 Received: from mail-oo1-f48.google.com ([209.85.161.48]:51647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ranyG-0005ft-Ev for 69078-done@debbugs.gnu.org; Thu, 15 Feb 2024 21:29:01 -0500 Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-58e256505f7so246639eaf.3 for <69078-done@debbugs.gnu.org>; Thu, 15 Feb 2024 18:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708050456; x=1708655256; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=IShTfCRLRo3Qz/QNNjtkIkw4sIEha3j9zBoBTyedYvs=; b=R7ODOL2cZGNTfmgtlpv5WR8pjegxJafylTRUmxtzVGW4jgVr61zgYRAE0Phx11OiH5 H8RTy/vLZ4ocq6y8nRKWMjJ92AgKohyhXfcxANx7hApdQ1Rlu920JG5GcBwr/x6b0KeL OHVm4oEm65SziIO7G4Sxg1BDfhw+bERHg+JDaLGRxhgqPJ4xsiwllAIXpG00K+KFSqmt tzbaygRxrt1Y5RFnlUkCeDvLa/m9/zEmcDbXpCXapGD5dM/b7xNtFYnHySQC7aX4nhho iRhQsv2dIAThj6E6+tSqegxuDYw8gq/QdQFoPjerIc/kP15sZo6Xs0GCDLXWl+eZ8awd SAaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708050456; x=1708655256; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IShTfCRLRo3Qz/QNNjtkIkw4sIEha3j9zBoBTyedYvs=; b=e6THK5TxkPu7GEjb29xi28vp3ir666IF1wZ+DsgYHOg1Ep5EtdJMVHHhY0IJGE2lfs VS9+yi6P1TKkzqxHc0mlev33Mk61c9hh4LT1ItQSra4oiGWYRctnDHrEbqnJAJQ4UVd0 zQeF2XihZ5jsh6JMckyuNUNt0BgTlHTBWiNCKAa/c1nswPUShWaTcQ6laR1PuLN8FbTz +iRyl/Bt2yIy4mnrRYwIy4bpv43WR0jvgcAvQFlVO7lMrH188ozx7vnK19TTyoOaa8zw jsgp/rTJfmBf4C/E1kxj4v+d0G9pYYJXoAppjFb35w0JekwgDlOhIceqePa3QncVcwOa SIEA== X-Forwarded-Encrypted: i=1; AJvYcCWvHzxuu42ljUjaigtjh0grh1hnM5krwdfVrOH3gp15RNB3fD6IUk38qY4WAl/5gMzCiLbONyugCAktI4hwXDCu/Bm1jolCJ5ycHg== X-Gm-Message-State: AOJu0YzsMy+5f2pyNffL3pM32BVvJSQiHOuGqM/KNhGX4NKawNaPcn2n OsDEibQ1MKLBmbX9TfvuEiBsk1Qgho3enOK+F1gomfY/IUOYundhlClg6QWI X-Google-Smtp-Source: AGHT+IHkSX6UXM8Wy+OmEXzzQpCOdEQYqU9v+9DpuYsmeMrPPQsaTGZEtra7If1ieKsQ5SKxAK8/dw== X-Received: by 2002:a05:6358:5e15:b0:176:6144:2f12 with SMTP id q21-20020a0563585e1500b0017661442f12mr3707828rwn.28.1708050455655; Thu, 15 Feb 2024 18:27:35 -0800 (PST) Received: from [192.168.1.2] (076-168-148-233.res.spectrum.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id i65-20020a62c144000000b006e118d2db93sm2082734pfg.125.2024.02.15.18.27.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Feb 2024 18:27:35 -0800 (PST) Message-ID: Date: Thu, 15 Feb 2024 18:27:34 -0800 MIME-Version: 1.0 Subject: Re: bug#69078: [PATCH] esh-mode: Allow eshell-kill-output to actually kill the output. Content-Language: en-US To: Tomas Volf <~@wolfsden.cz>, 69078-done@debbugs.gnu.org References: <20240212162451.30490-1-~@wolfsden.cz> From: Jim Porter In-Reply-To: <20240212162451.30490-1-~@wolfsden.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 69078-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) On 2/12/2024 8:22 AM, Tomas Volf wrote: > Before this commit, the function eshell-kill-output, despite the name, > did not allow to kill the output, it always just deleted it. This > commit fixes that, allowing to do the kill with C-u. Thanks for noticing this. This makes sense to me, so I've merged it to the master branch as 572d58b5e8d. > The function name is misleading (and in comint is is called > coming-delete-output), but changing it could break code, so I do not think it is > worth it. Adding the argument should be enough. I also fixed this, but added an obsolete alias for the old name. That way, it won't break anything, and we can be a little more consistent with comint. Closing this bug now. ------------=_1708050602-21942-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Feb 2024 16:25:27 +0000 Received: from localhost ([127.0.0.1]:40294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZZ7W-0007W2-Hf for submit@debbugs.gnu.org; Mon, 12 Feb 2024 11:25:27 -0500 Received: from lists.gnu.org ([2001:470:142::17]:56198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rZZ7V-0007VL-AI for submit@debbugs.gnu.org; Mon, 12 Feb 2024 11:25:25 -0500 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 <~@wolfsden.cz>) id 1rZZ78-00078J-Oh for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 11:25:02 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1rZZ76-0003aa-ID for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 11:25:02 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 35E64288DC2; Mon, 12 Feb 2024 16:24:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1707755096; bh=FBaC0ovYAwM4n959QAM6+TAcfjXaatFLB7je4YfwSN8=; h=From:To:Cc:Subject:Date; b=BNSCti9tpEd+MlMqDbxwgacseVXHE8O22rhdxOVefF1BppKtsGJm30UaSHzG1cOoF 9JVfu3kVOXr1MFLyKdjPHQC95pXLyprCQuK9d39h6u5Mi+yf8Ec4+rz6iErr58Sbra kQnoVccNltgQxVeTtTsy5HmfJgldZaYQStyQatIcHmH2IYltyPiL82MpodADGlMKOc cTSXgRYhtrK6S6oEG7QEDn0Ca+bmQKZR+F00vLXFs71rcSAZhPwbV18Y1Jy/FiU2GV QQ5qWSfV1zSqr3zHCOLaQF6tOYvuWWTNl/rsCqT2GlKsOvZO0rAjVFLSPKIMEn5yh3 aFEFIrE2/J13ki5G+TLFzfqq6xzEfX2bUZyOG8ewpR4SCjSE7+8HtaJU3VIpcgybVo RioJaltIeOEMqwQym7+MyX2qGsFhqYgrqotZ5KMVwbqANHK3nKdhoZxHv+YCmHmeQZ xFeL+1x1zcb1sqqJ0LhlOMyRkprZPA3oBlJPOEnc7NhsC8pBpkH/eboQYPD8p1Wos/ X3lOjCkhZQHzRXDy+/KTVqzjJE2KudsB7xEMi+ta16601KcohqfkRj7YtVIOf6Eguj KAgN8rGSTiZtvcthwTFWevLHzlvlFBNnVH985V+6SsAJBRmrM0fKQqFCHNdCN5qqRd TlGOP8J7OofTeYaUjQGknAYc= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.159]) by wolfsden.cz (Postfix) with ESMTPSA id 56329288B59; Mon, 12 Feb 2024 16:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1707755095; bh=FBaC0ovYAwM4n959QAM6+TAcfjXaatFLB7je4YfwSN8=; h=From:To:Cc:Subject:Date; b=FeKk8dAdrHwsMnBzqKy904rST2bz+aY36QF8yQGGMLRKlTq4DfkdJGpufHXkaO6nb /YLC0NDLwko7vfl5AEKZoxoxCIRtwvWRKyYfa3zoyE5yHb/M0bhnEeZYmb49zQCkIJ LcKk14IaZx2CKLXcKGBiZWzEtnmq1ubX2NiWVKroKsKjn7xLjGoXlDmm2tIO8ATDIj hWeYyjg8aMOwrM2lmEL60SE6E9faiy3vaLBJfhsUluNtB65GWcltpjP65WrGCnidOP qh2Vpc4keOhbm+WOgwd2Ksetg+A6CvcJ+AcplJYSEden+UDbdkdMf7JsGDXEYQy6JF lJ3XRpaYRIqZglOpLfkYkCdmK9KtrxnRhk7VXyq0B7B/MGgDTWbH+66RFEt8YR/ZEb ZihO70yaUsh6dIJxVCVUyJVQw76+in9IQL+MFH8oDcFN4Rt1IlQpf8rEua/RiytdAe AJ4uY3h5P7AGBMXLQiG9FU5oyLNbwImxk/qevst10lY79BxzMbR2CWTcF7F3wuV4un NoVaBI5FzemVa8KNuPUU+vU+XYYAnLP2C8r++DjFigNl7NaCiMDR5l3sS22+t32lzO 4qQ/1tSuiuL1dCRrgtyOz8tkg+vdZYMbBnRFkcW6HpDPuN979Ggk9hYrSje5BNZSBu tRboNLJK0NvVRtKrUxd7AwE8= From: Tomas Volf <~@wolfsden.cz> To: bug-gnu-emacs@gnu.org Subject: [PATCH] esh-mode: Allow eshell-kill-output to actually kill the output. Date: Mon, 12 Feb 2024 17:22:39 +0100 Message-ID: <20240212162451.30490-1-~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Before this commit, the function eshell-kill-output, despite the name, did not allow to kill the output, it always just deleted it. This commit fixes that, allowing to do the kill with C-u. This mimics how comint mode operates, so from this commit C-c C-o and C-u C-c C-o will work the same way in eshell-mode and shell-mode. * lisp/eshell/esh-mode.el (eshell-kill-output): New optional argument, kill. --- The function name is misleading (and in comint is is called coming-delete-output), but changing it could break code, so I do not think it is worth it. Adding the argument should be enough. I do not have a copyright assignment, however the change is trivial, and mostly copied from comint-delete-output, so I do not think it is necessary. lisp/eshell/esh-mode.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index fd279f61673..882fc67b9a1 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -832,13 +832,18 @@ This function should be in the list `eshell-output-filter-functions'." eshell-last-output-start eshell-last-output-end)) -(defun eshell-kill-output () - "Kill all output from interpreter since last input. -Does not delete the prompt." - (interactive) +(defun eshell-kill-output (&optional kill) + "Delete all output from interpreter since last input. +If KILL (interactively, the prefix), save the killed text in the +kill ring. + +This command does not delete the prompt." + (interactive "P") (save-excursion (goto-char (eshell-beginning-of-output)) (insert "*** output flushed ***\n") + (when kill + (copy-region-as-kill (point) (eshell-end-of-output))) (delete-region (point) (eshell-end-of-output)))) (defun eshell-show-output (&optional arg) -- 2.41.0 ------------=_1708050602-21942-1--