From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22544: 25.0.90; Long history items cause surprising positioning of cursor in minibuffer Date: Thu, 04 Feb 2016 18:28:55 +0200 Message-ID: <831t8sxwvs.fsf@gnu.org> References: <83a8nhycsl.fsf@gnu.org> <87d1sd1du7.fsf@mail.linkov.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1454603431 30269 80.91.229.3 (4 Feb 2016 16:30:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Feb 2016 16:30:31 +0000 (UTC) Cc: 22544@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 04 17:30:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aRMnP-0007H8-V3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Feb 2016 17:30:16 +0100 Original-Received: from localhost ([::1]:42759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMnL-00054K-Vb for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Feb 2016 11:30:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMnH-00052Z-P4 for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2016 11:30:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRMnD-0007el-3E for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2016 11:30:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMnC-0007eZ-Vb for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2016 11:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aRMnC-0001et-O0 for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2016 11:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Feb 2016 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22544 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22544-submit@debbugs.gnu.org id=B22544.14546033626301 (code B ref 22544); Thu, 04 Feb 2016 16:30:02 +0000 Original-Received: (at 22544) by debbugs.gnu.org; 4 Feb 2016 16:29:22 +0000 Original-Received: from localhost ([127.0.0.1]:60455 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMmX-0001dZ-Va for submit@debbugs.gnu.org; Thu, 04 Feb 2016 11:29:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44627) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRMmV-0001dN-Pc for 22544@debbugs.gnu.org; Thu, 04 Feb 2016 11:29:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRMmM-0007W3-1a for 22544@debbugs.gnu.org; Thu, 04 Feb 2016 11:29:14 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRMmL-0007Vz-Uo; Thu, 04 Feb 2016 11:29:09 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4294 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRMmL-0006Zx-BE; Thu, 04 Feb 2016 11:29:09 -0500 In-reply-to: <87d1sd1du7.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 04 Feb 2016 02:49:04 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112407 Archived-At: > From: Juri Linkov > Cc: 22544@debbugs.gnu.org > Date: Thu, 04 Feb 2016 02:49:04 +0200 > > > Still as expected. Press once more, resulting in: > > > > Output message to mail file (default FOO): ~/foo/ba!r/very/long/file/name/that/overflows/minibuffer/window/line/when/displayed > > > > This is somewhat unexpected, because the column of the cursor looks > > random -- it is neither the same as in previous display, nor related > > to anything else I can think of. > > Sorry, I don't understand: it's unexpected that the cursor jumps > to the previous visual line (this is because of line-move-visual), > or an invalid column position on the previous visual line? The latter. > > Now press one more time, and observe this result: > > > > Output message to mail file (default FOO): ~/shorte!r/file/name > > > > This is even less expected -- why isn't the cursor at the end of the > > file name, even though it is short enough to display entirely on a > > single screen line? > > This is because it keeps the last column before navigating > to the previous history element. The last column was near > the beginning of the top visual line. But if a long line is not in history, then the cursor is not positioned on the same column, it is positioned at the end of the history item. So this behavior is inconsistent, and depends on whether long items are or aren't in the history. > Do you think we should disable line-move-visual in the minibuffer? > I tried to do this like below. This might help to avoid these problems, > but I'm not sure. > > (let ((minibuffer-setup-hook (lambda () (setq-local line-move-visual nil))) > (default-file "~/rmail/FOO") > (file-name-history > '("~/rmail/FOOBAR" > "~/foo/bar/very/long/file/name/that/overflows/minibuffer/window/line/when/displayed" > "~/shorter/file/name"))) > (read-file-name > (concat "Output message to mail file (default " > (file-name-nondirectory default-file) > "): ") > (file-name-directory default-file) > (abbreviate-file-name default-file))) This helps to avoid the problem, but doesn't it defeat the new feature whereby moves by visual rather than by logical lines? The above simply reverts to pre-Emacs 25 behavior, AFAICS. Thanks.