emacs-devel
[Top][All Lists]
Advanced

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

Re: moving point and invisible text


From: martin rudalics
Subject: Re: moving point and invisible text
Date: Tue, 14 Feb 2006 08:25:29 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

> 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 via email to

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