From: Mark Walters <markwalters1009@gmail.com>
To: Julien Masson <massonju.eseo@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: tree: support fold/unfold thread
Date: Sat, 23 Mar 2019 08:07:25 +0000 [thread overview]
Message-ID: <874l7um2te.fsf@qmul.ac.uk> (raw)
In-Reply-To: <86h8bwgueb.fsf@julienm-ubuntu-20JES0UQ00.i-did-not-set--mail-host-address--so-tickle-me>
Hello
> This patch allow the user to fold/unfold a thread in the current tree
> buffer by pressing "t" key.
This looks like a really nice feature! I will try and review the code
properly soon, but have some preliminary comments.
> By default a string is displayed at the beginning of the overlay to
> indicate that this thread is folded.
I wonder if it would make sense to make the [....] replace the "tree
symbol" (-> etc)? This would mean that it was always on the screen and the
tree symbol looks a little odd with a collapsed thread.
Secondly, I wonder whether making it collapse just the subthread below
the current message (ie a subtree) would be nice? To me that feels more
generic, but might be more effort than it's worth as the code would need
to deal with nested folds. Then C-u t could do exactly the current
folding (ie the whole thread). But this is just a thought.
Finally a comment on the code
> +The overlay found is located between START and END position in BUFFER."
> + (seq-find (lambda (ov)
> +(defun notmuch-tree-clean-up-overlays ()
> + "Remove overlays not referenced to any buffer"
> + (setq notmuch-tree-overlays (seq-filter #'overlay-buffer notmuch-tree-overlays)))
seq-find and seq-filter are emacs 25+ only I think; at least they don't
seem to be in emacs24 which I think we still support. Perhaps some cl
functions can be used (eg remove-if-not) instead?
Best wishes
Mark
next prev parent reply other threads:[~2019-03-23 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 14:26 [PATCH] emacs: tree: support fold/unfold thread Julien Masson
2019-03-23 8:07 ` Mark Walters [this message]
2019-03-25 15:16 ` Masson, Julien
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=874l7um2te.fsf@qmul.ac.uk \
--to=markwalters1009@gmail.com \
--cc=massonju.eseo@gmail.com \
--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).