Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-search and notmuch tagging
@ 2017-08-20 15:03 Julien Cubizolles
  2017-08-22 22:51 ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Cubizolles @ 2017-08-20 15:03 UTC (permalink / raw)
  To: ding

With nnselect and gnus-search providing a very convenient way to use
notmuch (and its tags) from within Gnus, I find myself looking for a way
to manipulate notmuch tags from Gnus without the need to run notmuch.el.

ATM I'm tagging new mail with notmuch, reading and responding to mail
and gmane messages from Gnus and would very much like to avoid going
back and forth between the 2 interfaces.

Julien.




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

* Re: gnus-search and notmuch tagging
  2017-08-20 15:03 gnus-search and notmuch tagging Julien Cubizolles
@ 2017-08-22 22:51 ` Eric Abrahamsen
  2017-08-29 15:32   ` Julien Cubizolles
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2017-08-22 22:51 UTC (permalink / raw)
  To: ding

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

> With nnselect and gnus-search providing a very convenient way to use
> notmuch (and its tags) from within Gnus, I find myself looking for a way
> to manipulate notmuch tags from Gnus without the need to run notmuch.el.
>
> ATM I'm tagging new mail with notmuch, reading and responding to mail
> and gmane messages from Gnus and would very much like to avoid going
> back and forth between the 2 interfaces.

You're way ahead of us :) I suspect this is going to be beyond the scope
of the changes in nnselect/gnus-search. Right now there's no real hooks
to make this happen.

But you could probably write something without too much work. I glanced
at the notmuch code. Are you able to display tags in Gnus summary
buffers as it is? If you're able to some how produce a list of tags on
the message under point, it looks like you could do something like:

(let* ((tags (get-tags-from-message-under-point-function))
       (new-tags (notmuch-update-tags (notmuch-read-tag-changes tags)))
       (id-query
	(format "id:%s"
		(mail-header-id
		 (gnus-data-header
		  (gnus-data-find
		   (gnus-summary-article-number)))))))
  (run-hooks 'notmuch-before-tag-hook)
  (apply 'notmuch-call-notmuch-process "tag"
	 (append new-changes (list "--" id-query)))
  (run-hooks 'notmuch-after-tag-hook))

Totally untested! But not too unreasonable.

Eric




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

* Re: gnus-search and notmuch tagging
  2017-08-22 22:51 ` Eric Abrahamsen
@ 2017-08-29 15:32   ` Julien Cubizolles
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Cubizolles @ 2017-08-29 15:32 UTC (permalink / raw)
  To: ding

Eric Abrahamsen <eric@ericabrahamsen.net> writes:


> But you could probably write something without too much work. I glanced
> at the notmuch code. Are you able to display tags in Gnus summary
> buffers as it is? 

Not yet, but your example has given me some pointers. I'll give it a try.

Thanks a lot, I'll let the list know when I have something working.




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

end of thread, other threads:[~2017-08-29 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-20 15:03 gnus-search and notmuch tagging Julien Cubizolles
2017-08-22 22:51 ` Eric Abrahamsen
2017-08-29 15:32   ` Julien Cubizolles

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 NNTP newsgroup(s).