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

[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: Matt Armstrong
Subject: bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing
Date: Wed, 12 Oct 2022 21:25:04 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

X-Debbugs-CC: monnier@iro.umontreal.ca, matt@rfc20.org

^^^ I don't know if Debbugs pseudoheaders work here but I'll give it a
shot.


Ihor Radchenko <yantar92@gmail.com> writes:

> As I mentioned in
> https://yhetil.org/emacs-devel/jwvo7ulzmvv.fsf-monnier+emacs@gnu.org/,
> I consistently observe issues with overlays in notmuch search buffers
> on feature/noverlay branch.
>
> I have tested with Emacs 29 master vs. feature/noverlay and confirm that
> the problem only appears in feature/noverlays.

Thank you for following up with a clear report of the problem.  I use
notmuch so it was easy for me to follow your steps.  I agree that an
"emacs -Q" recepie won't be practical here.

Request: could you try your repro again for notmuch-search and include
the output of the `my-dump-overlays' function below?

One half of the problem, the left over overlays, appears on master too.
You should be able to confirm by running this wth the notmuch-search
buffer current after refreshing with 'g':

(defun my-dump-overlays ()
  (interactive)
  (with-output-to-temp-buffer "*Overlays*"
    (save-restriction
      (widen)
      (let ((overlays (overlays-in (point-min) (point-max))))
        (princ (format "Buffer %S has %d overlays.\n\n"
                       (current-buffer) (length overlays)))
        (dolist (o overlays)
          (pp o)
          (terpri)
          (pp (overlay-properties o))
          (terpri))))))

I sent the notmuch folks a patch to fix this by setting 'evaporate on
them:
https://nmbug.notmuchmail.org/nmweb/show/20221013032038.23371-1-matt%40rfc20.org

(You verified that the overlays are not cleared up after erasing text,
and they shouldn't be *unless* they have 'evaporate set.  There have
been some discussions that 'evaporate should have been the default from
the beginning, but changing that now might break things.)

The other half of the problem is this: you can see the ellipsis and I
cannot, even on the noverlay branch.  When I play around with the buffer
created by the following I can see the ellipsis up until when the
overlay has length zero, then it disappears.  This is true on master and
the noverlay branch.

(defun my-b58479 ()
  (interactive)
  (with-current-buffer (get-buffer-create "*b58479*")
    (add-to-invisibility-spec (cons 'ellipsis t))
    (goto-char (point-max))
    (insert "Hello, World! ")
    (let ((overlay (make-overlay (- (point) 10) (- (point) 5))))
      (overlay-put overlay 'invisible 'ellipsis))
    (display-buffer (current-buffer))))


I am not sure why you see the issue and I do not, but the clue might be
in what `my-dump-overlays' prints.

-- 
matt (sent from an Emacs running the feature/noverlay branch)





reply via email to

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