unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Julien Masson <massonju.eseo@gmail.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2] emacs: tree: support fold/unfold thread or sub-thread
Date: Fri, 03 May 2019 14:43:51 -0300	[thread overview]
Message-ID: <874l6b77s8.fsf@tethera.net> (raw)
In-Reply-To: <861s2vrmtp.fsf@gmail.com>

Julien Masson <massonju.eseo@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

  reply	other threads:[~2019-05-03 17:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 15:25 [PATCH v2] emacs: tree: support fold/unfold thread or sub-thread Julien Masson
2019-05-03 17:43 ` David Bremner [this message]
2021-08-30 19:44 ` inwit
2021-08-31  0:00   ` David Bremner
2021-08-31  9:37     ` inwit
2021-08-31 10:59       ` inwit

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=874l6b77s8.fsf@tethera.net \
    --to=david@tethera.net \
    --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).