Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Jump from notmuch to Gnus for nnml, nnfolder?
@ 2015-11-09 15:48 Julien Cubizolles
  2015-11-09 17:20 ` Adam Sjøgren
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-09 15:48 UTC (permalink / raw)
  To: info-gnus-english

I'm trying to use notmuch with Gnus, Tassilo provided a way to jump from
a notmuch search result to the corresponding group in Gnus in
<87r5rk8cmt.fsf@thinkpad.tsdh.de>. However his setup addresses the case
of articles stored in a Maildir.

At the moment, my Gnus setup is a mess of Maildirs, nnml and nnfolder
backends (for "historical" reasons). I guess Tassilo's method could be
tweaked for all file-based backends like nnml but I'm not sure that
would be the case for nnfolder.

For those of you using notmuch with Gnus, what did you choose? Put all
your messages in a Maildir ?

Julien.






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

* Re: Jump from notmuch to Gnus for nnml, nnfolder?
  2015-11-09 15:48 Jump from notmuch to Gnus for nnml, nnfolder? Julien Cubizolles
@ 2015-11-09 17:20 ` Adam Sjøgren
  2015-11-10 17:59   ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2015-11-09 17:20 UTC (permalink / raw)
  To: info-gnus-english

Julien writes:

> For those of you using notmuch with Gnus, what did you choose? Put all
> your messages in a Maildir ?

I have all my email in nnml in ~/Mail, and then I have configured nnir
to use notmuch as the backend for searching, by adding
(nnir-search-engine notmuch) to my nnml-entry in
gnus-secondary-select-methods and in my gnus-message-archive-method.

Notmuch is configured to point to ~/Mail, and to ignore the things I
don't want indexed (drafts;cron;spam...)

I search by pressing G G on an email group inside Gnus.

Seems to work quite well.


  Best regards,

    Adam

-- 
 "Unserious to the end                                        Adam Sjøgren
  As if I had a choice"                                  asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Jump from notmuch to Gnus for nnml, nnfolder?
  2015-11-09 17:20 ` Adam Sjøgren
@ 2015-11-10 17:59   ` Julien Cubizolles
  2015-11-10 21:45     ` Adam Sjøgren
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-10 17:59 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> I have all my email in nnml in ~/Mail, and then I have configured nnir
> to use notmuch as the backend for searching, by adding
> (nnir-search-engine notmuch) to my nnml-entry in
> gnus-secondary-select-methods and in my gnus-message-archive-method.

Is that all you had to configure ? I only get empty results

--8<---------------cut here---------------start------------->8---
Doing notmuch query roger...
notmuch args: search --format=text --output=files roger
Massaging notmuch output...done
Search produced empty results.
gnus-select-newsgroup: Couldn’t request group nnir:nnir-87twot20z4.fsf: Search produced empty results.
--8<---------------cut here---------------end--------------->8---

even though

--8<---------------cut here---------------start------------->8---
notmuch search --format=text --output=files roger
--8<---------------cut here---------------end--------------->8---

gives me a long list of files like:

--8<---------------cut here---------------start------------->8---
/home/wilk/email/Local/LLG_2010-2011/1
/home/wilk/email/Local/LLG_2009-2010/2
--8<---------------cut here---------------end--------------->8---



_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Jump from notmuch to Gnus for nnml, nnfolder?
  2015-11-10 17:59   ` Julien Cubizolles
@ 2015-11-10 21:45     ` Adam Sjøgren
  2015-11-10 23:32       ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2015-11-10 21:45 UTC (permalink / raw)
  To: info-gnus-english

Julien writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>> I have all my email in nnml in ~/Mail, and then I have configured nnir
>> to use notmuch as the backend for searching, by adding
>> (nnir-search-engine notmuch) to my nnml-entry in
>> gnus-secondary-select-methods and in my gnus-message-archive-method.

> Is that all you had to configure ? I only get empty results

That is all I have in my configuration, yes.

> Doing notmuch query roger...
> notmuch args: search --format=text --output=files roger
> Massaging notmuch output...done
> Search produced empty results.

> even though
>
> notmuch search --format=text --output=files roger
>
> gives me a long list of files like:

Odd.

> /home/wilk/email/Local/LLG_2010-2011/1
> /home/wilk/email/Local/LLG_2009-2010/2

Can you read those from Gnus? I.e. do they belong to a group in Gnus?

My versions:

 GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.2) of 2015-11-07 on trouble, modified by Debian
 Ma Gnus v0.14 (965fb88)
 notmuch 0.21


  Best regards,

    Adam

-- 
 "Please note: One of the quirks of our support system        Adam Sjøgren
  is that it always likes to have the "last word"        asjo@koldfront.dk
  regarding a request."


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Jump from notmuch to Gnus for nnml, nnfolder?
  2015-11-10 21:45     ` Adam Sjøgren
