Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode

Subject: Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode

Date: Mon, 12 Dec 2022 21:06:58 +0000

To: David Bremner


From: Jose A. Ortega Ruiz

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.
notmuch mailing list --
To unsubscribe send an email to