bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#31067: 27.0.50; After-string hidden by subsequent invisible text


From: Stefan Monnier
Subject: bug#31067: 27.0.50; After-string hidden by subsequent invisible text
Date: Thu, 05 Apr 2018 08:23:30 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Would you expect the after-string to be shown in the variant below?
>
> (defun foo ()
>   (interactive)
>   (with-current-buffer "*scratch*"
>     (add-to-invisibility-spec '(foo . t))
>     (let ((beg (point))
>         end)
>       (insert "hidden")
>       (setq end (point))
>       (insert "text")
>       (let ((ol1 (make-overlay beg end)))
>         (overlay-put ol1 'after-string "!after!")
>         (overlay-put ol1 'evaporate t))
>       (let ((ol2 (make-overlay (1+ beg) (point))))
>         (overlay-put ol2 'invisible 'foo)
>         (overlay-put ol2 'evaporate t)))))
>
> IOW, the question is what should happen when the end-point of the
> overlay with after-string is in invisible text?

If some (or all) of the end of the overlay-with-after-string is made
invisible, then the situation is much less clear and I could see
arguments either way, but if I get to choose then I think it makes sense
to consider that the after string is "attached" to the end of the
overlay, i.e. if the end of the overlay is invisible then so is the
after-string.


        Stefan





reply via email to

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