@ 2015-11-10 23:32       ` Julien Cubizolles
  2015-11-10 23:52         ` Adam Sjøgren
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-10 23:32 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:


> Can you read those from Gnus? I.e. do they belong to a group in Gnus?

Yes I can and yes they do.

> My versions:
>
>  GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.2) of 2015-11-07 on trouble, modified by Debian
>  Ma Gnus v0.14 (965fb88)
>  notmuch 0.21

Here are mine

GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.14.13) of 2015-10-21
"Ma Gnus v0.14" (latest from git as of tonight)
notmuch 0.20.2

I'll try updating notmuch.

Regards,

Julien.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Jump from notmuch to Gnus for nnml, nnfolder?
  2015-11-10 23:32       ` Julien Cubizolles
@ 2015-11-10 23:52         ` Adam Sjøgren
  2015-11-11 13:44           ` nnir-notmuch-remove-prefix isn't a group parameter? Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2015-11-10 23:52 UTC (permalink / raw)
  To: info-gnus-english

Julien writes:

> asjo@koldfront.dk (Adam Sjøgren) writes:

>> Can you read those from Gnus? I.e. do they belong to a group in Gnus?

> Yes I can and yes they do.

Curiouser and curiouser. What backend do you use to access them?

I guess you'll have to debug this further, say by using M-x edebug-defun
on some relevant nnir.el functions.


  Best regards,

    Adam

-- 
 "I'm only civil because I don't know any swear words."       Adam Sjøgren
                                                         asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* nnir-notmuch-remove-prefix isn't a group parameter?
  2015-11-10 23:52         ` Adam Sjøgren
@ 2015-11-11 13:44           ` Julien Cubizolles
  2015-11-11 13:49             ` Adam Sjøgren
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-11 13:44 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> Julien writes:
>
>> asjo@koldfront.dk (Adam Sjøgren) writes:
>
>>> Can you read those from Gnus? I.e. do they belong to a group in Gnus?
>
>> Yes I can and yes they do.
>
> Curiouser and curiouser. What backend do you use to access them?

I finally could fix it: my nnml was stored in ~/email/Local/ so notmuch
had to remove some prefix (which it didn't need to in your setup since
yours is in ~/Mail)

The following is working

--8<---------------cut here---------------start------------->8---
(setq gnus-select-method 
      '(nnml "Local"
	     (nnml-directory "~/email/Local")
	     (nnml-active-file "~/email/Local/active")
	     (nnml-get-new-mail nil)
	     (nnir-search-engine notmuch)
	     (nnir-notmuch-remove-prefix "/home/wilk/email/Local/")
	     )
      )
--8<---------------cut here---------------end--------------->8---

However, I also have 2 Maildirs (in /home/wilk/email/Maildir/Free for
instance) along with the nnml folder, and I wanted to try notmuch on
them too. I have set up some secondary methods like:

--8<---------------cut here---------------start------------->8---
(setq gnus-secondary-select-methods
      '(
	(nnimap "FreeOffline"
		(nnimap-stream shell)
		;; (nnimap-shell-program "/usr/lib/dovecot/imap -c /home/wilk/.dovecotrc-free")
		(nnimap-shell-program "/usr/lib/dovecot/imap -o mail_location=maildir:$HOME/email/Maildir/Free:LAYOUT=fs")
		(nnimap-split-methods default)
		(nnimap-inbox "INBOX")
		(nnir-search-engine notmuch)
		(nnir-notmuch-remove-prefix "/home/wilk/email/Maildir/Free/")
		)
)
--8<---------------cut here---------------end--------------->8---

but nnir-notmuch-remove-prefix seems to be always set to the value
defined in the primary method. So I guess that
nnir-notmuch-remove-prefix is not a group parameter. It would make sense
that it were, don't you think ?

