[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scroll-lock-mode and goal-column

From: Stefan Monnier
Subject: Re: scroll-lock-mode and goal-column
Date: Sun, 29 Jun 2008 15:03:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]