From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46033@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Reply-To: reporter Received: via spool by submit@debbugs.gnu.org id=B.16113217329723 (code B ref -1); Fri, 22 Jan 2021 13:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2021 13:22:12 +0000 Received: from localhost ([127.0.0.1]:60194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2wOC-0002Wk-4O for submit@debbugs.gnu.org; Fri, 22 Jan 2021 08:22:12 -0500 Received: from lists.gnu.org ([209.51.188.17]:51518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2wO9-0002WZ-Em for submit@debbugs.gnu.org; Fri, 22 Jan 2021 08:22:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2wO8-0007Pv-V9 for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2021 08:22:09 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:54227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2wO5-0001I5-Bs for bug-gnu-emacs@gnu.org; Fri, 22 Jan 2021 08:22:08 -0500 Date: Fri, 22 Jan 2021 13:21:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611321720; bh=iMHnbNITifa61H/EWMesVrliFqY2YQkYZyjvXS7ts1I=; h=Date:To:From:Reply-To:Subject:From; b=rbB8ygKj7FOk4zwIjwVPmkZFBZ+PDV7hwXBVytuvXwfICBpFH5pry7Owrku1FuG1I 9osAIb1Ksp3GkXkeXP9g6tpGwfpUrQlbCecE6YkgP1DwpRHgD17HGTIJ3Iw9Xptytp 64kGAecBKEX/Jk23UHLuVUfIxWj67RkT9qXaaPdg= From: reporter Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.132; envelope-from=laszlomail@protonmail.com; helo=mail-40132.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) 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.3 (--) Up/down arrow is useful in the replace prompt, because sometimes the replace text is long and spans multiple lines, so up/down is handy to navigate it. Up arrow can also retrieve previous history lines when you are already at the top line of the replacement. However, if there is a multiline replacement default in the prompt then up arrow steps into the prompt first and only further presses retrieve history: https://i.imgur.com/7G3FcPX.png Up arrow should not lead the user uselessly into the prompt text. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: reporter Cc: 46033@debbugs.gnu.org Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161132373212712 (code B ref 46033); Fri, 22 Jan 2021 13:56:01 +0000 Received: (at 46033) by debbugs.gnu.org; 22 Jan 2021 13:55:32 +0000 Received: from localhost ([127.0.0.1]:60204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2wuS-0003Iy-CE for submit@debbugs.gnu.org; Fri, 22 Jan 2021 08:55:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2wuO-0003Ii-7G for 46033@debbugs.gnu.org; Fri, 22 Jan 2021 08:55:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47468) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2wuI-0007iI-M1; Fri, 22 Jan 2021 08:55:22 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2674 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l2wuH-0007U9-8l; Fri, 22 Jan 2021 08:55:21 -0500 Date: Fri, 22 Jan 2021 15:55:20 +0200 Message-Id: <83czxx5b5j.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: X-Spam-Score: -2.3 (--) 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: -3.3 (---) > Date: Fri, 22 Jan 2021 13:21:50 +0000 > From: laszlomail--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Up/down arrow is useful in the replace prompt, because sometimes > the replace text is long and spans multiple lines, so up/down is > handy to navigate it. > > Up arrow can also retrieve previous history lines when you are > already at the top line of the replacement. > > However, if there is a multiline replacement default in the > prompt then up arrow steps into the prompt first and only further > presses retrieve history: > > https://i.imgur.com/7G3FcPX.png > > Up arrow should not lead the user uselessly into the prompt text. This is a feature: it allows you to scroll through the text shown in the minibuffer, in case you want to edit it. Use M-p to go directly to the previous history. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 14:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161132501014750 (code B ref 46033); Fri, 22 Jan 2021 14:17:01 +0000 Received: (at 46033) by debbugs.gnu.org; 22 Jan 2021 14:16:50 +0000 Received: from localhost ([127.0.0.1]:60237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2xF4-0003pq-5w for submit@debbugs.gnu.org; Fri, 22 Jan 2021 09:16:50 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:46813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l2xF0-0003pZ-K8 for 46033@debbugs.gnu.org; Fri, 22 Jan 2021 09:16:48 -0500 Date: Fri, 22 Jan 2021 14:16:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611324999; bh=xVspcpRCxJhrwxuXKqvehGA/hAJalQvWtQyb3kq3Xy0=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=oxEVAX+6BuRjH+lFodgyQDpEi3BdL1LleR+35tXmdtnnVGsaaOylCMe2id7h8agSp xfqtRlf/zifGytYZDqq++xDCg3B69YN5SuAtNisioOE+u/Ulp3AB687r2CocJSfZi3 q5TTrHEl1i1UE6HzycbWe8gHrE/n5ufuA4Jbc8Gs= From: reporter Message-ID: <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> In-Reply-To: <83czxx5b5j.fsf@gnu.org> References: <83czxx5b5j.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.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: -1.0 (-) > > This is a feature: it allows you to scroll through the text shown in > the minibuffer, in case you want to edit it. Use M-p to go directly > to the previous history. I understand it's a feature, but as you see in the picture the prompt is empty, and the full default replacement is visible. In this case arrow should retrieve the previous history, instead of going into the prompt, because there is nothing to scroll. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 18:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: reporter , 46033@debbugs.gnu.org Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.1611341109808 (code B ref 46033); Fri, 22 Jan 2021 18:46:02 +0000 Received: (at 46033) by debbugs.gnu.org; 22 Jan 2021 18:45:09 +0000 Received: from localhost ([127.0.0.1]:33090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l31Qi-0000CX-Kz for submit@debbugs.gnu.org; Fri, 22 Jan 2021 13:45:08 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l31Qg-00005G-Fs for 46033@debbugs.gnu.org; Fri, 22 Jan 2021 13:45:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9zFWS3igvpwRuhImPxpQ12cJUVPULoofOX0qsoYimJc=; b=r5QxzQeftflTO1vAfGfJvENN6H XKSoPF6gYUH9eFDgSrS/fFZJcWxlh33koyQPYeJbbBrtzfsnVaNbGCJHcF7hjEcjLAD9/C9nrTWXL A3bNKI+7pmtmOmTdm7hWalQQXWOzMtqTGjmVfwKgu+HJVbI5+O3FeNOVgGWp99gmUUIg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l31QU-00048P-6e; Fri, 22 Jan 2021 19:44:59 +0100 From: Lars Ingebrigtsen References: <83czxx5b5j.fsf@gnu.org> X-Now-Playing: Various's _Deathbomb Digital Singles Club Year 2_: "Is a Virtue" Date: Fri, 22 Jan 2021 19:44:52 +0100 In-Reply-To: <83czxx5b5j.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 22 Jan 2021 15:55:20 +0200") Message-ID: <87v9boyfob.fsf_-_@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > This is a feature: it allows you to scroll through the text shown in > the minibuffer, in case you want to edit it. Use M-p to go directly > to the previous history. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.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: -1.0 (-) Eli Zaretskii writes: > This is a feature: it allows you to scroll through the text shown in > the minibuffer, in case you want to edit it. Use M-p to go directly > to the previous history. I think the complaint is that this: M-: (read-string "Foo: ") and this: M-: (read-string "This is a very long prompt indeed and it goes on and on and never seems to stop oh yes now it did: ") work very differently. In the first case, the works the same as `M-p', In the latter case, puts point into the prompt. It does seem inconsistent. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jan 2021 18:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: laszlomail@protonmail.com, 46033@debbugs.gnu.org Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.16113415529040 (code B ref 46033); Fri, 22 Jan 2021 18:53:01 +0000 Received: (at 46033) by debbugs.gnu.org; 22 Jan 2021 18:52:32 +0000 Received: from localhost ([127.0.0.1]:33094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l31Xs-0002Lk-GP for submit@debbugs.gnu.org; Fri, 22 Jan 2021 13:52:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l31Xn-0002LU-Kg for 46033@debbugs.gnu.org; Fri, 22 Jan 2021 13:52:31 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53894) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l31Xi-0004h4-7p; Fri, 22 Jan 2021 13:52:22 -0500 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1231 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l31Xh-0007PZ-Ke; Fri, 22 Jan 2021 13:52:22 -0500 Date: Fri, 22 Jan 2021 20:52:19 +0200 Message-Id: <837do46bz0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87v9boyfob.fsf_-_@gnus.org> (message from Lars Ingebrigtsen on Fri, 22 Jan 2021 19:44:52 +0100) References: <83czxx5b5j.fsf@gnu.org> <87v9boyfob.fsf_-_@gnus.org> X-Spam-Score: -2.3 (--) 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: -3.3 (---) > From: Lars Ingebrigtsen > Cc: reporter , 46033@debbugs.gnu.org > Date: Fri, 22 Jan 2021 19:44:52 +0100 > > I think the complaint is that this: > > M-: (read-string "Foo: ") > > > and this: > > M-: (read-string "This is a very long prompt indeed and it goes on and on and never seems to stop oh yes now it did: ") > > > work very differently. In the first case, the works the same as > `M-p', In the latter case, puts point into the prompt. > > It does seem inconsistent. That's how it's supposed to work, though. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 17:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 46033@debbugs.gnu.org Cc: laszlomail@protonmail.com, eliz@gnu.org X-Debbugs-Original-To: laszlomail--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: reporter , Eli Zaretskii , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Received: via spool by submit@debbugs.gnu.org id=B.16114232579316 (code B ref -1); Sat, 23 Jan 2021 17:35:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 17:34:17 +0000 Received: from localhost ([127.0.0.1]:35175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Mng-0002QB-Jf for submit@debbugs.gnu.org; Sat, 23 Jan 2021 12:34:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:46978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Mnc-0002Pr-PR for submit@debbugs.gnu.org; Sat, 23 Jan 2021 12:34:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Mnc-0002Du-IX for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 12:34:12 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Mna-0001km-Lv; Sat, 23 Jan 2021 12:34:12 -0500 X-Originating-IP: 91.129.98.64 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 070CC1C0004; Sat, 23 Jan 2021 17:34:01 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> Date: Sat, 23 Jan 2021 19:24:50 +0200 In-Reply-To: <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> (laszlomail's message of "Fri, 22 Jan 2021 14:16:38 +0000") Message-ID: <87ft2rd1ot.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=217.70.183.197; envelope-from=juri@linkov.net; helo=relay5-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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.6 (--) --=-=-= Content-Type: text/plain >> This is a feature: it allows you to scroll through the text shown in >> the minibuffer, in case you want to edit it. Use M-p to go directly >> to the previous history. > > I understand it's a feature, but as you see in the picture the prompt is > empty, and the full default replacement is visible. > > In this case arrow should retrieve the previous history, instead of going > into the prompt, because there is nothing to scroll. Thanks for the well justified request. This patch avoids moving point to the prompt on the rightful assumption that most of the time the users would not want to edit read-only text: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=avoid-minibuffer-prompt.patch diff --git a/lisp/simple.el b/lisp/simple.el index 0355ac863a..f5fe366f69 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2476,7 +2476,10 @@ previous-line-or-history-element (current-column))))) (condition-case nil (with-no-warnings - (previous-line arg)) + (previous-line arg) + ;; Avoid moving point to the prompt + (when (< (point) (minibuffer-prompt-end)) + (signal 'beginning-of-buffer nil))) (beginning-of-buffer ;; Restore old position since `line-move-visual' moves point to ;; the beginning of the line when it fails to go to the previous line. --=-=-=-- From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 17:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.16114233709567 (code B ref 46033); Sat, 23 Jan 2021 17:37:02 +0000 Received: (at 46033) by debbugs.gnu.org; 23 Jan 2021 17:36:10 +0000 Received: from localhost ([127.0.0.1]:35191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3MpW-0002UF-0O for submit@debbugs.gnu.org; Sat, 23 Jan 2021 12:36:10 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:47545) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3MpU-0002U1-9t for 46033@debbugs.gnu.org; Sat, 23 Jan 2021 12:36:08 -0500 Date: Sat, 23 Jan 2021 17:35:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611423361; bh=Z7zJwjPX8iwQz/ZHIGfae9W7dqZJ/mrBT56bv53t0sw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=B+By+dhtTakCvVNGkCv1UvrfsLy2MitOQa3zeJKI6e3DBzNrDjgE9rYcZFvXUwmJa B3R20QeY71SMYfaqdxBIvYJpX5t2vUMtBa/q9jzy+yAVip9v0Qpl+lcj6uzeH7ijG3 zaOvVf1sloQ85PrN6mzC2C58KFqif3V39Zw2KnJg= From: reporter Message-ID: In-Reply-To: <837do46bz0.fsf@gnu.org> References: <83czxx5b5j.fsf@gnu.org> <87v9boyfob.fsf_-_@gnus.org> <837do46bz0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.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: -1.0 (-) > > That's how it's supposed to work, though. It is not useful at all when the prompt is empty and the full default replacement is visible, because then there is nothing to scroll. This is the case just after the user invoked query replace. If the user does not type anything for a new replacement then he wants to retrieve a previous replacement. In this specific case up arrow should also retrieve the previous history, instead of going into the prompt which is useless in this case. https://i.imgur.com/7G3FcPX.png From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 46033@debbugs.gnu.org, eliz@gnu.org X-Debbugs-Original-Cc: "laszlomail--- via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" , Eli Zaretskii , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by submit@debbugs.gnu.org id=B.161142399110554 (code B ref -1); Sat, 23 Jan 2021 17:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 17:46:31 +0000 Received: from localhost ([127.0.0.1]:35205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3MzX-0002kA-Ea for submit@debbugs.gnu.org; Sat, 23 Jan 2021 12:46:31 -0500 Received: from lists.gnu.org ([209.51.188.17]:54658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3MzV-0002jy-OZ for submit@debbugs.gnu.org; Sat, 23 Jan 2021 12:46:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3MzV-0006Q9-GW for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 12:46:29 -0500 Received: from mail-40141.protonmail.ch ([185.70.40.141]:17929) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3MzT-0006P5-21; Sat, 23 Jan 2021 12:46:29 -0500 Date: Sat, 23 Jan 2021 17:46:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611423984; bh=vyJaX7W94bbSxWbOqyD+vkDA+uUbyn3NsclBueOxfzE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=f9RuO4AhW7/Mw8QfCiCQ01CJMGsYKY6jZfmTxO7GMp8mrHUpQrMMUV6JvjxNxd3g2 1DC49Vu7peEM8bhSSS5c5OrSH9+36ORYS2NDynVFUkemwPFZanJedapQR3HRuOY9K5 tLnsHp5UeKLf2fDwNSOAD875AJ7JcLE2dgiBGvbQ= From: reporter Message-ID: In-Reply-To: <87ft2rd1ot.fsf@mail.linkov.net> References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> <87ft2rd1ot.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_VoGWXTxmQpuzEKtwiU4OsdVbzxjQKSMwjdbZYHkJBM" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.141; envelope-from=laszlomail@protonmail.com; helo=mail-40141.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) This is a multi-part message in MIME format. --b1_VoGWXTxmQpuzEKtwiU4OsdVbzxjQKSMwjdbZYHkJBM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > Thanks for the well justified request. This patch avoids moving point > to the prompt on the rightful assumption that most of the time the users > would not want to edit read-only text: This breaks the history retrieval feature with up arrow. With the current implementation up arrow takes you into the prompt, but if you are in the top line of the prompt and press up arrow again then up arrow retrieves history. In the case I described going into the prompt is useless, so up arrow should retrieve history immediately, without having to go to the top line of the prompt first. --b1_VoGWXTxmQpuzEKtwiU4OsdVbzxjQKSMwjdbZYHkJBM Content-Type: text/x-diff; name=avoid-minibuffer-prompt.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=avoid-minibuffer-prompt.patch ZGlmZiAtLWdpdCBhL2xpc3Avc2ltcGxlLmVsIGIvbGlzcC9zaW1wbGUuZWwKaW5kZXggMDM1NWFj ODYzYS4uZjVmZTM2NmY2OSAxMDA2NDQKLS0tIGEvbGlzcC9zaW1wbGUuZWwKKysrIGIvbGlzcC9z aW1wbGUuZWwKQEAgLTI0NzYsNyArMjQ3NiwxMCBAQCBwcmV2aW91cy1saW5lLW9yLWhpc3Rvcnkt ZWxlbWVudAogCQkJIChjdXJyZW50LWNvbHVtbikpKSkpCiAgICAgKGNvbmRpdGlvbi1jYXNlIG5p bAogCSh3aXRoLW5vLXdhcm5pbmdzCi0JICAocHJldmlvdXMtbGluZSBhcmcpKQorCSAgKHByZXZp b3VzLWxpbmUgYXJnKQorICAgICAgICAgIDs7IEF2b2lkIG1vdmluZyBwb2ludCB0byB0aGUgcHJv bXB0CisgICAgICAgICAgKHdoZW4gKDwgKHBvaW50KSAobWluaWJ1ZmZlci1wcm9tcHQtZW5kKSkK KyAgICAgICAgICAgIChzaWduYWwgJ2JlZ2lubmluZy1vZi1idWZmZXIgbmlsKSkpCiAgICAgICAo YmVnaW5uaW5nLW9mLWJ1ZmZlcgogICAgICAgIDs7IFJlc3RvcmUgb2xkIHBvc2l0aW9uIHNpbmNl IGBsaW5lLW1vdmUtdmlzdWFsJyBtb3ZlcyBwb2ludCB0bwogICAgICAgIDs7IHRoZSBiZWdpbm5p bmcgb2YgdGhlIGxpbmUgd2hlbiBpdCBmYWlscyB0byBnbyB0byB0aGUgcHJldmlvdXMgbGluZS4K --b1_VoGWXTxmQpuzEKtwiU4OsdVbzxjQKSMwjdbZYHkJBM-- From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161142585713406 (code B ref 46033); Sat, 23 Jan 2021 18:18:01 +0000 Received: (at 46033) by debbugs.gnu.org; 23 Jan 2021 18:17:37 +0000 Received: from localhost ([127.0.0.1]:35239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NTd-0003UA-Ms for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:17:37 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:28888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NTb-0003Tw-Sc for 46033@debbugs.gnu.org; Sat, 23 Jan 2021 13:17:36 -0500 Date: Sat, 23 Jan 2021 18:17:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611425849; bh=eE4dETJCD8lPdLa5B3HECVVT5tUvU3XIU0FF9aCESjU=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=WFrOXmZst10H75xh7ziSsBsqvNYShxW9IyZ4AmgEQ16lRfHK36B36ctBYLPQQjgOJ GNFRarLtW5pALLODk7CJe+cFLFMo8BevUy+fzScTTunsTFrKRB2GauRSJOR9bP+oiH 5VwzGIb0uMR1WJb6f1Rpt2fo0CHL7DfTxLdF/iks= From: reporter Message-ID: In-Reply-To: References: <83czxx5b5j.fsf@gnu.org> <87v9boyfob.fsf_-_@gnus.org> <837do46bz0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_SZMcTfukv3DTapGzSMvsO4lJcDxp6r3y5YspdVvRY" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.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: -1.0 (-) This is a multi-part message in MIME format. --b1_SZMcTfukv3DTapGzSMvsO4lJcDxp6r3y5YspdVvRY Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > In this specific case up arrow should also retrieve the previous > history, instead of going into the prompt which is useless in > this case. > Attached a patch doing what I propose. --b1_SZMcTfukv3DTapGzSMvsO4lJcDxp6r3y5YspdVvRY Content-Type: application/octet-stream; name=prompt.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=prompt.patch YzovUHJvZ3JhfjIvR251V2luMzIvYmluL2RpZmYuZXhlIC11ICJjOi9Qcm9ncmFtIEZpbGVzL2Vt YWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcuMS9saXNwL3NpbXBsZS5lbCIgImQ6L2Rvd25sb2FkL3Np bXBsZS5lbCINCi0tLSBjOi9Qcm9ncmFtIEZpbGVzL2VtYWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcu MS9saXNwL3NpbXBsZS5lbAkyMDIwLTA4LTEyIDA4OjM2OjU0LjAwMDAwMDAwMCArMDIwMA0KKysr IGQ6L2Rvd25sb2FkL3NpbXBsZS5lbAkyMDIxLTAxLTIzIDE5OjE1OjAwLjQyODYzMTMwMCArMDEw MA0KQEAgLTIzMDMsNiArMjMwMyw5IEBADQogCQkJIChjdXJyZW50LWNvbHVtbikpKSkpDQogICAg IChjb25kaXRpb24tY2FzZSBuaWwNCiAJKHdpdGgtbm8td2FybmluZ3MNCisgICAgICAgICAgKGlm IChlcSAocG9pbnQtbWluKSA7OyBwcm9tcHQgaXMgZW50aXJlbHkgdmlzaWJsZQ0KKyAgICAgICAg ICAgICAgICAgICgtIChtaW5pYnVmZmVyLXByb21wdC1lbmQpIChsZW5ndGggKG1pbmlidWZmZXIt cHJvbXB0KSkpKQ0KKyAgICAgICAgICAgICAgKHNpZ25hbCAnYmVnaW5uaW5nLW9mLWJ1ZmZlciBu aWwpKSA7OyBnZXQgcHJldmlvdXMgaGlzdG9yeSBpdGVtDQogCSAgKHByZXZpb3VzLWxpbmUgYXJn KSkNCiAgICAgICAoYmVnaW5uaW5nLW9mLWJ1ZmZlcg0KICAgICAgICA7OyBSZXN0b3JlIG9sZCBw b3NpdGlvbiBzaW5jZSBgbGluZS1tb3ZlLXZpc3VhbCcgbW92ZXMgcG9pbnQgdG8NCg0KRGlmZiBm aW5pc2hlZC4gIFNhdCBKYW4gMjMgMTk6MTU6MDIgMjAyMQ0K --b1_SZMcTfukv3DTapGzSMvsO4lJcDxp6r3y5YspdVvRY-- From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161142664314637 (code B ref 46033); Sat, 23 Jan 2021 18:31:02 +0000 Received: (at 46033) by debbugs.gnu.org; 23 Jan 2021 18:30:43 +0000 Received: from localhost ([127.0.0.1]:35249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NgJ-0003o1-3p for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:30:43 -0500 Received: from mail4.protonmail.ch ([185.70.40.27]:23551) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3NgI-0003np-0A for 46033@debbugs.gnu.org; Sat, 23 Jan 2021 13:30:42 -0500 Date: Sat, 23 Jan 2021 18:30:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611426635; bh=Dar+pRXHOr83D7UYZq1QkBJosOtfyHavHZOP/nLQPXQ=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=L7bvhz8ARYgBbGoiDIahuopkSrkg2lj7h8mF1lJ2og3aQgp7O6geA4wfX3u938ui7 XJZDqpmRYuCcsF9obIICq46mZnkvDW/88ZTanqgLCxbtrQSbLPFjFH+Zl3MR3GUe36 q6IjYpNFgMJapX7+r3cvomd17TuoDL7i2FOW4yfc= From: reporter Message-ID: In-Reply-To: References: <83czxx5b5j.fsf@gnu.org> <87v9boyfob.fsf_-_@gnus.org> <837do46bz0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_LGRoqNpFJQfi8LYSzQToK9tsVelvr60OWyWrryImE5A" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: 0.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: -1.0 (-) This is a multi-part message in MIME format. --b1_LGRoqNpFJQfi8LYSzQToK9tsVelvr60OWyWrryImE5A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > Attached a patch doing what I propose. Fixed typo (using window-start). --b1_LGRoqNpFJQfi8LYSzQToK9tsVelvr60OWyWrryImE5A Content-Type: application/octet-stream; name=prompt.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=prompt.patch YzovUHJvZ3JhfjIvR251V2luMzIvYmluL2RpZmYuZXhlIC11ICJjOi9Qcm9ncmFtIEZpbGVzL2Vt YWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcuMS9saXNwL3NpbXBsZS5lbCIgImQ6L2Rvd25sb2FkL3Np bXBsZS5lbCINCi0tLSBjOi9Qcm9ncmFtIEZpbGVzL2VtYWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcu MS9saXNwL3NpbXBsZS5lbAkyMDIwLTA4LTEyIDA4OjM2OjU0LjAwMDAwMDAwMCArMDIwMA0KKysr IGQ6L2Rvd25sb2FkL3NpbXBsZS5lbAkyMDIxLTAxLTIzIDE5OjI4OjE5Ljc1MjgzNDgwMCArMDEw MA0KQEAgLTIzMDMsNiArMjMwMyw5IEBADQogCQkJIChjdXJyZW50LWNvbHVtbikpKSkpDQogICAg IChjb25kaXRpb24tY2FzZSBuaWwNCiAJKHdpdGgtbm8td2FybmluZ3MNCisgICAgICAgICAgKGlm IChlcSAod2luZG93LXN0YXJ0KSA7OyBwcm9tcHQgaXMgZW50aXJlbHkgdmlzaWJsZQ0KKyAgICAg ICAgICAgICAgICAgICgtIChtaW5pYnVmZmVyLXByb21wdC1lbmQpIChsZW5ndGggKG1pbmlidWZm ZXItcHJvbXB0KSkpKQ0KKyAgICAgICAgICAgICAgKHNpZ25hbCAnYmVnaW5uaW5nLW9mLWJ1ZmZl ciBuaWwpKSA7OyBnZXQgcHJldmlvdXMgaGlzdG9yeSBpdGVtDQogCSAgKHByZXZpb3VzLWxpbmUg YXJnKSkNCiAgICAgICAoYmVnaW5uaW5nLW9mLWJ1ZmZlcg0KICAgICAgICA7OyBSZXN0b3JlIG9s ZCBwb3NpdGlvbiBzaW5jZSBgbGluZS1tb3ZlLXZpc3VhbCcgbW92ZXMgcG9pbnQgdG8NCg0KRGlm ZiBmaW5pc2hlZC4gIFNhdCBKYW4gMjMgMTk6Mjg6NDIgMjAyMQ0K --b1_LGRoqNpFJQfi8LYSzQToK9tsVelvr60OWyWrryImE5A-- From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Lars Ingebrigtsen , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161142681114906 (code B ref 46033); Sat, 23 Jan 2021 18:34:02 +0000 Received: (at 46033) by debbugs.gnu.org; 23 Jan 2021 18:33:31 +0000 Received: from localhost ([127.0.0.1]:35257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Nj0-0003sM-P1 for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:33:30 -0500 Received: from mail-40141.protonmail.ch ([185.70.40.141]:60236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Niz-0003s9-Np for 46033@debbugs.gnu.org; Sat, 23 Jan 2021 13:33:30 -0500 Date: Sat, 23 Jan 2021 18:33:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611426803; bh=SAMgUK2hnkDQcG9T7nyaulCvGdO5X/tYjtJCcAfX64E=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=LUYpJFjJy9IuEaA20RiwsqiTeF9IrKmlGBXrPmCH7gmpcMiRG8IouZkkjK/lUhdJV UrNTsvNfDmVSrb3zzdcZm9GDIln/l88+IAEpwWhBjF5GYBkWZkGTMzozGGKfA73Y32 UPSvr8WZbpy3uM9d/ojkdBf4rPEilXrphdjcY6w8= From: reporter Message-ID: <0mAanQqT5Xg5pqncs_tlxSRa-_YTqeDg2MaJeQxy7MZ2MSnNA09yDdj9w8dgv7YtsP78L6nkpMVS14KEZAgWcAEL8IkdkOreVeJWDx_vjPs=@protonmail.com> In-Reply-To: References: <83czxx5b5j.fsf@gnu.org> <87v9boyfob.fsf_-_@gnus.org> <837do46bz0.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_GRnZwkLtgDlBibL6GtuimiknLK1YF1qfVyaZCTHXJc" X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Spam-Score: -0.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: -1.0 (-) This is a multi-part message in MIME format. --b1_GRnZwkLtgDlBibL6GtuimiknLK1YF1qfVyaZCTHXJc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > > Attached a patch doing what I propose. > > Fixed typo (using window-start). Third time's a charm. --b1_GRnZwkLtgDlBibL6GtuimiknLK1YF1qfVyaZCTHXJc Content-Type: application/octet-stream; name=prompt.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=prompt.patch YzovUHJvZ3JhfjIvR251V2luMzIvYmluL2RpZmYuZXhlIC11ICJjOi9Qcm9ncmFtIEZpbGVzL2Vt YWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcuMS9saXNwL3NpbXBsZS5lbCIgImQ6L2Rvd25sb2FkL3Np bXBsZS5lbCINCi0tLSBjOi9Qcm9ncmFtIEZpbGVzL2VtYWNzLTI3LjEvc2hhcmUvZW1hY3MvMjcu MS9saXNwL3NpbXBsZS5lbAkyMDIwLTA4LTEyIDA4OjM2OjU0LjAwMDAwMDAwMCArMDIwMA0KKysr IGQ6L2Rvd25sb2FkL3NpbXBsZS5lbAkyMDIxLTAxLTIzIDE5OjMxOjUwLjgyNDQ2MTIwMCArMDEw MA0KQEAgLTIzMDMsNiArMjMwMyw4IEBADQogCQkJIChjdXJyZW50LWNvbHVtbikpKSkpDQogICAg IChjb25kaXRpb24tY2FzZSBuaWwNCiAJKHdpdGgtbm8td2FybmluZ3MNCisgICAgICAgICAgKGlm IChlcSAod2luZG93LXN0YXJ0KSAocG9pbnQtbWluKSkgIDs7IHByb21wdCBpcyBlbnRpcmVseSB2 aXNpYmxlDQorICAgICAgICAgICAgICAoc2lnbmFsICdiZWdpbm5pbmctb2YtYnVmZmVyIG5pbCkp IDs7IGdldCBwcmV2aW91cyBoaXN0b3J5IGl0ZW0NCiAJICAocHJldmlvdXMtbGluZSBhcmcpKQ0K ICAgICAgIChiZWdpbm5pbmctb2YtYnVmZmVyDQogICAgICAgIDs7IFJlc3RvcmUgb2xkIHBvc2l0 aW9uIHNpbmNlIGBsaW5lLW1vdmUtdmlzdWFsJyBtb3ZlcyBwb2ludCB0bw0KDQpEaWZmIGZpbmlz aGVkLiAgU2F0IEphbiAyMyAxOTozMjowNiAyMDIxDQo= --b1_GRnZwkLtgDlBibL6GtuimiknLK1YF1qfVyaZCTHXJc-- From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: reporter Cc: 46033@debbugs.gnu.org, eliz@gnu.org X-Debbugs-Original-Cc: "laszlomail--- via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" , Eli Zaretskii , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Received: via spool by submit@debbugs.gnu.org id=B.161142729315632 (code B ref -1); Sat, 23 Jan 2021 18:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 18:41:33 +0000 Received: from localhost ([127.0.0.1]:35267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Nqn-000444-4Y for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:41:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:40352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3Nqk-00043u-CY for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:41:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Nqh-00028X-QS for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 13:41:28 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3Nqf-0004Ff-AD; Sat, 23 Jan 2021 13:41:27 -0500 X-Originating-IP: 91.129.98.64 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id EFCFAE0004; Sat, 23 Jan 2021 18:41:18 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> <87ft2rd1ot.fsf@mail.linkov.net> Date: Sat, 23 Jan 2021 20:34:34 +0200 In-Reply-To: (reporter's message of "Sat, 23 Jan 2021 17:46:18 +0000") Message-ID: <877do3a4ed.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.196; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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.6 (--) >> This patch avoids moving point to the prompt on the rightful >> assumption that most of the time the users would not want to edit >> read-only text: > > This breaks the history retrieval feature with up arrow. > > With the current implementation up arrow takes you into the prompt, but if > you are in the top line of the prompt and press up arrow again then up > arrow retrieves history. > > In the case I described going into the prompt is useless, so up arrow > should retrieve history immediately, without having to go to the top > line of the prompt first. This is exactly what the patch does. Have you really tried it? From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: reporter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2021 18:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 46033@debbugs.gnu.org, eliz@gnu.org X-Debbugs-Original-Cc: "laszlomail--- via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\"" , Eli Zaretskii , "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Reply-To: reporter Received: via spool by submit@debbugs.gnu.org id=B.161142799716740 (code B ref -1); Sat, 23 Jan 2021 18:54:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 18:53:17 +0000 Received: from localhost ([127.0.0.1]:35287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3O29-0004Lq-7s for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:53:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:54572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3O27-0004Lg-Qc for submit@debbugs.gnu.org; Sat, 23 Jan 2021 13:53:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3O27-000084-FZ for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2021 13:53:15 -0500 Received: from mail-40132.protonmail.ch ([185.70.40.132]:61911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3O24-00018g-8F; Sat, 23 Jan 2021 13:53:14 -0500 Date: Sat, 23 Jan 2021 18:53:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1611427988; bh=DCQ/fvc1t9q1QZQDe8JbWPVoOoGVSQjYsXYC1yUdavg=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=DvYSdx9lhfx+Pu2FCZ1zQBnHPuqnbkHlhbUPZSWB6KjodIm/7PpojweycF0W8muyR YpjOyhhx440ErpVV9h/A2eeDaiNZFRDyHKKLt9QNbPZ0CxoiRn9MTjl/w7rqdPyPds 6gx02fZFY3OfIc+wCWSAS4TEtB6jk4Evede9/1SU= From: reporter Message-ID: In-Reply-To: <877do3a4ed.fsf@mail.linkov.net> References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> <87ft2rd1ot.fsf@mail.linkov.net> <877do3a4ed.fsf@mail.linkov.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Received-SPF: pass client-ip=185.70.40.132; envelope-from=laszlomail@protonmail.com; helo=mail-40132.protonmail.ch 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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.3 (--) > > This is exactly what the patch does. Have you really tried it? Yes, I don't know what happened (I applied it manually), but I must have made an error, because it didn't work. Then I checked the original code and I came up with the same solution you did. So, yes, it does work. Thanks, and sorry for the confusion. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jan 2021 17:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: reporter Cc: "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.16115949305875 (code B ref 46033); Mon, 25 Jan 2021 17:16:01 +0000 Received: (at 46033) by debbugs.gnu.org; 25 Jan 2021 17:15:30 +0000 Received: from localhost ([127.0.0.1]:39804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l45Sb-0001Wf-ON for submit@debbugs.gnu.org; Mon, 25 Jan 2021 12:15:30 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:53963) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l45Sa-0001WO-2C; Mon, 25 Jan 2021 12:15:28 -0500 X-Originating-IP: 91.129.98.64 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A01FFE0002; Mon, 25 Jan 2021 17:15:19 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> <87ft2rd1ot.fsf@mail.linkov.net> <877do3a4ed.fsf@mail.linkov.net> Date: Mon, 25 Jan 2021 19:14:52 +0200 In-Reply-To: (reporter's message of "Sat, 23 Jan 2021 18:53:02 +0000") Message-ID: <871re9x7jn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) tags 46033 fixed close 46033 28.0.50 thanks >> This is exactly what the patch does. Have you really tried it? > > Yes, I don't know what happened (I applied it manually), but I > must have made an error, because it didn't work. > > Then I checked the original code and I came up with the same > solution you did. > > So, yes, it does work. Thanks, and sorry for the confusion. Thanks for confirming, now this is fixed. From unknown Mon Aug 18 19:34:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#46033: up arrow in query replace should not step into the prompt Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2021 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: reporter Cc: "46033@debbugs.gnu.org" <46033@debbugs.gnu.org> Received: via spool by 46033-submit@debbugs.gnu.org id=B46033.161177104820425 (code B ref 46033); Wed, 27 Jan 2021 18:11:02 +0000 Received: (at 46033) by debbugs.gnu.org; 27 Jan 2021 18:10:48 +0000 Received: from localhost ([127.0.0.1]:46066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pHD-0005JN-Qq for submit@debbugs.gnu.org; Wed, 27 Jan 2021 13:10:48 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:45847) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pHC-0005J8-Bq for 46033@debbugs.gnu.org; Wed, 27 Jan 2021 13:10:46 -0500 Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id DD14910000C; Wed, 27 Jan 2021 18:10:38 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <83czxx5b5j.fsf@gnu.org> <7sIywf2TKUTDST-QQJyKZzPIwKN6sUQuyb-1ReWQ09vPjrZwcAjSu-HOEwWJIAOio4ugVvqEYVcRFwMEJxN6rAitsq6Sf-dQkWQ67jHybfI=@protonmail.com> <87ft2rd1ot.fsf@mail.linkov.net> <877do3a4ed.fsf@mail.linkov.net> <871re9x7jn.fsf@mail.linkov.net> Date: Wed, 27 Jan 2021 20:10:14 +0200 In-Reply-To: <871re9x7jn.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 25 Jan 2021 19:14:52 +0200") Message-ID: <871re62qvr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) 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: -1.7 (-) --=-=-= Content-Type: text/plain >>> This is exactly what the patch does. Have you really tried it? >> >> Yes, I don't know what happened (I applied it manually), but I >> must have made an error, because it didn't work. >> >> Then I checked the original code and I came up with the same >> solution you did. >> >> So, yes, it does work. Thanks, and sorry for the confusion. > > Thanks for confirming, now this is fixed. Actually, this is not so simple. Currently this doesn't work with multi-line minibuffer. When there is non-prompt text on the previous line, it should move point to the editable portion of that line. So I pushed this patch that supports not only multi-line minibuffer contents, but also multi-line prompts. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=previous-line-or-history-element.patch diff --git a/lisp/simple.el b/lisp/simple.el index c878fdab92..680bfd7f43 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2472,14 +2472,24 @@ previous-line-or-history-element (save-excursion (goto-char (1- prompt-end)) (current-column))) - 0) + 1) (current-column))))) (condition-case nil (with-no-warnings (previous-line arg) ;; Avoid moving point to the prompt (when (< (point) (minibuffer-prompt-end)) - (signal 'beginning-of-buffer nil))) + ;; If there is minibuffer contents on the same line + (if (<= (minibuffer-prompt-end) + (save-excursion + (if (or truncate-lines (not line-move-visual)) + (end-of-line) + (end-of-visual-line)) + (point))) + ;; Move to the beginning of minibuffer contents + (goto-char (minibuffer-prompt-end)) + ;; Otherwise, go to the previous history element + (signal 'beginning-of-buffer nil)))) (beginning-of-buffer ;; Restore old position since `line-move-visual' moves point to ;; the beginning of the line when it fails to go to the previous line. --=-=-=--