For the time being I'll stick to the imap engine for nnir on the
maildir.

Julien.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnir-notmuch-remove-prefix isn't a group parameter?
  2015-11-11 13:44           ` nnir-notmuch-remove-prefix isn't a group parameter? Julien Cubizolles
@ 2015-11-11 13:49             ` Adam Sjøgren
  2015-11-11 17:21               ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Sjøgren @ 2015-11-11 13:49 UTC (permalink / raw)
  To: info-gnus-english

Julien writes:

> I finally could fix it: my nnml was stored in ~/email/Local/ so notmuch
> had to remove some prefix (which it didn't need to in your setup since
> yours is in ~/Mail)

Ah, great!

> defined in the primary method. So I guess that
> nnir-notmuch-remove-prefix is not a group parameter. It would make sense
> that it were, don't you think ?

Sounds like it. The documentation says it is a regex, so you can
probably work around the problem by making the value match both
prefixes?

,----[ C-h v nnir-notmuch-remove-prefix RET ]
| nnir-notmuch-remove-prefix is a variable defined in `nnir.el'.
| Its value is "/home/asjo/Mail/"
| 
| Documentation:
| *The prefix to remove from each file name returned by notmuch
| in order to get a group name (albeit with / instead of .).  This is a
| regular expression.
`----


  Best regards,

    Adam

-- 
 "[T]he subject matter is so attractive that only             Adam Sjøgren
  extravagant incompetence could make it dull."          asjo@koldfront.dk


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnir-notmuch-remove-prefix isn't a group parameter?
  2015-11-11 13:49             ` Adam Sjøgren
@ 2015-11-11 17:21               ` Julien Cubizolles
  2015-11-11 18:32                 ` Julien Cubizolles
  0 siblings, 1 reply; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-11 17:21 UTC (permalink / raw)
  To: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> Julien writes:
>
>> I finally could fix it: my nnml was stored in ~/email/Local/ so notmuch
>> had to remove some prefix (which it didn't need to in your setup since
>> yours is in ~/Mail)
>
> Ah, great!
>
>> defined in the primary method. So I guess that
>> nnir-notmuch-remove-prefix is not a group parameter. It would make sense
>> that it were, don't you think ?
>
> Sounds like it. The documentation says it is a regex, so you can
> probably work around the problem by making the value match both
> prefixes?

Thanks, it's working for both nnimap and nnml at the same time.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: nnir-notmuch-remove-prefix isn't a group parameter?
  2015-11-11 17:21               ` Julien Cubizolles
@ 2015-11-11 18:32                 ` Julien Cubizolles
  0 siblings, 0 replies; 10+ messages in thread
From: Julien Cubizolles @ 2015-11-11 18:32 UTC (permalink / raw)
  To: info-gnus-english

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


> Thanks, it's working for both nnimap and nnml at the same time.

Actually it doesn't, I lost track of what I was using. With:

--8<---------------cut here---------------start------------->8---
(setq nnir-notmuch-remove-prefix (regexp-opt '("/home/wilk/email/Local/" "/home/wilk/email/Local/archive/" "/home/wilk/email/Maildir/Free/")))
--8<---------------cut here---------------end--------------->8---

nnir using notmuch doesn't return any results when searching a message
in the nnimap or nnml located respectively at
/home/wilk/email/Maildir/Free/ and /home/wilk/email/Local/

With

--8<---------------cut here---------------start------------->8---
(setq nnir-notmuch-remove-prefix "/home/wilk/email/Local/")
--8<---------------cut here---------------end--------------->8---

Searching in the nnml backend works.

Julien.



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

end of thread, other threads:[~2015-11-11 18:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-09 15:48 Jump from notmuch to Gnus for nnml, nnfolder? Julien Cubizolles
2015-11-09 17:20 ` Adam Sjøgren
2015-11-10 17:59   ` Julien Cubizolles
2015-11-10 21:45     ` Adam Sjøgren
2015-11-10 23:32       ` Julien Cubizolles
2015-11-10 23:52         ` Adam Sjøgren
2015-11-11 13:44           ` nnir-notmuch-remove-prefix isn't a group parameter? Julien Cubizolles
2015-11-11 13:49             ` Adam Sjøgren
2015-11-11 17:21               ` Julien Cubizolles
2015-11-11 18: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).