From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86532 Path: news.gmane.org!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.gnus.general Subject: Re: searching local mail stores Date: Mon, 04 Jan 2016 22:12:41 +0100 Message-ID: References: <87h9iwo8e6.fsf@gmail.com> <87twmwxler.fsf@tullinup.koldfront.dk> <87si2gx8lq.fsf@gmail.com> <8737ufyi9y.fsf@tullinup.koldfront.dk> <87d1tjkzw3.fsf@jnanam.net> <87lh87c9va.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="===-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1451944038 18364 80.91.229.3 (4 Jan 2016 21:47:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Jan 2016 21:47:18 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34759=ding+2Daccount=gmane.org@lists.math.uh.edu Mon Jan 04 22:47:07 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aGCy2-0003eL-5J for ding-account@gmane.org; Mon, 04 Jan 2016 22:47:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1aGCxz-0004CV-Gj for ding-account@gmane.org; Mon, 04 Jan 2016 15:47:03 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1aGCcQ-00043L-F9 for ding@lists.math.uh.edu; Mon, 04 Jan 2016 15:24:46 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1aGCcO-0000cm-DI for ding@lists.math.uh.edu; Mon, 04 Jan 2016 15:24:46 -0600 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by quimby.gnus.org with esmtps (TLS1.2:RSA_ARCFOUR_SHA1:128) (Exim 4.80) (envelope-from ) id 1aGCcM-0006oG-DO for ding@gnus.org; Mon, 04 Jan 2016 22:24:42 +0100 X-IronPort-AV: E=Sophos;i="5.20,522,1444687200"; d="asc'?scan'208";a="195563417" Original-Received: from cbg35-2-78-242-14-140.fbx.proxad.net (HELO charm-ecran.irisa.fr) ([78.242.14.140]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Jan 2016 22:24:36 +0100 User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin) Cancel-Lock: sha1:Q4C2ccWQ4hTcM9rr2qP8rgldKVc= X-Spam-Score: -7.1 (-------) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86532 Archived-At: --===-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: multipart/signed; boundary="==-=-=" --==-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, (Sorry if you are seeing this as a duplicate. I tried to post it through the gmane group but I'm not seeing it, so here it is again directly to the mailing list.) On 2016-01-03 17:04, Eric Abrahamsen writes: >>> In .gnus I have added: >>> >>> (nnir-search-engine notmuch) >>> >>> in my mail-method ((nnml "")). >>> >>> I search by going to my email-topic and pressing GG. >> >> What else needs to be setup to use notmuch for search? >> >> (There's some info on setup here for instance: >> http://roland.entierement.nu/blog/2010/09/08/gnus-dovecot-offlineimap-se= arch-a-howto.html >> ) >> >> Is that the sort of setup that needs doing first? > > This, but also =E2=80=98nnir-notmuch-remove-prefix=E2=80=99. Notmuch know= s nothing about > Gnus, it just knows where matching files are on your filesystem. Gnus > only wants to know the filename relative to where it *already knows how > to find the message*. You customize that option in order to match the > two up. The option is basically copied from nnir-namazu-remove-prefix, > which has a more useful docstring... I'm giving this a try, and I'm having a problem: whatever I try, I get an error: gnus-select-newsgroup: Couldn't request group nnir:nnir-m2bn91ihar.fsf: Search produced empty results. If I run the notmuch command on the command line, I see many results. I tried to run edebug on the nnir-run-notmuch function, and it does something strange. It actually populates a temporary buffer with the results I see when running the command line, but then it seems to go through these results discarding all of them. #+begin_src emacs-lisp (while (not (eobp)) (setq filenam (buffer-substring-no-properties (line-beginning-position) (line-end-position)) artno (file-name-nondirectory filenam) dirnam (file-name-directory filenam)) (forward-line 1) ;; don't match directories (when (string-match article-pattern artno) (when (not (null dirnam)) ;; maybe limit results to matching groups. (when (or (not groupspec) (string-match groupspec dirnam)) (nnir-add-result dirnam artno "" prefix server artlist))))) #+end_src The problem is in the matching of the name of the file (something like "1451911994.M307856P59885.charm-ecran.irisa.fr,S=3D3270,W=3D3347:2,S") against the pattern "^[0-9]+$", which fails and the found message is ignored. Is this a bug in this function, or do I need additional configuration? Here are my server settings: (setq gnus-select-method=20 '(nnimap=20 "zimbra" (nnimap-shell-program "~/bin/dovecot_bin/imap -c ~/.dovecotzimbra.rc") (nnimap-stream shell) (nnimap-logout-timeout 1.0) (nnir-search-engine notmuch) (nnir-notmuch-remove-prefix "/Users/schmitta/.Maildir/zimbra/"))) (setq gnus-secondary-select-methods=20 '((nnimap=20 "local" (nnimap-address "localhost") (nnimap-server-port 143) (nnimap-stream network) (nnir-search-engine notmuch) (nnir-notmuch-remove-prefix "/Users/schmitta/.Maildir/local")) )) Thanks, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 (Updated December 28, 2015, Mauna Loa Obs.): 402.6= 0 ppm --==-=-= Content-Type: application/pgp-signature; name=signature.asc Content-Transfer-Encoding: base64 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjEKCmlRRWNCQUVC Q2dBR0JRSldpdUJNQUFvSkVBUU5DanRPMHVYSE9zc0gvaVpTYkpqUzVRYkNLTlpSTjhQQjkxcWEK QVZoZEwvbGZ4RC90YUlIc2pXbnA1eUZBYm5tWEtpRWk4UlNlb0pCbTNYQmtnLzRudmJoRDlwY0lD TDRzVXo3bwpUOXlXZGcwZ2sxdXk3U3VOb0wwWG5EY01LVGp2VGV6cWN2NVE3U0hRL1RQd1drNUFu cmJDelErSjVpTVFxT2FlCi93Z0NzNGlyTTQ2NVJDY1h0YmlDdU1CQnV2aS9jby9DQmZ0VUxBY1BF QTVTWHVnSzFndXQ1ZFp5K050NHlUNkwKRWEyNm92RnVHMWRoTDg1ZGp2QngyTnc0MEowaHlYYTUy SFR3eGN0N012OFNZL3c4V3dJbWl4SWwvMk9oMDk3UQpZYUU1RG9JbWhPQTJYME90QWRGK1F4Q3h2 dXcyZUFBbkpVRkJIdm4xSVRyMWVuNWhBQTM4SzRtQTlEVXJhRkk9Cj1meUZYCi0tLS0tRU5EIFBH UCBTSUdOQVRVUkUtLS0tLQ== --==-=-=-- --=-=-=-- --===-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWiuMSAAoJEAQNCjtO0uXHhJcH/RCr1m61uIeyHPBKJjaFPll4 uelfugf3lkL+gnUfpy2tpWsCsR9OhtuEQzpXu981J5abqf4QhhHsVZHu40u9MrNI BauyJgKynn+lIRqarvoFxvBpeHL0M0zNpyCagdzq/gRYQTBmrsQTwop41x5b2lJN 2O8VNRYHhs8qNHenwYYK0DLqPCOb6P/mVGeyjIsBD5l782bOzP4hWP67ZsJnOYkO 1JnWfKkku/hvnnrPVghMjSqBFGLFVQuOKfDrfC212P6p3p7Y/ansBsqJnJX9wAaR wDLlU69EsWbVwVn1AXCSKB74fCP3zYSV8VFFC+eotHHM0iBBCh1aT1ffNVJQ8iE= =rdhh -----END PGP SIGNATURE----- --===-=-=--