[PATCH] emacs: fix dangling overlays in notmuch-search

Subject: [PATCH] emacs: fix dangling overlays in notmuch-search

Date: Wed, 12 Oct 2022 20:20:38 -0700

To: notmuch@notmuchmail.org

Cc: Matt Armstrong

From: Matt Armstrong


notmuch-search-insert-authors now sets the evaporate property on the
ellipsis overlays.  Emacs will delete them when the buffer contents
are zeroed out, which happens with `notmuch-refresh-buffer`.  This
prevents them from being collapsed to zero-width overlays in position
1.  See Emacs bug#58479.  An upcoming change in Emacs will make these
dangling overlays visible to the user.
---
 emacs/notmuch.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 26181758..6eef4af1 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -841,6 +841,7 @@ non-authors is found, assume that all of the authors match."
 	      overlay)
 	  (insert invisible-string)
 	  (setq overlay (make-overlay start (point)))
+	  (overlay-put overlay 'evaporate t)
 	  (overlay-put overlay 'invisible 'ellipsis)
 	  (overlay-put overlay 'isearch-open-invisible #'delete-overlay)))
       (insert padding))))
-- 
2.35.1

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: