From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: UP and DOWN with multi-line minibuffer history Date: Mon, 14 Dec 2015 10:25:20 +0100 Message-ID: <8761019ybj.fsf@fencepost.gnu.org> References: <83wpsj6978.fsf@gnu.org> <87y4czz63l.fsf@mail.linkov.net> <83lh8y5q3k.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1450085166 9735 80.91.229.3 (14 Dec 2015 09:26:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Dec 2015 09:26:06 +0000 (UTC) Cc: emacs-devel@gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 14 10:25:50 2015 Return-path: Envelope-to: ged-emacs-devel@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 1a8PO9-0000yI-SM for ged-emacs-devel@m.gmane.org; Mon, 14 Dec 2015 10:25:50 +0100 Original-Received: from localhost ([::1]:58659 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8PO9-0000KS-5E for ged-emacs-devel@m.gmane.org; Mon, 14 Dec 2015 04:25:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8PNk-0000K6-03 for emacs-devel@gnu.org; Mon, 14 Dec 2015 04:25:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8PNi-0003c0-RB for emacs-devel@gnu.org; Mon, 14 Dec 2015 04:25:23 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55625) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8PNi-0003bw-Nn; Mon, 14 Dec 2015 04:25:22 -0500 Original-Received: from localhost ([127.0.0.1]:41211 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1a8PNg-0004jI-Ti; Mon, 14 Dec 2015 04:25:21 -0500 Original-Received: by lola (Postfix, from userid 1000) id AF4DADF921; Mon, 14 Dec 2015 10:25:20 +0100 (CET) In-Reply-To: <83lh8y5q3k.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 13 Dec 2015 17:24:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196238 Archived-At: Eli Zaretskii writes: >> From: Juri Linkov >> Cc: emacs-devel@gnu.org >> Date: Sun, 13 Dec 2015 01:20:49 +0200 >> >> > I think it would be more consistent, including with how >> > line-move-visual behaves in normal buffers, if UP ended up in the last >> > line of the previous item. WDYT? >> >> The initial implementation of this feature was like you described above. >> But later I received complaints off-list that convinced me to open >> bug#19824 with better implementation to address the inconvenience of >> navigating through the multi-line minibuffer history: for backward-compatible >> behavior we need every UP in the sequence move to a previous history item. >> This can be achieved when UP places the cursor at the top line of a >> multi-line history item, ready for going to the next previous item with >> successive UP. > > Sorry, I don't understand why supporting goal-column must have this > side effect. In a normal buffer, we do support goal-column (in the > visual-line sense), and still we don't jump to the firs screen line of > a long logical line. Really? >From simple.el: (defun line-move (arg &optional noerror to-end try-vscroll) "Move forward ARG lines. If NOERROR, don't signal an error if we can't move ARG lines. TO-END is unused. TRY-VSCROLL controls whether to vscroll tall lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this function will not vscroll." [...] (if (and line-move-visual ;; Display-based column are incompatible with goal-column. (not goal-column) A bit of git-blame work reveals that this was introduced by a certain Eli Zaretskii in: commit 064f328a6ac90698c719b6eace60d6f4c90e3f08 Author: Eli Zaretskii Date: Fri Sep 16 20:15:16 2011 +0300 Fix bug #971 with next/previous-line when goal-column is set. lisp/simple.el (line-move): If goal-column is set, move by logical lines, not by display lines. (next-line, previous-line, goal-column, line-move-visual): Doc fix to reflect the above change. We also have commit 295f6616401967b2fae6671a5d2ae36a287576e9 Author: Kim F. Storm Date: Sun Mar 13 23:20:49 2005 +0000 (next-line, previous-line): Add optional try-vscroll arg to recognize interactive use. Pass it on to line-move. (line-move): Don't perform auto-window-vscroll when defining or executing keyboard macro to ensure consistent behaviour. from a time where people actually bothered about getting consistently working keyboard macros, which contains the section: ;; Perform vertical scrolling of tall images if necessary. +;; Don't vscroll in a keyboard macro. (defun line-move (arg &optional noerror to-end try-vscroll) - (if (and auto-window-vscroll try-vscroll) + (if (and auto-window-vscroll try-vscroll + (not defining-kbd-macro) + (not executing-kbd-macro)) (let ((forward (> arg 0)) -- David Kastrup