GNU bug report logs - #31067
27.0.50; After-string hidden by subsequent invisible text

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Thu, 5 Apr 2018 02:29:02 UTC

Severity: normal

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 31067 <at> debbugs.gnu.org
Subject: bug#31067: 27.0.50; After-string hidden by subsequent invisible text
Date: Wed, 04 Apr 2018 22:28:59 -0400
Package: Emacs
Version: 27.0.50


In a fresh Emacs session define:

    (defun foo ()
      (interactive)
      (with-current-buffer "*scratch*"
        (add-to-invisibility-spec '(foo . t))
        (let ((beg (point)))
          (insert "text")
          (let ((ol1 (make-overlay beg (point))))
            (overlay-put ol1 'after-string "!after!")
            (overlay-put ol1 'evaporate t)))
        (let ((beg (point)))
          (insert "\nhidden")
          (let ((ol1 (make-overlay beg (point))))
            (overlay-put ol1 'invisible 'foo)
            (overlay-put ol1 'evaporate t)))))

and then try it with `M-x foo`.
The result for me is to display "text...", whereas I would have expected
"text!after!...".

I.e. the after-string which I placed over "text" gets hidden by
`invisible` property of the overlay placed on the immediately following
"\nhidden".

I know these kinds of interactions are pretty delicate and often
somewhat arbitrary (several behaviors are valid and we just have to pick
one), but I think in this case it is clearly an error.


        Stefan




This bug report was last modified 7 years and 71 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.