From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 SG2BN/6Xl2MoNwEAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 22:07:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2JPQNv6Xl2OXKQEAG6o9tA (envelope-from ) for ; Mon, 12 Dec 2022 22:07:10 +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 5DBC06AB4 for ; Mon, 12 Dec 2022 22:07:10 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B8B5E5F9A8; Mon, 12 Dec 2022 21:07:07 +0000 (UTC) Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by mail.notmuchmail.org (Postfix) with ESMTPS id 2CF025F8F4 for ; Mon, 12 Dec 2022 21:07:05 +0000 (UTC) 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 1p4q0s-00051q-93; Mon, 12 Dec 2022 16:07:02 -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=z9Z3B2PvPaoa+rw/lcPXpqSkohUIBV040JFdoiflNJg=; b=FBOaw2qXuPyMknCB/EN6 UAzL03AS+cgWZrBir12JsvSlfdcicTVbz/Tc0IeHnAdGsI6KHrPcYEN8PBGPLFvaOmoYpE6ngKvJI WgdMkJE0ZlElyDAbVmeIOr+1zS522KL/GANNg+C2QjREjal3+0A7GQ1jvR4c4HF48f92AUznbZWO3 vzGoDsE6rTE9CtLQiTI0kGsU24sfSym70xPfA3Mj7TGlFvDxCOfc0B35d3DZWa6M1DFkj99od/Vlm FNZwe7+A7kSE9L+eKjfLrgBPERowG1v2Z99zjxkLwQ5ap10fORDG8cezPD15LOhL3Jz4meSJR5lL5 FHfX5M9fb5IsTg==; 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 1p4q0r-0007j5-FI; Mon, 12 Dec 2022 16:07:01 -0500 Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 842a0e66; Mon, 12 Dec 2022 21:06:58 +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 21:06:58 +0000 Message-ID: <87r0x48h71.fsf@mail.jao.io> MIME-Version: 1.0 Message-ID-Hash: DVKBFRZWHAKXNGNLXBFX65SYLMSABSQT X-Message-ID-Hash: DVKBFRZWHAKXNGNLXBFX65SYLMSABSQT 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 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=1670879230; 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:dkim-signature; bh=F+o+4cIUa/FEgjcLe7/n6V5iQwwFVZTFPdA9LpE9nhA=; b=CfH/UYrzMFWURkLfAZ7JmwqVe8hKXwYGznUgqY21SbcU+HrMJjdxdI8cMyaKEDRUqJOOKb pD3n+6Eyuy0DVgS0zdpjFKKdu4aMO37GXFtjW5idq2Uo7MgkSxavSVwrSj14HrClfmt+En ztCPxdSI/PAnOwHHBlBAO2PsoLKIapo6xWYAnpa3bE055yc3joDERXbhAzwfp4kwjuZ9im Pl0K1Vs+yUgJ5VlMMgt3fibLyTqFmng9lkUdOjmc5R16cdyVwevwknK/GdvIlLs2M9hajn D04mwkH3xs24itQ31vmQuIVHfLfW0NUyD5wmIdoTQynJ5+QByERkgjBXZDQ4Tg== 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=FBOaw2qX; 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=1670879230; a=rsa-sha256; cv=none; b=kk2ZiIOq/RQSDgAf2p/h1I8nvEDVhP0Iuh9p3KyKVt6i0/5oFJg/5GAOqXuEJJt/j8bnCZ 4vYdZ8jw6foYQInqcAp3KXDSk52fhL1huKtP/bhocKrUNvmLbvtYxKnt3L19cbLtu+wEON URvntilNOUTNMwopuu2AfMs8h4aRu9+mx1Lo/btC2tBDg3s5Ocrm/OtiC14716Vkwf764u XHG5l0V3fmckSoZxcCxNM8RVTYTzDH+gPL1YS82EHhi0XPThHX0wER2D1hhdDH79snKcEH qc+1670aojv04ohhInG1fyQU7fgxsQciDnA5WB2/fViR/m1/DW2UKGG953vzwQ== X-Migadu-Spam-Score: -0.80 X-Spam-Score: -0.80 X-Migadu-Queue-Id: 5DBC06AB4 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=FBOaw2qX; 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: fyf8ebWXwTgC On Mon, Dec 12 2022, David Bremner wrote: > 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. took a second look, and yes, it's close but not quite. there are cases (when the message is not the first but its depth is 0) where its outline level doesn't match the depth. we could store the depth and then repeat the computation everytime outline-mode requests the level, but it seems better to compute it only once, and also calling it something other than :depth, since they're not really the same thing.