unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Correct use of text properties?
Date: Thu, 02 Mar 2023 17:47:19 +0200	[thread overview]
Message-ID: <83y1ofcfzs.fsf@gnu.org> (raw)
In-Reply-To: <CAGGu9j2MOaqWYOdPxks+bTY-Rrvaekzmqi9rC6wCJuQFJC_seQ@mail.gmail.com> (message from Joshua Lambert on Thu, 2 Mar 2023 09:25:20 -0600)

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



  reply	other threads:[~2023-03-02 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  4:21 Correct use of text properties? Joshua Lambert
2023-03-02  7:15 ` Eli Zaretskii
2023-03-02 15:25   ` Joshua Lambert
2023-03-02 15:47     ` Eli Zaretskii [this message]
2023-03-02 17:20       ` Joshua Lambert
2023-03-03 12:36     ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83y1ofcfzs.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).