unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Jose A. Ortega Ruiz" <jao@gnu.org>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH v7 1/1] emacs: notmuch-tree-outline-mode
Date: Mon, 12 Dec 2022 21:06:58 +0000	[thread overview]
Message-ID: <87r0x48h71.fsf@mail.jao.io> (raw)
In-Reply-To: <87bko8hh9z.fsf@tethera.net> (David Bremner's message of "Mon, 12 Dec 2022 09:40:24 -0400")

On Mon, Dec 12 2022, David Bremner wrote:

> jao <jao@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.

  parent reply	other threads:[~2022-12-12 21:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04 23:52 [PATCH v7 0/1] emacs: notmuch-tree-outline-mode jao
2022-11-04 23:52 ` [PATCH v7 1/1] " jao
2022-12-04 16:18   ` David Bremner
2022-12-11 18:24   ` David Bremner
2022-12-11 19:44     ` jao
2022-12-12 13:40       ` David Bremner
2022-12-12 15:22         ` Jose A. Ortega Ruiz
2022-12-12 15:39         ` Jose A. Ortega Ruiz
2022-12-12 16:06           ` David Bremner
2022-12-12 21:06         ` Jose A. Ortega Ruiz [this message]
2022-12-13  2:19           ` Jose A. Ortega Ruiz
2022-11-05  0:01 ` [PATCH v7 0/1] " Jonathan Wilner
2022-11-07 17:05   ` Matt Armstrong
2022-11-05  0:09 ` jao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0x48h71.fsf@mail.jao.io \
    --to=jao@gnu.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).