[PATCH v2] emacs: tree: support fold/unfold thread or sub-thread
David Bremner
david at tethera.net
Fri May 3 10:43:51 PDT 2019
Julien Masson <massonju.eseo at gmail.com> writes:
>
> +(defcustom notmuch-tree-overlay-string " [...]"
> + "String displayed at the beginning of the overlay"
> + :type 'string
> + :group 'notmuch-tree)
I initially thought this wasn't working because the end of my line was
outside the visible window in Emacs. I'm not sure if this is fixable
with a sensible amount of effort.
I think the docstring needs more context in order to be helpful to
users.
>
> @@ -294,6 +309,7 @@ FUNC."
> (define-key map " " 'notmuch-tree-scroll-or-next)
> (define-key map (kbd "DEL") 'notmuch-tree-scroll-message-window-back)
> (define-key map "e" 'notmuch-tree-resume-message)
> + (define-key map "t" 'notmuch-tree-toggle-folding-thread)
> map))
What do people think about the choice of 't'? It does something pretty
different in notmuch-show-mode
> +(defun notmuch-tree-clean-up-overlays ()
> + "Remove overlays not referenced to any buffer"
> + (setq notmuch-tree-overlays (cl-remove-if #'overlay-buffer notmuch-tree-overlays)))
This probably my confusion, but doesn't that remove all of the
non-deleted buffers?
> +(defun notmuch-tree-toggle-folding-thread (&optional arg)
> + "Fold / Unfold the current thread or sub-thread.
> +
> +With prefix arg (C-u) the whole thread is folded"
Since this is the main entry point, I wonder if you should mention the
behaviour with notmuch-tree-overlay-string here.
In general we'd like at least one or two two tests for a new
feature. Maybe Mark or (other) David in copy can give some suggestions
for that.
David
More information about the notmuch
mailing list