From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs/tree: add notmuch-tree-filter
Date: Mon, 01 Jun 2020 00:11:56 +0300 [thread overview]
Message-ID: <m2blm3ajxf.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <20200425194234.17971-1-jb55@jb55.com>
On Sat, Apr 25 2020, William Casarin wrote:
> This implements the notmuch-tree version of notmuch-show-filter-thread
> and binds it to the L key.
No reasoning in commit message why 'L' is chosen...
Tomi
>
> Signed-off-by: William Casarin <jb55@jb55.com>
> ---
> emacs/notmuch-tree.el | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
> index e5c23de2..8f7738d7 100644
> --- a/emacs/notmuch-tree.el
> +++ b/emacs/notmuch-tree.el
> @@ -328,6 +328,7 @@ FUNC."
> (define-key map "p" 'notmuch-tree-prev-matching-message)
> (define-key map "N" 'notmuch-tree-next-message)
> (define-key map "P" 'notmuch-tree-prev-message)
> + (define-key map "L" 'notmuch-tree-filter)
> (define-key map (kbd "M-p") 'notmuch-tree-prev-thread)
> (define-key map (kbd "M-n") 'notmuch-tree-next-thread)
> (define-key map "k" 'notmuch-tag-jump)
> @@ -965,6 +966,14 @@ Complete list of currently available key bindings:
> (insert (format " (process returned %d)" exit-status)))
> (insert "\n")))))))))
>
> +(defun notmuch-tree-filter (query)
> + "Filter or LIMIT the current tree based on a new query string.
> +
> +Reshows the current tree with matches defined by the new query-string."
> + (interactive (list (notmuch-read-query "Filter tree: ")))
> + (setq notmuch-tree-query-context (if (string= query "") nil query))
> + (notmuch-tree-refresh-view t))
> +
> (defun notmuch-tree-process-filter (proc string)
> "Process and filter the output of \"notmuch show\" for tree view"
> (let ((results-buf (process-buffer proc))
> --
> 2.25.1
next prev parent reply other threads:[~2020-05-31 21:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-25 19:42 [PATCH] emacs/tree: add notmuch-tree-filter William Casarin
2020-05-31 21:11 ` Tomi Ollila [this message]
2020-05-31 22:54 ` William Casarin
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=m2blm3ajxf.fsf@guru.guru-group.fi \
--to=tomi.ollila@iki.fi \
--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).