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: Possibly Weird Behavior Regarding First Lines Which are Invisible?
Date: Sun, 04 Feb 2024 15:42:17 +0200	[thread overview]
Message-ID: <86a5og2vnq.fsf@gnu.org> (raw)
In-Reply-To: <PH0PR84MB1360E253872F307DBAECC0B999422@PH0PR84MB1360.NAMPRD84.PROD.OUTLOOK.COM> (message from Jaft on Fri, 2 Feb 2024 06:13:24 +0000 (UTC))

> 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	other threads:[~2024-02-04 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1623180934.4325548.1706854404633.ref@mail.yahoo.com>
2024-02-02  6:13 ` Possibly Weird Behavior Regarding First Lines Which are Invisible? Jaft
2024-02-04 13:42   ` Eli Zaretskii [this message]

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=86a5og2vnq.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).