[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Correct use of text properties?
From: |
Joshua Lambert |
Subject: |
Re: Correct use of text properties? |
Date: |
Thu, 2 Mar 2023 11:20:47 -0600 |
Thank you. That explains what I wanted to know.
J. Lambert
On Thu, Mar 2, 2023 at 9:48 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Joshua Lambert <jlambert.lis.tech@gmail.com>
> > Date: Thu, 2 Mar 2023 09:25:20 -0600
> > Cc: help-gnu-emacs@gnu.org
> >
> > > 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.
>