From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <87zge0tqkt.fsf@localhost> <87pmewqrj3.fsf@rfc20.org> <87bkqfype2.fsf@localhost> <878rlbo3gi.fsf@rfc20.org> <87zgdrml1p.fsf@rfc20.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 58479@debbugs.gnu.org, Ihor Radchenko To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 20 03:54:25 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olKlM-0003IF-Te for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 03:54:25 +0200 Original-Received: from localhost ([::1]:40726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olKlL-0007z7-LA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 21:54:23 -0400 Original-Received: from [::1] (port=37324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olKkD-0007ND-36 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 21:53:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olKk2-0007N1-Me for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 21:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olKk2-0004CF-6K for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 21:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olKk1-0003zn-Oy for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 21:53:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Oct 2022 01:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58479 X-GNU-PR-Package: emacs Original-Received: via spool by 58479-submit@debbugs.gnu.org id=B58479.166623072415290 (code B ref 58479); Thu, 20 Oct 2022 01:53:01 +0000 Original-Received: (at 58479) by debbugs.gnu.org; 20 Oct 2022 01:52:04 +0000 Original-Received: from localhost ([127.0.0.1]:60669 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olKj6-0003yY-H1 for submit@debbugs.gnu.org; Wed, 19 Oct 2022 21:52:04 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48177) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olKj4-0003y4-Jz for 58479@debbugs.gnu.org; Wed, 19 Oct 2022 21:52:03 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 275E2100189; Wed, 19 Oct 2022 21:51:56 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 748961000DC; Wed, 19 Oct 2022 21:51:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666230714; bh=tOLYIbboARsTJkIaMjnf6BywmiZ0PWJFSPt2Sb9TEtQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gbi8H3E7IvCzWh6c2bFtlQv/s6AtRkylGSLpu4b0v4/E07EEQq2vFf2bI7BgRDKmT 5TNRtfS3igLnBCyT2TbjInN2V7ClkJmIJk36CgNOGxzDcM98T1K91E/6LGxQMB0Zw+ ANOYniJWdWZodMTbO62r/sLmcdqyEiBAyxaIhZWyh4zAYk4ZZZSSRr9InvBDbx3F+t 5DD7qlDHC1fLqXpyXO7nE5m8F0jsJPl6PxlD2mnJ4OZhMEamjcl2o5zgVoi8Gb0hP9 9pDeSRz6kw7+Ahff1AdRUgZflpsUyHP5rWJohr83b9i+7HouQaK8n+/2dj3WfuflYA Hxvg7OAqFWUTg== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3B8551207DD; Wed, 19 Oct 2022 21:51:54 -0400 (EDT) In-Reply-To: <87zgdrml1p.fsf@rfc20.org> (Matt Armstrong's message of "Wed, 19 Oct 2022 16:49:06 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:245913 Archived-At: > 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 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.