From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 YBTECFIvl2PqVwAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 14:40:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YGi2CFIvl2O8vgAAauVa8A (envelope-from ) for ; Mon, 12 Dec 2022 14:40:34 +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 4FA091022D for ; Mon, 12 Dec 2022 14:40:33 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 87D175F37A; Mon, 12 Dec 2022 13:40:30 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 156915F36C for ; Mon, 12 Dec 2022 13:40:27 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 040805FB9E; Mon, 12 Dec 2022 08:40:25 -0500 (EST) Received: (nullmailer pid 3614232 invoked by uid 1000); Mon, 12 Dec 2022 13:40:24 -0000 From: David Bremner To: jao Subject: Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode In-Reply-To: <87ilih4tf5.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> Date: Mon, 12 Dec 2022 09:40:24 -0400 Message-ID: <87bko8hh9z.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: WDDKROMIWAMW53W2444TKWUC4VGHETBP X-Message-ID-Hash: WDDKROMIWAMW53W2444TKWUC4VGHETBP 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=1670852434; 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=3j8ZUPxIWwhPt2ma3GnvxmY03xWH3xnhxCdpS8ot9UA=; b=mpPqXiq4/bN6Yz9dVRdpbVVZNNdj3k+OHgGULNXF19T4IgoZDsadK8bB6/qoYYiNAvTeE3 Y2yLby0ZOHp9JMCD5UHd738l5IivnWWIrnwj4C01lK2AjA7Ijp3gEOPfKXPx2XnKSo6p0U avYCkHSmSQ0WchsA3WDEjpGG/GBYXS3JPsXLXNlXYXdYVWRjRunnvxZDWPrZMUH4r7pd/I bECtyeF5gOAZdj3AZLWQUSnPG6rkaJJ5F21QqP5neQhVSIYHyZB//T94T7m7MF6kWfbXk8 EZXr9LrMfjZ0JGDPBOLXgdo7WK0934x6xeQmGD0YYRyQbZYD1aTeBPaCQPhcTg== 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=1670852434; a=rsa-sha256; cv=none; b=t9CLSzWfjEFVjTBOPM/yaiZoPGP96NmfQ0sJIEMIpM5QvDqCD87Al+uBaJl705an9cW8gg IgWDfvX9iHS83nTSWN7pO3sfhBsldRdkVs1nkL3UQYQeH/LJBIdx0g5/zkq/wXaJ0CKtWd f2MJyfsCWvHQ+9vF4mj3xz6V0opUL/tGEWGV0QoZCdpvfig1KbbEBRUgEM2t6Hh5iazMqt E2TRNBX5RPiWvq8wsTrqIMX9njj9RIb15ebTNMy5NTQy8b4chvjOuBqmynt3+gpBL8OCXJ 5UT9RjFLLi5iCc4oeO1bYqMUpEyRvjgzX1fXRIyn57lRPjsg6R3I220SFDIvjw== X-Migadu-Spam-Score: -0.81 X-Spam-Score: -0.81 X-Migadu-Queue-Id: 4FA091022D 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: QQpQhnLxlb5+ jao writes: >> >> As mentioned in my previous reply, I'm still not 100% clear on why we >> need both depth and level. > > i might be misremembering, but i think depth is just an auxiliarly > argument taken by that function to know whether it's inserting the tip > of a tree or not, not a real depth. level is. so a better way would be > to make 'depth' take the values 'level' is currently taking, but i > wasn't sure other code would be using depth with its old original > meaning (e.g. via and advice; i did at some point). > depth is used for indentation in notmuch-show-mode, so it should be (close to) what you want? There is already a function notmuch-show-get-depth. > >> >>> + (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