unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Matt Armstrong <matt@rfc20.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: 58479@debbugs.gnu.org, monnier@iro.umontreal.ca, matt@rfc20.org
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	[thread overview]
Message-ID: <87pmewqrj3.fsf@rfc20.org> (raw)
In-Reply-To: <87zge0tqkt.fsf@localhost> (Ihor Radchenko's message of "Thu, 13 Oct 2022 10:17:22 +0800")

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	other threads:[~2022-10-13  4:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13  2:17 bug#58479: 29.0.50; [feature/noverlay] Displaced overlays in notmuch search buffers after refreshing Ihor Radchenko
2022-10-13  4:25 ` Matt Armstrong [this message]
2022-10-14  4:56   ` Ihor Radchenko
2022-10-14 20:30     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15  1:38       ` Ihor Radchenko
2022-10-15  3:52         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15  4:11           ` Ihor Radchenko
2022-10-15 13:43             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-15 14:22               ` Ihor Radchenko
2022-10-16 23:41                 ` Matt Armstrong
2022-10-17  1:28                   ` Ihor Radchenko
2022-10-17  5:56                     ` Matt Armstrong
2022-10-17  8:21                       ` Ihor Radchenko
2022-10-17 18:53                         ` Matt Armstrong
2022-10-17 22:05                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-18 20:38         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-19  8:09           ` Ihor Radchenko
2022-10-19 12:31             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-19 21:59               ` Matt Armstrong
2022-10-19 22:26       ` Matt Armstrong
2022-10-19 23:49         ` Matt Armstrong
2022-10-20  1:51           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-20 21:59             ` Matt Armstrong
2022-10-20 22:34               ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmewqrj3.fsf@rfc20.org \
    --to=matt@rfc20.org \
    --cc=58479@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).