From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#65980: 30.0.50; C-e behaves surprisingly in minibuffer Date: Thu, 14 Sep 2023 18:51:36 +0200 Message-ID: <877cos8zqf.fsf@rub.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24355"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 65980@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 14 18:52:24 2023 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 1qgpZn-00066H-MD for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Sep 2023 18:52:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgpZP-0005ED-Ct; Thu, 14 Sep 2023 12:51: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 1qgpZN-0005DW-DC for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 12:51: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 1qgpZN-00049R-5X for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 12:51:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgpZS-0000RS-CS for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 12:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2023 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65980 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16947103181671 (code B ref -1); Thu, 14 Sep 2023 16:52:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Sep 2023 16:51:58 +0000 Original-Received: from localhost ([127.0.0.1]:40995 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgpZN-0000Qs-KX for submit@debbugs.gnu.org; Thu, 14 Sep 2023 12:51:58 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:33176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgpZJ-0000QW-Nf for submit@debbugs.gnu.org; Thu, 14 Sep 2023 12:51:56 -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 1qgpZ7-00059f-W4 for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 12:51:42 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgpZ5-00043J-PJ for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 12:51:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1694710297; x=1695315097; i=stephen.berman@gmx.net; bh=LqO6isEuA1U/PrTEjPZVVLRYpG7W1tCuCcuZE2b3itU=; h=X-UI-Sender-Class:From:To:Subject:Date; b=kQtmGYQpgh2u7BdpXHZFqlVpkm/usC4hHHHQJcbu0LPjnyn0sv4uo9AgposIGPYRalCxtt89GTe n2N6wI14yixeyljkDzxeH6s1qaW7RHus56EAaVGhr+TcMR0cu6j25EC67b/IJYoBDe5poZ56Fm42r dh6vAPWOzCdVHbDDHFP3Ex1nGZGdq9uWe5YP43XTjNPIVp+k9ItrCfqEHtLTWEqd3xsZ9CNWBAOAj GRTSL/8RNSVj71whnlHKLcc9azYT5beI7D+6NLq19IT+/CLFvJZ2YfDhkwpHXD3A52MHIBAZJOTHb Zc81c2GmE+7zfQZMQQbvK14hiu8CnPkPf8lw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs2 ([94.134.196.114]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MuUjC-1rXHYo3MV0-00rZis for ; Thu, 14 Sep 2023 18:51:36 +0200 X-Provags-ID: V03:K1:zF9pvGbogyP0WkHPeP0+zpVX7dA9NG2lerXu1wxXbYRnxsAz2Mt V4nG9ekA1/Nv7WQSkcjPnyXge+s0YKNfoR8yaPgc1BdOdiIP5Hn0uGbsp5QGIr//fuxpQcv 9wNyDnxTmu+p0Qg7i9VKAr7J0t7GLQaZsM6EMwW8ftkjsq4hy82/t5gLg2O6bmy+HCB3FnQ QU4BBB7Qh+qSA9+/zaOdw== UI-OutboundReport: notjunk:1;M01:P0:Wy7VqdPeRWc=;kw26zXV1UFCmA8tPWB8Owg5yrOY 9y5EcFMSCyyhD3q1tlWmrexoB2MehqFll9DmFZ4zGLhwDzXv46s7qihM3OKv54yvcBLJELEb/ OOyMi2pTQzlUJ0POlmJY1+qwT3rDOXBhnqfEzMhbt3HMt5yIXu8BelNrbxNsWy8abtWkcELwy B9F4ICZb6CrjzlcV3iAiV5fJylKK1wlwwoSJybCvF74nfQxBOUTuVLY/H6TnMY/Wf4Fs6MEHN gl4KUxGAwG8qHqoHUOS4SZGltZ1l6MmVjjbLiMBLMLRhZQOv4B31SrwxU/nT96tfS6sBd68+f 2ilBqpq+933KujtF0nYYEM5vHD3+ZnSgkYxECHqi3KNtx38mKCl6uAoT291uPJeVLJFBrIhfK ve7SAxkcq+K2YRL6tlSI8ZODP+1COnhLUxNCD2WZMSc39Cp2VHdANWcHYRVBC1LL1gEyjOG1G 6A6F3+XDkUsoeaJRdFiKykXgHkpzHBx96B/zJTM+GWktXqppv4tKlMgiigfKQWEODettswinu FxP1Udq9ah1v56hiBIFRHwTz3muZeeghcCTGBcAnTJztvzkHxWLqBjfRAywsgYgO7N/ELhYxF Nl9WqZwdrNheiXQclU4Oo1TtBoBAplE+b9r/jyZzX8NmYrwVZi/Huo4/O+aVQ0i6zWDlFTD3/ u1AlW2EDR+5X1e8pwUPT76VTftjF1317rulK7CdsnoEAEurbJXiFTgM6kv1LfErP1NaVzqJ+Y Ft+f+as4MNGn39VwHoAEBKBxZkWKqq8Zf2iX23pIUcXSTRvlMRvuJuwjQcT92qDHW9VL7Jwe Received-SPF: pass client-ip=212.227.17.22; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_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-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:270450 Archived-At: --=-=-= Content-Type: text/plain 0. emacs -Q Sanity checks: 1. Type a command that prompts in the minibuffer and includes text that ends before window-width, resulting e.g. in this in the minibuffer: Find file: ~/src/emacs/emacs-master/INSTALL 2. Typing C-a moves point to the beginning of the file name and then typing C-e moves point to the end of the file name. 3. Typing M-< moves point to the beginning of the prompt and then typing C-e moves point to the end of the file name. Change the input: 4. Now type a command that includes text that extends beyond window-width, resulting e.g. in this in the minibuffer: Find file: ~/src/emacs/emacs-master/java/org/gnu/emacs/EmacsLauncherPreferencesActivity.java 5. Typing C-a moves point to the beginning of the file name and then typing C-e moves point to the end of the file name (same as step 2). Here's the surprising behavior: 6. Typing M-< moves point to the beginning of the prompt but now typing C-e fails to move point. And if you move point to any position within the prompt, e.g. M-f to put point after "Find", then typing C-e moves point to the beginning of the prompt. It certainly seems like a bug that C-e, i.e. move-end-of-line, fails to move to the end of the line in step 6, and the inconsistency between the results in step 3 and step 6 also seems like a bug. The attached patch ensures that C-e in step 6 moves to the end of the file name, as in step 2, and should only affect the use of C-e in the minibuffer. In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.6) of 2023-09-13 built on strobelfs2 Repository revision: 9838f786ded35fe49bbe84dd78af84df1337adbf Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Linux From Scratch r12.0-19 Configured using: 'configure -C 'CFLAGS=-Og -g3' PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig' --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: line-move-1 patch diff --git a/lisp/simple.el b/lisp/simple.el index 35dd0f59e29..564265d8c60 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -8053,8 +8053,9 @@ line-move-1 ;; We avoid vertical-motion when possible ;; because that has to fontify. (forward-line 1)) - ;; Otherwise move a more sophisticated way. - ((zerop (vertical-motion 1)) + ;; Otherwise move a more sophisticated way, unless + ;; we're in the minibuffer. + ((or (zerop (vertical-motion 1)) (minibufferp)) (if (not noerror) (signal 'end-of-buffer nil) (setq done t)))) --=-=-=--