From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yFU9Ip+FR2O1hAAAbAwnHQ (envelope-from ) for ; Thu, 13 Oct 2022 05:27:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8ABRIp+FR2MO0QAA9RJhRA (envelope-from ) for ; Thu, 13 Oct 2022 05:27:27 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA79E1158B for ; Thu, 13 Oct 2022 05:27:26 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 13A275F393; Thu, 13 Oct 2022 03:27:24 +0000 (UTC) X-Greylist: delayed 380 seconds by postgrey-1.36 at yantan; Thu, 13 Oct 2022 03:27:21 UTC Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [IPv6:2001:4b98:dc4:8::240]) by mail.notmuchmail.org (Postfix) with ESMTPS id 522DB5F383 for ; Thu, 13 Oct 2022 03:27:21 +0000 (UTC) Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 32DE6C6AB9 for ; Thu, 13 Oct 2022 03:21:01 +0000 (UTC) Received: (Authenticated sender: matt@rfc20.org) by mail.gandi.net (Postfix) with ESMTPSA id 1707540004 for ; Thu, 13 Oct 2022 03:20:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rfc20.org; s=gm1; t=1665631259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=pKFO3AULuTFarfum1Kk/ajn2zyMndXnbl1Ng8glrCmU=; b=eibsUmkfjnt8SCMmkF6DXBfkrxBHRs/ZiXTKSx8yYF9i1ECru8BgR4uVbRiu+Gt14167iv df2lWCgCUqJzSjnwJf/TwoRKsXUuTYnNQ//GZe/3+vM4CaWJJrBWVhAl/2l01DxdQDnS3X +drZu0O1eYSKM5H/uyJHwVovI7F7ACQHfl2TQxBld18sewcFEFw/Ix2RYj4eS7J3TFhlEg pnl2CmODUpMc7zvMLhu7s63acoP+NgwS6ccSf15H/Lx+DIgNSHbT6gthWO291M7E9venAg 2aDFnBflHknRTjGc8DzAu0GQfUeHbYms1NIraDREuPjlG5U8s4VSis4MisEFjA== Received: from matt by naz with local (Exim 4.96) (envelope-from ) id 1oiomG-00065A-0Y; Wed, 12 Oct 2022 20:20:56 -0700 From: Matt Armstrong To: notmuch@notmuchmail.org Subject: [PATCH] emacs: fix dangling overlays in notmuch-search Date: Wed, 12 Oct 2022 20:20:38 -0700 Message-Id: <20221013032038.23371-1-matt@rfc20.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Message-ID-Hash: 2ZCCJ4JDZHKNXGELISV5UHQIDYVY4IGY X-Message-ID-Hash: 2ZCCJ4JDZHKNXGELISV5UHQIDYVY4IGY X-MailFrom: matt@rfc20.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Matt Armstrong X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665631647; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=oU7fTaWiGHFMBoHMrp0cdNPsZgGdH4Dzcc40Aq2HUrY=; b=InEn/slQ3y6qDrEm5k61rTTiXuWx2qkxSiMkEu8DbuPrBwebGoH5nqVxOuh5xx6s+LOSea mzghmy9a08mETtWVUiNlfoHigHfAphW7Oxwy7SlJev05kPoV+IJmLQYkU0ZgXhObCcA8n4 +61Z6CqKFhMzd2MWmqD3ecfOxtWsEq0h/mlE5AbFVpT39P097yyojyOWjO6cXpsRn7B9fo MgqBeLVeTXqnF3UoAW6xgACJZ9nnY0yhZO2ERugsu+e6GK9qIbHrcnM6Nba88enSnT1773 OBDR3o/ymKad5OZO22L6f7CDNou6rV2PnA0DpaBQR4mAGuXlWSA6dPWp1Fialg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665631647; a=rsa-sha256; cv=none; b=BdavskvkfNnFBPVTq/BQnQ6HjskU73hxsGrm1KcqSem1DJfX3LOigTtGGgogcc/Os0sfSv nrROkAsAJEMXlboIln75NRxwtZ95SFxIuQnkNilauz1Rp8nCbEmuJL80vpbNldAj03HFqk 0die2ERzTA+wLaRq5foVrG/bPcCAsAKZeT/fPuNQazX9EvgGkhs/xaaSlBcCn0j4QaObIN fJZvPhvjW1rKOxDdSIET1/X1xdGT9HAu/Ar6KSaH46wh/FhD7YQElk99TQsvA5KkQ81Sm0 x5SiyhKfNkoFTs6uc6KuGYXCB+DGI+gJLDR5DIcD2MGjFP5JfdCTFiIPjrBp1g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=rfc20.org header.s=gm1 header.b=eibsUmkf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 1.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=rfc20.org header.s=gm1 header.b=eibsUmkf; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: DA79E1158B X-Spam-Score: 1.67 X-Migadu-Scanner: scn0.migadu.com X-TUID: eF0bDb6q/GQy 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