unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: moving point and invisible text
Date: Tue, 14 Feb 2006 08:25:29 +0100	[thread overview]
Message-ID: <43F185E9.6090502@gmx.at> (raw)
In-Reply-To: <E1F8oFK-0007Um-7g@fencepost.gnu.org>

 > The manual follows a previous version of the code, in which the position
 > after the invisible text was an impossible position.  The motive for this
 > was to avoid having two different point positions which display the cursor
 > in the same place.
 >
 > The present code seems to treat the position after the invisible text
 > as possible, and treat the position just before it as impossible.
 > It's different, but it still achieves the goal of not having two
 > point positions that display the cursor in the same place.
 >
 > I don't see any particular reason to prefer the old behavior, so I will
 > update the manual to describe the new behavior.

I don't follow you.

(with-current-buffer (get-buffer-create "*test*")
   (insert "foo\n")
   (let ((at (point)))
     (insert "bar\nbar\nbar\n")
     (overlay-put (make-overlay at (point-max)) 'invisible t))
   (insert "baz\n"))

and point at position 4 in *test* C-f moves to position 17.

(with-current-buffer (get-buffer-create "*test*")
   (insert "foo\n")
   (let ((at (point)))
     (insert "bar\nbar\nbar\n")
     (put-text-property at (point-max) 'invisible t))
   (insert "baz\n"))

and point at position 4 in *test* C-f moves to position 5.  Hence when
using a text-property the position before invisible text is possible.

  reply	other threads:[~2006-02-14  7:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-08  9:23 moving point and invisible text martin rudalics
2006-02-08 12:56 ` Stefan Monnier
2006-02-14  0:40 ` Richard M. Stallman
2006-02-14  7:25   ` martin rudalics [this message]
2006-02-14 22:18     ` Richard M. Stallman
2006-02-15 10:13       ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2006-02-20 18:42 Richard M. Stallman
2006-02-20 22:07 ` Stefan Monnier
2006-02-21 20:56   ` Richard M. Stallman

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=43F185E9.6090502@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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