unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* newbie questions about notmuch.el 
@ 2017-09-05 10:03 Julien Cubizolles
  2017-09-06  8:16 ` Jani Nikula
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Cubizolles @ 2017-09-05 10:03 UTC (permalink / raw)
  To: notmuch

I'm using notmuch.el in emacs. In a notmuch search buffer, how can I:

+ set or remove the flag mark on a given message
+ select several messages to add, for instance, the same tag

Julien.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-05 10:03 newbie questions about notmuch.el Julien Cubizolles
@ 2017-09-06  8:16 ` Jani Nikula
  2017-09-06  8:42   ` Tom Hirschowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2017-09-06  8:16 UTC (permalink / raw)
  To: Julien Cubizolles; +Cc: Notmuch Mail

On Tue, Sep 5, 2017 at 1:03 PM, Julien Cubizolles <j.cubizolles@free.fr> wrote:
> I'm using notmuch.el in emacs. In a notmuch search buffer, how can I:

In general, hit '?' to get a help page for the Notmuch buffer you're in.

> + set or remove the flag mark on a given message

What is the flag mark? There is no "mark" feature.

In the search buffer, you can only operate on threads, not messages.
Hit '+' or '-' to tag/untag the highlighted thread.

In the tree view (try 'z') you can also operate on messages. '+' and
'-' work there too.

> + select several messages to add, for instance, the same tag

In the search buffer, select a region of threads to tag, and hit '+' or '-'.

BR,
Jani.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-06  8:16 ` Jani Nikula
@ 2017-09-06  8:42   ` Tom Hirschowitz
  2017-09-06  9:08     ` Jani Nikula
  2017-09-08  5:37     ` Julien Cubizolles
  0 siblings, 2 replies; 9+ messages in thread
From: Tom Hirschowitz @ 2017-09-06  8:42 UTC (permalink / raw)
  To: Jani Nikula, Julien Cubizolles; +Cc: Notmuch Mail


I think Julien meant the 'flagged' tag: just press the space bar to
switch it on and off.

Regarding the second question, you may filter your search (e.g., by the
'flagged' tag) and then tag all messages by pressing *. IIRC there is no
shortcut for filtering by default. I have this

(define-key notmuch-show-mode-map (kbd "l") 'notmuch-search-filter) 
(define-key notmuch-search-mode-map (kbd "l") 'notmuch-search-filter) 
(define-key notmuch-tree-mode-map (kbd "l") 'notmuch-search-filter) 

somewhere in my emacs files, but perhaps there is a cleaner way.

> On Tue, Sep 5, 2017 at 1:03 PM, Julien Cubizolles <j.cubizolles@free.fr> wrote:
>> I'm using notmuch.el in emacs. In a notmuch search buffer, how can I:
>
> In general, hit '?' to get a help page for the Notmuch buffer you're in.
>
>> + set or remove the flag mark on a given message
>
> What is the flag mark? There is no "mark" feature.
>
> In the search buffer, you can only operate on threads, not messages.
> Hit '+' or '-' to tag/untag the highlighted thread.
>
> In the tree view (try 'z') you can also operate on messages. '+' and
> '-' work there too.
>
>> + select several messages to add, for instance, the same tag
>
> In the search buffer, select a region of threads to tag, and hit '+' or '-'.
>
> BR,
> Jani.
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-06  8:42   ` Tom Hirschowitz
@ 2017-09-06  9:08     ` Jani Nikula
  2017-09-07 12:25       ` Julien Cubizolles
  2017-09-08  5:37     ` Julien Cubizolles
  1 sibling, 1 reply; 9+ messages in thread
From: Jani Nikula @ 2017-09-06  9:08 UTC (permalink / raw)
  To: Tom Hirschowitz; +Cc: Julien Cubizolles, Notmuch Mail

On Wed, Sep 6, 2017 at 11:42 AM, Tom Hirschowitz
<tom.hirschowitz@univ-smb.fr> wrote:
>
> I think Julien meant the 'flagged' tag: just press the space bar to
> switch it on and off.

I don't know what you have configured, but the default is:

c-h k SPC
"SPC runs the command notmuch-search-scroll-up"

> Regarding the second question, you may filter your search (e.g., by the
> 'flagged' tag) and then tag all messages by pressing *. IIRC there is no
> shortcut for filtering by default. I have this

'l' to filter by query, 't' to filter by tag.

BR,
Jani.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-06  9:08     ` Jani Nikula
@ 2017-09-07 12:25       ` Julien Cubizolles
  2017-09-07 12:31         ` Julien Cubizolles
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Cubizolles @ 2017-09-07 12:25 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Tom Hirschowitz, Notmuch Mail


Thanks for these answers.

>> I think Julien meant the 'flagged' tag: just press the space bar to
>> switch it on and off.

> I don't know what you have configured, but the default is:
>
> c-h k SPC
> "SPC runs the command notmuch-search-scroll-up"

That's what I have too. But from your message, I realized that I only
have to do  +flagged :-) Tom, do you have a function defined for this ?

>> Regarding the second question, you may filter your search (e.g., by the
>> 'flagged' tag) and then tag all messages by pressing *. IIRC there is no
>> shortcut for filtering by default. I have this
>
> 'l' to filter by query, 't' to filter by tag.

Works for me. I was looking for something like the "process-mark" in
Gnus but filtering is fine.

Julien.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-07 12:25       ` Julien Cubizolles
@ 2017-09-07 12:31         ` Julien Cubizolles
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Cubizolles @ 2017-09-07 12:31 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Tom Hirschowitz, Notmuch Mail

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Thanks for these answers.
>
>>> I think Julien meant the 'flagged' tag: just press the space bar to
>>> switch it on and off.

