From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matt Armstrong 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 16:49:06 -0700 Message-ID: <87zgdrml1p.fsf@rfc20.org> References: <87zge0tqkt.fsf@localhost> <87pmewqrj3.fsf@rfc20.org> <87bkqfype2.fsf@localhost> <878rlbo3gi.fsf@rfc20.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29173"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58479@debbugs.gnu.org To: Stefan Monnier , Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 20 01:50:29 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 1olIpP-0007Gq-AW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Oct 2022 01:50:27 +0200 Original-Received: from localhost ([::1]:58252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olIpN-0006Dr-VF for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 19 Oct 2022 19:50:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olIp1-0006Db-Cp for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 19:50:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olIp1-0003xS-4X for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 19:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1olIp0-0000xg-Vg for bug-gnu-emacs@gnu.org; Wed, 19 Oct 2022 19:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matt Armstrong Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Oct 2022 23:50:02 +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.16662233603614 (code B ref 58479); Wed, 19 Oct 2022 23:50:02 +0000 Original-Received: (at 58479) by debbugs.gnu.org; 19 Oct 2022 23:49:20 +0000 Original-Received: from localhost ([127.0.0.1]:60580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olIoJ-0000wD-Qr for submit@debbugs.gnu.org; Wed, 19 Oct 2022 19:49:20 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37895) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olIoG-0000vy-Vs for 58479@debbugs.gnu.org; Wed, 19 Oct 2022 19:49:18 -0400 Original-Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 91D00E0003; Wed, 19 Oct 2022 23:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1666223350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6sNC62ZCvNbfxX+CSzb8lVHMh4fWTWDYBCMWA4dC4FI=; b=pN79U5HrpO0rNj2wT36iKGCXWs8U/mHHSdq2U95s+DqDdR/uF921BpOR6LPV1LCOyNeQrP oWA/CKCzHIw+z/8BybR5Vayd29suTDuFGJty3Qy00qHU0lgU+QX1bDUsnoxzciP1pzpHe1 tnGt71VAFcXiEWsHdyYNDfhEnPX12NkQir65uGCq48sEILEEmCVb+qSEVIDJ8v2edzgaO3 zhmulUcGG1h7eEUu1SehzT8+XrEjzI7hc6dt9j8ARK2bVJ+SSTLGBS+0PU1j/Lr3TGnmml hTHFsMX6vnZp2uNd5MWVLNCnWs3KFaV+67Booa0DuVcEkrR0WRVvdY0SGK8e/w== Original-Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1olIo6-005A4R-2S; Wed, 19 Oct 2022 16:49:06 -0700 In-Reply-To: <878rlbo3gi.fsf@rfc20.org> 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:245911 Archived-At: Matt Armstrong writes: > Stefan Monnier writes: > >> Thanks, I have fixed this specific problem with the patch below. >> Let's hope it also fixes your original issue with notmuch. >> >> Stefan >> >> diff --git a/src/textprop.c b/src/textprop.c >> index 04fae528097..b34246f5bc7 100644 >> --- a/src/textprop.c >> +++ b/src/textprop.c >> @@ -649,7 +649,8 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop, >> Lisp_Object tem = Foverlay_get (node->data, prop); >> struct sortvec *this; >> >> - if (NILP (tem) || (w && ! overlay_matches_window (w, node->data))) >> + if (NILP (tem) || node->end < pos + 1 >> + || (w && ! overlay_matches_window (w, node->data))) >> continue; >> >> this = (result == items ? items + 1 : items); > > Hmm...spoke too soon. Despite your fix Stefan [...] 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)))) ---------------------------------------------------------------------- position: 1 of 29 (0%), column: 0 character: f (displayed as f) (codepoint 102, #o146, #x66) charset: ascii (ASCII (ISO646 IRV)) code point in charset: 0x66 script: latin syntax: w which means: word category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman to input: type "C-x 8 RET 66" or "C-x 8 RET LATIN SMALL LETTER F" buffer code: #x66 file code: #x66 (encoded by coding system utf-8-unix) display: by this font (glyph code): ftcrhb:- -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x49) Character code properties: customize what to show name: LATIN SMALL LETTER F general-category: Ll (Letter, Lowercase) decomposition: (102) ('f') There is an overlay here: From 1 to 1 invisible ellipsis ---------------------------------------------------------------------- position: 29 of 29 (97%), column: 5 character: q (displayed as q) (codepoint 113, #o161, #x71) charset: ascii (ASCII (ISO646 IRV)) code point in charset: 0x71 script: latin syntax: w which means: word category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman to input: type "C-x 8 RET 71" or "C-x 8 RET LATIN SMALL LETTER Q" buffer code: #x71 file code: #x71 (encoded by coding system utf-8-unix) display: by this font (glyph code): ftcrhb:- -Go Mono-regular-normal-normal-*-15-*-*-*-m-0-iso10646-1 (#x54) Character code properties: customize what to show name: LATIN SMALL LETTER Q general-category: Ll (Letter, Lowercase) decomposition: (113) ('q')