[notmuch] Snippet to jump to message in Gnus from notmuch-show buffer
tassilo at member.fsf.org
Fri Nov 27 14:10:30 PST 2009
Carl Worth <cworth at cworth.org> writes:
> On Tue, 24 Nov 2009 09:02:46 +0100, Tassilo Horn <tassilo at member.fsf.org> wrote:
>> I'm a Gnus user and use notmuch mostly for searching. When I want to
>> reply to a message, I need to get back to Gnus, so that my Gnus
>> posting styles (gcc into that group, right email address, correct
>> signature,...) are applied.
> Oh, good. I've been hoping to be able to get some advice from gnus
> users. I want to figure out how to get gnus support for viewing
> encrypted messages, etc.
Oh, I don't have any clue about encryption. EasyPG is a keyword, that I
can provide, though.
> Do you happen to know some good documentation for how to get started
> with gnus for reading mail? I'd be happy even with the bare minimum to
> just get gnus to view one single message from out of my mail
> store. (Which is something I tried to figure out from the gnus manual,
> but I never succeeded at.)
Well, if you only want to have a look at a maildir or mbox, and don't
want to make the group permanent and let gnus fetch mail, then this
should do the trick.
M-x gnus RET ;; brings you into the *Group* buffer, and then
,----[ (info "(gnus)Foreign Groups") ]
| `G m'
| Make a new group (`gnus-group-make-group'). Gnus will prompt you
| for a name, a method and possibly an "address". For an easier way
| to subscribe to NNTP groups (*note Browse Foreign Server::).
>> Therefore, I created this small snippet. Now C-c C-c inside some
>> message in the *notmuch-show* buffer opens this article in a Gnus
>> *Summary* buffer, where I can reply to it, forward it, ...
> And this would be exactly the thing I would want for exploring gnus,
> if only I could get it working.
This does only work if the group already exists inside Gnus. So you
might consider setting it up properly, although it's a bit first-time
> If I just try to run it, I get:
> Symbol's function definition is void: org-gnus-follow-link
Do you use Emacs 23? If yes, put a (require 'org-gnus) before the
call. If not, you have to install org-mode manually.
> And I suppose that's expected since I don't have gnus "running". If I
> try to start gnus with "M-x gnus", I get:
> Unable to open server nntp+news, go offline? (y or n)
Hm, I can reproduce that with "emacs -Q". Looks wrong to me, probably a
bug... Normally, an unconfigured Gnus should start having one nndoc
server providing some groups with static Gnus infos (FAQ and stuff).
> What's the simplest way for me to tell gnus that I won't be using it
> in any other way than with the "nnimap+" folder I can tell you're
> using in your snippet?
Here's a quick walkthrough my .gnus.el with only the basics (getting
;; Gnus has the concept of one select method, and a list of so-called
;; secondary select methods. I set the former to a do-nothing backend
;; and only use the secondary ones, so that it's a bit more uniformly.
(setq gnus-select-method '(nnnil))
;; Fetch news from my university's nntp server
;; Fetch mail from some POP3 accounts and split them according to
;; The mails are stored in an nnml group at the given directory
;; Here the mails are fetched
(setq mail-sources `((pop :server "pop.gmx.de"
:user "xxxxx at gmx.de"
(pop :server "pop3.freenet.de"
:user "xxxxx at freenet.de"
;; Split them into the groups nnml+Popmail:gmx, freenet, and misc
(setq nnmail-split-methods 'nnmail-split-fancy
'(| (any "xxxxx at gmx.de" "gmx")
(any "xxxxx at freenet.de" "freenet")
;; Get mail from my local Dovecot IMAP server which I sync with my
;; different accounts using OfflineIMAP
More information about the notmuch