From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#46151: 28.0.50; Set revert-buffer-function in shell command output buffers Date: Sun, 31 Jan 2021 11:50:26 -0700 Message-ID: <87im7dszyl.fsf@melete.silentflame.com> References: <87lfcdd1he.fsf@melete.silentflame.com> <87im7gward.fsf@gnus.org> <87wnvwte7y.fsf@melete.silentflame.com> <87a6ssus1o.fsf@gnus.org> <87tuqztwyt.fsf@melete.silentflame.com> <87sg6j0wyg.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 46151@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 31 19:56:40 2021 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 1l6Htn-0005F6-QM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 19:56:40 +0100 Original-Received: from localhost ([::1]:36784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6Htm-0003gW-RI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 31 Jan 2021 13:56:38 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6HnO-0006VD-Li for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 13:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6HnO-0000sy-Ea for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 13:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6HnO-0002yn-CX for bug-gnu-emacs@gnu.org; Sun, 31 Jan 2021 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Jan 2021 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46151 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 46151-submit@debbugs.gnu.org id=B46151.161211898711429 (code B ref 46151); Sun, 31 Jan 2021 18:50:02 +0000 Original-Received: (at 46151) by debbugs.gnu.org; 31 Jan 2021 18:49:47 +0000 Original-Received: from localhost ([127.0.0.1]:58017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Hn9-0002yG-4U for submit@debbugs.gnu.org; Sun, 31 Jan 2021 13:49:47 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:48647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Hn7-0002y4-Sf for 46151@debbugs.gnu.org; Sun, 31 Jan 2021 13:49:46 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 0961398B; Sun, 31 Jan 2021 13:49:39 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 31 Jan 2021 13:49:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=ufgCg/ThO3hdjOrQq5fxTOdqUl mA5OqZuSEu1Wq90x8=; b=TxWcgcXHjzJu1IFYTHNd09Gr0qYzpPXBZNWQXPomIx lxSKWDa53K5csLDbkJjCwZSB4w2PlKE/7cC99hK7xoQ+sbdJaTIiuOZsFzDjDznu FKGmRK99vS9ZmZ2QIVCO2brh/yiU4ClEJ1lpEJ0sedCxwHa7bBAM3+C5J1m9ZklB 42DQcEw+AUC2i80XzoDTKWOmVBkpiZkaHVqw+oYa0xdPkLPhI13pXqYzwsy4KyOT tbvAqKe2V0HDxUnxVdx28E3kHM6mAotWvwqzYcx0kw4f+mtRPvkVFsKNCT/vZP0k MSzuMfCY5PPEAW8KYiiGyzp3y3kBPjQRdS1J7Q3Gg/4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=ufgCg/ ThO3hdjOrQq5fxTOdqUlmA5OqZuSEu1Wq90x8=; b=doNdDC3jI+3EM+MyPMY5Rz Q1d6uDwXNt/mJW9D1E32ZhUi9Bsy6kCAbBC0zlI45gNE9CwQtAJxAqPPmnQxCuDF a/6P9j3L0eZdWK/cjy97YYpwQ5l9ygi6ppeYIOhJ8vyqk1TyVLrGeds+35bkRSE8 hm3+5v5CFXP/ehTVXbHq84SpmSpw1Kk4qU9dqLE1NQ52cxLh94CiuTBTaIBQWRlk rvPRZHu54z/NvW7t8MWVPc7WL9NukIqKk7QaOgNlJs3pXbgASXwO32IgUj4d6uZA diGW5ZxL3FkfzbKSdViM6qsqHosTdXmvzT6ij/2QBZ3cK1x7MvIcLh2MmoMnJZzA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeigdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeegtddvheegfffhffdvfeefhffgjefflefhteevffffkeetgfdt jedtiedvtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: In-Reply-To: <87sg6j0wyg.fsf@gnus.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" Xref: news.gmane.io gmane.emacs.bugs:199025 Archived-At: Hello, On Sat 30 Jan 2021 at 07:18AM +01, Lars Ingebrigtsen wrote: > Sean Whitton writes: > >> This sort of thing could be pretty annoying if you happened to want to >> type the letter 'g' and thereby reran the command .. > > Indeed -- I was thinking about the `M-!' case only, and whether we'd > want to change the mode of the resulting buffer to a new mode that > inherits from `special-mode' (and `special-mode' defines the `g' > keystroke already). > > That's not appropriate for `M-&', I guess, which is in `shell-mode'... > but is that a good mode for command output, really? I think it's in shell-mode to facilitate interacting with the command while it is running -- for example, using C-c C-c to sent SIGINT, and also just typing into STDIN. So we're talking about switching the major-mode at the point the command exits, which seems like it could cause frustration -- imagine the command finishes up just while you're typing into the buffer and you happen to type 'g' ... >> How about binding C-c C-r instead of g? The mnemonic would be >> Reexecute. In *Async Shell Command* buffers this already has an >> inherited binding but I don't believe it is one that does anything >> useful in those buffers, so should be fine to override. >> >> An alternative would be to put the whole buffer in special-mode, which >> would bind 'g', and make shell command output more like M-x compile >> buffers. Could have a defcustom to turn this off. > > Indeed. Thinking more, I think my C-c C-r solution is the one I prefer; anyone else in favour of that? -- Sean Whitton