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#19824: 25.0.50; Support goal column in multi-line minibuffer Date: Tue, 10 Feb 2015 17:57:02 +0200 Message-ID: <837fvp92up.fsf@gnu.org> References: <871tlyppaq.fsf@mail.linkov.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423583908 22915 80.91.229.3 (10 Feb 2015 15:58:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2015 15:58:28 +0000 (UTC) Cc: 19824@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 10 16:58:17 2015 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 1YLDCY-0001vO-Ky for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Feb 2015 16:58:14 +0100 Original-Received: from localhost ([::1]:40433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLDCY-0002uJ-7C for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Feb 2015 10:58:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLDCP-0002tF-Ts for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2015 10:58:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLDCM-0003LP-Lc for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2015 10:58:05 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLDCM-0003LJ-IT for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2015 10:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YLDCM-0007P2-4s for bug-gnu-emacs@gnu.org; Tue, 10 Feb 2015 10:58: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: Tue, 10 Feb 2015 15:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19824 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19824-submit@debbugs.gnu.org id=B19824.142358384428406 (code B ref 19824); Tue, 10 Feb 2015 15:58:02 +0000 Original-Received: (at 19824) by debbugs.gnu.org; 10 Feb 2015 15:57:24 +0000 Original-Received: from localhost ([127.0.0.1]:39502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YLDBk-0007O6-6r for submit@debbugs.gnu.org; Tue, 10 Feb 2015 10:57:24 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:52737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YLDBg-0007No-M2 for 19824@debbugs.gnu.org; Tue, 10 Feb 2015 10:57:22 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NJK00400C54GZ00@a-mtaout22.012.net.il> for 19824@debbugs.gnu.org; Tue, 10 Feb 2015 17:57:14 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJK004Z9CBD0SA0@a-mtaout22.012.net.il>; Tue, 10 Feb 2015 17:57:14 +0200 (IST) In-reply-to: <871tlyppaq.fsf@mail.linkov.net> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:99240 Archived-At: > From: Juri Linkov > Date: Tue, 10 Feb 2015 02:45:33 +0200 > > In the single-line minibuffer the goal column was handled by using the point's > absolute position that is the same as the column on the single line. > However, this doesn't work on the multi-line minibuffer. This patch adds > support for the goal column on multi-line input in the minibuffer: Thanks. > - (let ((old-point (point))) > + (let* ((old-point (point)) > + ;; Remember the original goal column of possibly multi-line input > + ;; excluding the length of the prompt on the first line. > + (prompt-end (minibuffer-prompt-end)) > + (old-column (unless (and (eolp) (> (point) prompt-end)) > + (if (= (line-number-at-pos) 1) > + (max (- (current-column) (1- prompt-end)) 0) > + (current-column))))) Why do you use current-column and move-to-column here, instead of using the line-move-visual methods we use by default in any other buffer? Is there some technical problem to use visual-line movement in the minibuffer? If not, I think we should do that for consistency of the user experience.