unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Matt Armstrong <matt@rfc20.org>
Cc: 58479@debbugs.gnu.org, Ihor Radchenko <yantar92@gmail.com>
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	[thread overview]
Message-ID: <jwv8rlb2rlw.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zgdrml1p.fsf@rfc20.org> (Matt Armstrong's message of "Wed, 19 Oct 2022 16:49:06 -0700")

> 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.






  reply	other threads:[~2022-10-20  1:51 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
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 [this message]
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=jwv8rlb2rlw.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58479@debbugs.gnu.org \
    --cc=matt@rfc20.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).