[Top][All Lists]

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

Re: Correct use of text properties?

From: Eli Zaretskii
Subject: Re: Correct use of text properties?
Date: Thu, 02 Mar 2023 17:47:19 +0200

> From: Joshua Lambert <>
> Date: Thu, 2 Mar 2023 09:25:20 -0600
> Cc:
> > Probably.  But you don't describe the behavior you found surprising,
> > so it is hard to tell whether what you see is expected.  Please tell
> > more about the behavior you observe that surprised you.
> In the modeline and with display-line-numbers-mode the line number is always 
> 1.

That is expected.  If you want to count screen lines, try setting
display-line-numbers to the value 'visual'.  However, that will
display numbers relative to the current line, so maybe this is not
what you want.

> Also, pointer motions such as move-end-of-line and forward-paragraph jump to
> the end of the file.

This is also expected.

> Since I was adding newline characters as text properties, I
> thought the line numbers might increment as I moved point down past those
> newlines.

No, these properties only affect the display, not how Emacs counts
lines or moves point: those are still done on the actual buffer text.

reply via email to

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