From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: scroll-lock-mode and goal-column Date: Sun, 29 Jun 2008 15:03:02 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214766196 18709 80.91.229.12 (29 Jun 2008 19:03:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Jun 2008 19:03:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ralf Angeli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 29 21:04:02 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KD2Bu-0005JY-16 for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 21:04:02 +0200 Original-Received: from localhost ([127.0.0.1]:36521 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD2B3-00089a-NV for ged-emacs-devel@m.gmane.org; Sun, 29 Jun 2008 15:03:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KD2Az-00086i-5t for emacs-devel@gnu.org; Sun, 29 Jun 2008 15:03:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KD2Ax-00085C-Qc for emacs-devel@gnu.org; Sun, 29 Jun 2008 15:03:04 -0400 Original-Received: from [199.232.76.173] (port=53435 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KD2Ax-000854-K9 for emacs-devel@gnu.org; Sun, 29 Jun 2008 15:03:03 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:26834) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KD2Ax-0007fh-AR for emacs-devel@gnu.org; Sun, 29 Jun 2008 15:03:03 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjQFAAd5Z0hFxIdG/2dsb2JhbACBW6xqgXo X-IronPort-AV: E=Sophos;i="4.27,723,1204520400"; d="scan'208";a="23742455" Original-Received: from 69-196-135-70.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.70]) by ironport2-out.teksavvy.com with ESMTP; 29 Jun 2008 15:03:02 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 756B2835A; Sun, 29 Jun 2008 15:03:02 -0400 (EDT) In-Reply-To: (Ralf Angeli's message of "Sun, 29 Jun 2008 20:10:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100156 Archived-At: >>> For example if you open the info dir with `C-h i d', activate Scroll >>> Lock mode, move point down a bit into the introductory blurb, then move >>> it to column 30 and scroll down line by line with `C-n', point will >>> sometimes stick to column 0 even though there is text to the right where >>> it can be moved to. >> >> Most likely, `last-command' is not among '(scroll-up scroll-down) so the >> C code doesn't understand that it should preserve the column position >> from before the last command. > Can I make the C code acquainted with the functions of scroll-lock.el? Not directly, no. Maybe we should add a variable for that. Othrwise, you can either set this-command to `scroll-up' (since it's later on mvoes to last-command), or you can let-bind last-command appropriately around the calls to scroll-up/down. > If this is what would remedy the situation. I'm a bit confused because > in scroll-lock.el, the goal column is updated if `last-command' is _not_ > among the scrolling functions. updated = changed = not preserved. I understand that since we're talking about preserving something used to preserve something else, it's not very clear. >> Sounds very strange, indeed. But Info buffers have funny contents, so >> maybe you were in column 0 on a big display-property space that spanned >> columns from 0 to 26? > There are no display properties, AFAICS. I'm pretty sure they're there: they're used for alignemnt. But indeed C-u C-x = has trouble finding them because there are insible spaces before them. > And if I open the raw dir file the behavior is even worse, meaning > point will not jump back into the previous column at all once it got > stuck to column 0. I actually much prefer this behavior because it's consistent with the simple `last-command' problem, so it should be easy to fix. Stefan