I just noticed that k f also adds the 'flagged' tag.

Julien.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-06  8:42   ` Tom Hirschowitz
  2017-09-06  9:08     ` Jani Nikula
@ 2017-09-08  5:37     ` Julien Cubizolles
  2017-09-08 10:46       ` David Bremner
  1 sibling, 1 reply; 9+ messages in thread
From: Julien Cubizolles @ 2017-09-08  5:37 UTC (permalink / raw)
  To: Tom Hirschowitz; +Cc: Jani Nikula, Notmuch Mail

Tom Hirschowitz <tom.hirschowitz@univ-smb.fr> writes:

> I think Julien meant the 'flagged' tag: just press the space bar to
> switch it on and off.
>
> Regarding the second question, you may filter your search (e.g., by the
> 'flagged' tag) and then tag all messages by pressing *. IIRC there is no
> shortcut for filtering by default. I have this
>
> (define-key notmuch-show-mode-map (kbd "l") 'notmuch-search-filter) 
> (define-key notmuch-search-mode-map (kbd "l") 'notmuch-search-filter) 
> (define-key notmuch-tree-mode-map (kbd "l") 'notmuch-search-filter) 

notmuch-search-filter doesn't seem to work in tree mode: I get

--8<---------------cut here---------------start------------->8---
(void-variable notmuch-search-query-string)
  notmuch-search-filter-by-tag("+unread")
--8<---------------cut here---------------end--------------->8---

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-08  5:37     ` Julien Cubizolles
@ 2017-09-08 10:46       ` David Bremner
  2017-09-08 12:04         ` Tom Hirschowitz
  0 siblings, 1 reply; 9+ messages in thread
From: David Bremner @ 2017-09-08 10:46 UTC (permalink / raw)
  To: Julien Cubizolles, Tom Hirschowitz; +Cc: Notmuch Mail

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Tom Hirschowitz <tom.hirschowitz@univ-smb.fr> writes:
>
>> I think Julien meant the 'flagged' tag: just press the space bar to
>> switch it on and off.
>>
>> Regarding the second question, you may filter your search (e.g., by the
>> 'flagged' tag) and then tag all messages by pressing *. IIRC there is no
>> shortcut for filtering by default. I have this
>>
>> (define-key notmuch-show-mode-map (kbd "l") 'notmuch-search-filter) 
>> (define-key notmuch-search-mode-map (kbd "l") 'notmuch-search-filter) 
>> (define-key notmuch-tree-mode-map (kbd "l") 'notmuch-search-filter) 
>
> notmuch-search-filter doesn't seem to work in tree mode: I get
>
> --8<---------------cut here---------------start------------->8---
> (void-variable notmuch-search-query-string)
>   notmuch-search-filter-by-tag("+unread")
> --8<---------------cut here---------------end--------------->8---

Yes, I think there has to be some mistake in what Tom quoted (or Tom is
using a heavily modified version of notmuch), since
notmuch-search-filter doesn't work in notmuch-show-mode either. The
prefix is a  a hint why that might be: notmuch-search-foo is
generally intended to be called in notmuch-search mode.  As was already
mentioned, 'l' is bound by default to filter in both notmuch-show and
notmuch-search mode. There's no direct equivalent in tree-mode
currently, but you can use the following workaround

S - switch to search view of same query
l - limit search
Z - switch back to tree view.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: newbie questions about notmuch.el
  2017-09-08 10:46       ` David Bremner
@ 2017-09-08 12:04         ` Tom Hirschowitz
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Hirschowitz @ 2017-09-08 12:04 UTC (permalink / raw)
  To: David Bremner; +Cc: Julien Cubizolles, Notmuch Mail


> Yes, I think there has to be some mistake in what Tom quoted

Indeed :)

Regarding Julien's question:

> Tom, do you have a function defined for this ?

Yes, probably utterly naive, wrong, etc. Would be happy to be corrected, in particular about how to avoid code triplication.
There you go:

(defun notmuch-show-flag  () 
  "Switch the flagged tag for the current thread or region." 
  (interactive) 
  (let ((tag-changes (if (member "flagged" (notmuch-show-get-tags)) (list "-flagged") (list "+flagged"))))
    (notmuch-show-tag tag-changes)))

(defun notmuch-search-flag  (&optional beg end) 
  "Switch the flagged tag for the current thread or region." 
  (interactive) 
  (let ((tag-changes (if (member "flagged" (notmuch-search-get-tags)) (list "-flagged") (list "+flagged"))))
    (notmuch-search-tag tag-changes beg end)))

(defun notmuch-tree-flag ()
  "Switch the flagged tag for the current thread or region." 
  (interactive)
  (let ((tag-changes (if (member "flagged" (notmuch-tree-get-tags)) (list "-flagged") (list "+flagged"))))
    (notmuch-tree-tag tag-changes)))

(define-key notmuch-show-mode-map (kbd "SPC") 'notmuch-show-flag) 
(define-key notmuch-search-mode-map (kbd "SPC") 'notmuch-search-flag) 
(define-key notmuch-tree-mode-map (kbd "SPC") 'notmuch-tree-flag) 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-09-08 12:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 10:03 newbie questions about notmuch.el Julien Cubizolles
2017-09-06  8:16 ` Jani Nikula
2017-09-06  8:42   ` Tom Hirschowitz
2017-09-06  9:08     ` Jani Nikula
2017-09-07 12:25       ` Julien Cubizolles
2017-09-07 12:31         ` Julien Cubizolles
2017-09-08  5:37     ` Julien Cubizolles
2017-09-08 10:46       ` David Bremner
2017-09-08 12:04         ` Tom Hirschowitz

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