unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: jao@gnu.org
To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org
Subject: Re: FYI: emacs / notmuch-search-edit-search
Date: Wed, 12 Jan 2022 17:59:42 +0000	[thread overview]
Message-ID: <87pmowx2b5.fsf@gnus.jao.io> (raw)
In-Reply-To: <m2v8ypjgua.fsf@guru.guru-group.fi>

hi,

On Wed, Jan 12 2022, Tomi Ollila wrote:

> Hi all
> I've had this for a while in .emacs.d/notmuch-config.el
>
> ---
>
> (defun notmuch-search-edit-search ()
>   "Edit current search"
>   (interactive)
>   (notmuch-search (read-from-minibuffer
> 		   "Edit search: " notmuch-search-query-string)
> 		  notmuch-search-oldest-first))
>
> (define-key notmuch-search-mode-map "e" #'notmuch-search-edit-search)
>
> ---

this looks useful indeed.  if added, please consider adding also a
notmuch-tree counterpart.  in notmuch-tree-mode-map, "e" is taken for
notmuch-tree-resume-message, so perhaps "E" could be used instead,
possibly in both maps for consistency.

untested:

--8<---------------cut here---------------start------------->8---
(defun notmuch-tree-edit-search (query)
  "Edit the current search"
  (interactive (list (read-from-minibuffer "Edit search: "
                                           notmuch-search-query-string)))
  (let ((notmuch-show-process-crypto (notmuch-tree--message-process-crypto)))
    (notmuch-tree-close-message-window)
    (notmuch-tree query
                  notmuch-tree-query-context
                  nil
                  nil
                  nil
                  notmuch-tree-unthreaded
                  nil
                  notmuch-search-oldest-first)))

(define-key notmuch-tree-mode-map "E" #'notmuch-tree-edit-search)
--8<---------------cut here---------------end--------------->8---

cheers,
jao
-- 
Configuring Emacs is more of a lifestyle choice than a task that one
completes.  – Stephen A. Ramsey\r

      parent reply	other threads:[~2022-01-12 17:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12 12:09 FYI: emacs / notmuch-search-edit-search Tomi Ollila
2022-01-12 15:19 ` Jose Antonio Ortega Ruiz
2022-01-12 17:59 ` jao [this message]

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=87pmowx2b5.fsf@gnus.jao.io \
    --to=jao@gnu.org \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).