From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#17346: 24.4.50; Why is the goal column limited to C-n and C-p ? Date: Thu, 9 Oct 2014 22:43:38 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1412887462 16615 80.91.229.3 (9 Oct 2014 20:44:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Oct 2014 20:44:22 +0000 (UTC) Cc: 17346@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 09 22:44:15 2014 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 1XcKZK-0000NO-V4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 22:44:15 +0200 Original-Received: from localhost ([::1]:45028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcKZK-0007Jn-La for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Oct 2014 16:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcKZD-0007Jh-W1 for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 16:44:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XcKZ9-0000ab-5z for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 16:44:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XcKZ9-0000aW-2U for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 16:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XcKZ8-0005Qn-Ft for bug-gnu-emacs@gnu.org; Thu, 09 Oct 2014 16:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Oct 2014 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17346 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17346-submit@debbugs.gnu.org id=B17346.141288742320839 (code B ref 17346); Thu, 09 Oct 2014 20:44:02 +0000 Original-Received: (at 17346) by debbugs.gnu.org; 9 Oct 2014 20:43:43 +0000 Original-Received: from localhost ([127.0.0.1]:39511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcKYo-0005Q2-TY for submit@debbugs.gnu.org; Thu, 09 Oct 2014 16:43:43 -0400 Original-Received: from mail-la0-f41.google.com ([209.85.215.41]:49938) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XcKYl-0005Pp-S4 for 17346@debbugs.gnu.org; Thu, 09 Oct 2014 16:43:41 -0400 Original-Received: by mail-la0-f41.google.com with SMTP id pn19so2027721lab.0 for <17346@debbugs.gnu.org>; Thu, 09 Oct 2014 13:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HHOr/yV8VdEkxJBWu14h3pGWstA6LJ1zxYZm9OUssdc=; b=qzwYw83SgI6g1u4OFVbvKSKDxJcuFKRf44VssGBxDxVsvIoZggMoWz/8CuXbXtBVZc Ql6pHEmi9kz7nxF/pgj3cV/b7G0lsFankVLB9y2MtmBNL1fFkTHlbrF1d/V+wftSpBZr /pDsUkVXSspne91DxwsBGPkVLhVarsbxj3pAEm26SKLY8G07Hq82GNJqbWZCIieLyFqd J752W93X3ljkth6tudIKEtWvzt3/bIjorWdevCku0rXVSeZH6uYRwI7Qtwb6nRqFDnTy +jgN7wYvC1ffLFlipavA0PryW2Nf7thlQ1x4trhbBly+F2h6yBy/fiL9xpZwqTOEcRrp u1rw== X-Received: by 10.152.22.200 with SMTP id g8mr114988laf.1.1412887418612; Thu, 09 Oct 2014 13:43:38 -0700 (PDT) Original-Received: by 10.114.63.226 with HTTP; Thu, 9 Oct 2014 13:43:38 -0700 (PDT) In-Reply-To: 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:94352 On Thu, Oct 9, 2014 at 6:57 PM, Stefan Monnier wrote: >>> We could change that hardcoded list by replacing it with a symbol >>> property `preserve-temporary-goal-column' and then add that property to >>> recenter-top-bottom. >> Sounds right to me. > > Patch welcome. I currently lack the knowledge for making the change myself, sorry. >> Note also that, as I said before in this thread, any command intended >> for _vertical_ motion of the cursor (scroll-up-command, >> scroll-down-command, scroll-bar-toolkit-scroll, mwheel-scroll, ...) >> should try to preserve the goal column (whether semi-permanet or >> temporary). > > If you want that, just set scroll-preserve-screen-position accordingly. I don't see how that would solve the problem I'm reporting. For example: * emacs -Q * Visit the COPYING file from the Emacs tree. * (setq scroll-preserve-screen-position t) * M-m * Scroll down with C-v until point falls on an empty line, so that the point can't stay at the original column. * Now try to continue your scrolling down, but now with C-n. Observe then how the original column is lost, which is IMO an annoying bug which makes harder for me the analysis of tabulated files. > I think there's a remaining bug in that the scroll commands will > use their own "temporary goal-column". So, for example, if you're on > column 70, then do C-n to an empty line and then do page-down you'll end > up in column 0 because page-down did not pay attention to > temporary-goal-column (and vice-versa when switching from scrolling to > C-n/C-p). > Patch welcome to fix this as well. Exactly. That is what I'm trying to explain: All commands that move point *vertically* to another line of text, either directly (like C-p/C-n) or indirectly as consequence of scrolling the buffer (like C-v/M-v) should share a single "temporary goal column", which is the column where point was after the last non-vertical scrolling command. >> Therefore, `preserve-goal-column' would be a better name for the >> property, since it would refer to both types of goal columns. > > Actually both types are temporary (as opposed to `goal-column' which is > set typically once and for all by the major mode). I'm lost here. I was aware of only these two types of "goal columns": 1. Temporary: Set after every command which moves point, except for those commands intended for _vertical_ motion (C-p/C-n/C-v/M-v/...). 2. Semi-permanent: Set with the `set-goal-column' command. When this goal column is defined, it prevails over the temporary one. -- Dani Moncayo