help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Possibly Weird Behavior Regarding First Lines Which are Invisible?


From: Eli Zaretskii
Subject: Re: Possibly Weird Behavior Regarding First Lines Which are Invisible?
Date: Sun, 04 Feb 2024 15:42:17 +0200

> Date: Fri, 2 Feb 2024 06:13:24 +0000 (UTC)
> From: Jaft <jaft.r@outlook.com>
> 
> So I have a buffer; let's say 9 lines. And I have a function which runs 
> (previous-line) (beginning-of-line 1) and said function is bound to a key 
> (let's say <up>).
> So I apply a text-property of 'invisible using (pos-bol) of the first line 
> and (1+ (pos-eol)) in order to get the first line to disappear, like it's not 
> even there.
> If I'm on line 3 and M-: my function, it does what I'd expect and (point) 
> will return the (pos-bol) of the second line. But, if I execute my function 
> by pressing <up> from line 3, (point) keeps returning back 1, the point of 
> the beginning of line 1 rather than the point at the beginning of line 2.
> Is this expected behavior?

Yes, it is.  After you press <UP>, the automatic point-adjustment
moves point to before the invisible text.  If you want to disable
that, set global-disable-point-adjustment to a non-nil value.



reply via email to

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