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 KDILHZVRl2PBGgAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 17:06:45 +0100 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 yOgEHZVRl2MbeAAA9RJhRA (envelope-from ) for ; Mon, 12 Dec 2022 17:06:45 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 744CD33678 for ; Mon, 12 Dec 2022 17:06:28 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E5F985FA28; Mon, 12 Dec 2022 16:06:26 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id EDD235F9F9 for ; Mon, 12 Dec 2022 16:06:23 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 5DDBE5FB9E; Mon, 12 Dec 2022 11:06:23 -0500 (EST) Received: (nullmailer pid 3683884 invoked by uid 1000); Mon, 12 Dec 2022 16:06:22 -0000 From: David Bremner To: "Jose A. Ortega Ruiz" Subject: Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode In-Reply-To: <875yegaaxe.fsf@mail.jao.io> 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> <875yegaaxe.fsf@mail.jao.io> Date: Mon, 12 Dec 2022 12:06:22 -0400 Message-ID: <87lencfvy9.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ZSEXNLABOBWNANOWTDO2TFS3KAOJLED7 X-Message-ID-Hash: ZSEXNLABOBWNANOWTDO2TFS3KAOJLED7 X-MailFrom: david@tethera.net 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: notmuch@notmuchmail.org 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=1670861188; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=fD93iY7wzK/QbADgLIJcW+hU+EYBUcGtdaYHlOQ90Vo=; b=kNxivJ36Si7IwrVAWMiigtb6/64fJUsJYCz9ffes93TFM65pRP9+DTvNxflQ1RTbPw24fo YIGWDj5JfTRjshfU0FK1VJWqzBWkir9uqfl+izRWR9NnkL1PZRhGIhD2Fug/Z+vfbFOlzC 4v2hkfRdWvu72xOXILWLxuwLot82C14BTVkekEFhsyHh6NNR1CoOVpNuNaUax/FE6hBFY0 WXs61x/DS6/PeljYjiGUrKahZer/3gQcd6nnU0TwuLjadRM7Zori6bi+jJ6zOYse2fPkDA j0USZ543d4eXUz1n4U91UY044ydbUpZhncwB+8RWMFGjaefC10Q3bIFMGkKKsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670861188; a=rsa-sha256; cv=none; b=NjnEBZ9/obQ87sQhTWw/UwrXsCxpQgTcC9YSsI+Tuv88hzOwNiDCIK6gVBKIfm5KevgjKh BLA3Fsyv5A4xY78LcdXJ9K2R6N/TaOxxBDox3MQLeOPOdGV3MTIiTkT6ZMgTeyM1iy+sR/ b5VElfg0kF9jKgrUKn0+0Ew43fSm7kcj4qKPjbzsOVNC+J/hv/Xu5Vwj4yqsMRuEFZI1Wu JfwnZ2wJUGPR6Kc98ZDuTLqdiQmJGtqJdx3y0W1/5uYtBvM4Qq57SPqzhKqohBCk66omZl XYVm4NQAMvlzvCpJ+n9a+p8IqIk03Sz0tICHgM1/ukYKjQroBkB7Ol0JUaFI2Q== X-Migadu-Spam-Score: -1.04 X-Spam-Score: -1.04 X-Migadu-Queue-Id: 744CD33678 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none X-TUID: a0BfCjs+l71g "Jose A. Ortega Ruiz" writes: > > 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 "")))))) > > ? yeah, that looks better to me as a general approach