unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: <notmuch@notmuchmail.org>
Subject: FYI: emacs / notmuch-search-edit-search
Date: Wed, 12 Jan 2022 14:09:33 +0200	[thread overview]
Message-ID: <m2v8ypjgua.fsf@guru.guru-group.fi> (raw)

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)

---

It has been very useful for refining one saved search of me -- but today
it was shown been far more useful in a large saved search (one I have
for nmbug), so I eventually thought this is good thing to share.

I also have created commit for that -- and is in my copy of notmuch*.elc
but I have not been running it as the above overwrites it ;/ -- also
before long ago I had last line as 'notmuch-search-oldest-first)) 
which was (obviously) incorrect but did not affect me as I have set
that variable to true (which is also the default, I think).

Tomi

PS: initial version used notmuch-group-disjunctive-query-string
but it just made it mode complex and usually provided worse
content -- so if one thinks about that don't or think how use
of it can be improved :D

             reply	other threads:[~2022-01-12 12:09 UTC|newest]

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

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=m2v8ypjgua.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).