From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8H+7M2lRl2MvkAAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 17:06:01 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kLm0M2lRl2P2MQAA9RJhRA (envelope-from ) for ; Mon, 12 Dec 2022 17:06:01 +0100 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 1708728B24 for ; Mon, 12 Dec 2022 17:05:40 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 9C11A5F8C3; Mon, 12 Dec 2022 16:05:38 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 1E0F15F393 for ; Mon, 12 Dec 2022 16:05:36 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 55E995FB9E; Mon, 12 Dec 2022 11:05:35 -0500 (EST) Received: (nullmailer pid 3683837 invoked by uid 1000); Mon, 12 Dec 2022 16:05:34 -0000 Resent-To: notmuch@notmuchmail.org Resent-From: David Bremner Resent-Date: Mon, 12 Dec 2022 12:05:34 -0400 Resent-Message-ID: <87pmcofvzl.fsf@tethera.net> X-Envelope-From: jao@gnu.org Mon Dec 12 10:39:37 2022 Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by fethera.tethera.net (Postfix) with ESMTPS id CF9075FB9C for ; Mon, 12 Dec 2022 10:39:37 -0500 (EST) Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4ku0-0006ob-RM; Mon, 12 Dec 2022 10:39:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=aowGZHiA/Ibaq/hfYJHIojghdkIe/1BStHsiJCVzDCI=; b=NoXmBQe4yj2xlD874ZVV XhiElSpAPXMYflYhtVRBMDEUKEaHo244KtNf0L2Qs5VvafpnrCdNwaUjIoz9yDbemuLUB5pDLWoBX 0wnkAHHGxo22K00yF/qphB/EIvcleH5uu+r0M1A1k/GyeUbvvhKr8jvcrsspz55YVttCwXRWdWhwH eM1/6ViSIFN9Va6wYesuKgbXLyMY7oRGhddB9Cx6C441Y7ncx12SzQG6yhgToLcDA/y3U/XI+d0cD Ox/6x9IB8zS4F+q5AymOm7Hd9MDUM4oDHPSUVeIffj+7X+hwc35DMQwpKZlxh9ChCcDwikRCriulJ 9yS03X8yvTqbcQ==; Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247] helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4ktt-0007na-C1; Mon, 12 Dec 2022 10:39:36 -0500 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 9dbcb3dd; Mon, 12 Dec 2022 15:39:25 +0000 (UTC) From: "Jose A. Ortega Ruiz" To: David Bremner Subject: Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode In-Reply-To: <87bko8hh9z.fsf@tethera.net> (David Bremner's message of "Mon, 12 Dec 2022 09:40:24 -0400") References: <20221104235229.515204-1-jao@gnu.org> <20221104235229.515204-2-jao@gnu.org> <87v8mhhk83.fsf@tethera.net> <87ilih4tf5.fsf@mail.jao.io> <87bko8hh9z.fsf@tethera.net> User-Agent: Gnus/5.13 (Gnus v5.13) X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: Date: Mon, 12 Dec 2022 15:39:25 +0000 Message-ID: <875yegaaxe.fsf@mail.jao.io> MIME-Version: 1.0 Message-ID-Hash: 6QKRSXH3XGWGXLN2O5L74LVZTNRFBPX4 X-Message-ID-Hash: 6QKRSXH3XGWGXLN2O5L74LVZTNRFBPX4 X-MailFrom: jao@gnu.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 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-Country: DE X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670861141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-to: resent-from:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-owner:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vfVU5hziI9NJLLMTsboK0m+WXQ9zdUjxmH4wXIFP3Dc=; b=HehFrhpRBIj8BskMDfhyFYt8z8oVTm+K2/KbuQoCb37x5XbEcDJavM+Z2c2EvvX9/VseIx rK+UABVDaA1vqhecI9JFM+S9zpvXWZZjq6YpSpxIGbwl/SiFlUEr9ly5ZcwdP96pwNGpOk kU5o8r3KmEAxrOcjfhOnM2bXRr3FHDJptVkGv6jUxJh1lqXPE6ycLusLI+5iYw2yeQZvcX /D7vp89pgDK/vAZ8rjB35FNOymxdXzWZS4gX7VtdWGQgETl0MrSyItwpEVD0FH+oGAX+k8 YkRJiAxs1ZB2dnOdavzJRj2S83yqFuXIuPDTPvh58ZaByUg6DLjHjYhGAh0ciQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=NoXmBQe4; 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; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gnu.org (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670861141; a=rsa-sha256; cv=none; b=tZtlmcYx9WPz6onAraX5L7nbSptKGiVPpzU6a2jJEn4BkXfGAWCYggpSxrobd9tXTEd2mb AOwpkHBcbIcqHCoR0CJ9xrEDulh1HxUBGTB920Z0bduz4y1MSrVbntxLBgDLZIsqDdILZY MtunIkr6wU5raGLfCEImFVN36mSuFrfbmVFaYZNpIcOGZU+WFXra0UKT9OgkER25XcN445 1hlh9IgVsNxiaEdyHRKxDBUOisavf/Bc0GOvpENCtC3VUd/R4s0f6emYT2BpY2rs5ZsFrF VhTHN+m3OVisr6NatqB6d3qOgy5QriHIonAuFJk/cpwlqdy/l+p37h/HpW4mTg== X-Migadu-Spam-Score: -0.99 X-Spam-Score: -0.99 X-Migadu-Queue-Id: 1708728B24 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=NoXmBQe4; 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; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gnu.org (policy=none) X-TUID: BDFkQUApilet On Mon, Dec 12 2022, David Bremner wrote: >>>> + (buffer-name notmuch-tree-message-buffer)))) >>> >>> At first glance, depending on the buffer name seems fragile? >> >> not sure why, or how to make it more robust... > > It depends on the buffer being named after the message-id. If I > understand the current code correctly, this depends on the default > naming in notmuch show, but that could change e.g. like it did for > notmuch-search. OTOH, I guess I don't really understand what this is > checking for, since I was using something based on > #'notmuch-tree-get-message-properties the intent is to know whether the notmuch-tree-message-buffer is displaying the message the point in notmuch-tree is at, so it's not enough that there's a window showing it. but yes, you're right that's not a good way of checking. Perhaps this: (defsubst notmuch-tree-outline--message-open-p () (and (buffer-live-p notmuch-tree-message-buffer) (get-buffer-window notmuch-tree-message-buffer) (let ((id (notmuch-tree-get-message-id))) (with-current-buffer notmuch-tree-message-buffer (string= (notmuch-show-get-message-id) (or id "")))))) ?