On Mon, Dec 12 2022, David Bremner wrote: > jao <j...@gnu.org> 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 -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org