[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch sea
From: |
Stefan Monnier |
Subject: |
bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing |
Date: |
Wed, 19 Oct 2022 21:51:53 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> New repro, see function below. Symptoms: despite inserting two lines of
> text, and there being a single overlay at (1,1) with the 'invisible
> prop, all I see in the buffer is the ellipsis. I can cursor around and
> see the position change in the mode line, but the display never changes.
> With the cursor at EOB it appears after the ellipsis. Anywhere else and
> the cursor appears before it.
>
> (defun my-b58479-4 ()
> (interactive)
> (with-current-buffer (get-buffer-create "*b58479*")
> (kill-all-local-variables)
> (delete-all-overlays)
> (setq buffer-read-only nil)
> (setq buffer-file-name nil)
> (setq buffer-undo-list nil)
> (let ((inhibit-read-only t)
> (inhibit-modification-hooks t))
> (erase-buffer))
> (add-to-invisibility-spec (cons 'ellipsis t))
> (goto-char (point-max))
> (insert "first line\nsecond line\n")
> (let ((overlay (make-overlay 1 1)))
> (overlay-put overlay 'invisible 'ellipsis))
> (display-buffer (current-buffer))))
Hmm... I can't see the problem on my end.
I did
% src/emacs -Q
<mouse-2> to paste the above code into *scratch*
C-M-x
M-x my-b58479-4 RET
but this shows me a buffer with 2 lines and no ellipsis.
[ With the latest code from `feature/noverlay` whch I just pushed with
your (rebased) changes. ]
Stefan
PS: You can use `with-silent-modifications` around the `erase-buffer`
and `insert` calls: it will do the dance with the other variables for you.
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, (continued)
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/18
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Ihor Radchenko, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/19
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing,
Stefan Monnier <=
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Matt Armstrong, 2022/10/20
- bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing, Stefan Monnier, 2022/10/20