From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#72282: History entries shouldn't have the exact region hardwired in Date: Thu, 25 Jul 2024 21:12:44 +0300 Organization: LINKOV.NET Message-ID: <86v80tig7r.fsf@mail.linkov.net> References: <87o76m1ilb.1.fsf@jidanni.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="15731"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 72282@debbugs.gnu.org To: Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 20:23:28 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 1sX37g-00041J-Fs for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 20:23:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX37D-0006jC-JF; Thu, 25 Jul 2024 14:22:59 -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 1sX379-0006iY-P1 for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:22:55 -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 1sX378-0002kB-VE for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:22:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sX37G-0003Ty-4O for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 14:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 18:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72282 X-GNU-PR-Package: emacs Original-Received: via spool by 72282-submit@debbugs.gnu.org id=B72282.172193177813364 (code B ref 72282); Thu, 25 Jul 2024 18:23:02 +0000 Original-Received: (at 72282) by debbugs.gnu.org; 25 Jul 2024 18:22:58 +0000 Original-Received: from localhost ([127.0.0.1]:37746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX37B-0003TU-RV for submit@debbugs.gnu.org; Thu, 25 Jul 2024 14:22:58 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:46375) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX37A-0003TE-Ec for 72282@debbugs.gnu.org; Thu, 25 Jul 2024 14:22:57 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 26D06C0002; Thu, 25 Jul 2024 18:22:20 +0000 (UTC) In-Reply-To: <87o76m1ilb.1.fsf@jidanni.org> (Dan Jacobson's message of "Thu, 25 Jul 2024 07:22:08 +0800") X-GND-Sasl: juri@linkov.net 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:289327 Archived-At: > (repeat-complex-command) > is great, except when used after > (shell-command-on-region) > in which case we will be repeating > (shell-command-on-region 2234 2892 ...) > instead of just > (shell-command-on-region REGION-START REGION-END ...) > in other words the previous exact region is hardwired into > the history. > > Yes, you might say well then just do `M-| RET`. > Well that's harder to type than ``, ``, `C-x M-:` or `C-x M-ESC`, > which are the bindings of repeat-complex-command. > > So maybe for all history items, they shouldn't have the exact region hardwired in. Currently this can be achieved with a 'declare' form, but I don't know why this is not enabled consistently for region arguments of more commands: diff --git a/lisp/simple.el b/lisp/simple.el index a9f8b5845d8..b3a72c2635a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4944,6 +4944,9 @@ shell-command-on-region The differences are especially prominent when the region includes more than one line, i.e. when piping to a shell commands with embedded newlines." + (declare (interactive-args + (start (use-region-beginning)) + (end (use-region-end)))) (interactive (let (string) (unless (mark) (user-error "The mark is not set now, so there is no region"))