Gnus development mailing list
 help / color / mirror / Atom feed
* nnir notmuch backend and the string-match function
@ 2013-11-27 20:26 Alexander Baier
  2013-11-27 23:33 ` Alexander Baier
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Baier @ 2013-11-27 20:26 UTC (permalink / raw)
  To: ding

Hello,

I am currently trying to set up maildir search while using notmuch as a
nnir backend.  So far, however, this has not been very successful.

Issuing a search using "G G" on a nnmaildir group presents me with the
following error message:

"Unknown header type nil while requesting articles                     of
group nnmaildir+gmail:gmail.Inbox"

So I started digging around in nnir.el and came across a very strange
bug I can't explain.  In the function `nnir-compose-result' there is
the following expression:

#+begin_src emacs-lisp
  (when (string-match (concat "^" prefix) dirnam)
    (setq dirnam (replace-match "" t t dirnam)))
#+end_src

I stepped through this code with edebug and was very confused:
The value of dirnam is "/home/delexi/Mail/gmail/Inbox/cur/" and the value of
prefix is "/home/delexi/Mail/".  To my surprise `string-match' did not
match anything!  This of course leads to errors in the code following
this snippet.  I tried this snippet in my scratch buffer and everything
worked fine (it matched the prefix correctly).

How is this possible?  Is there something about string-match I am
missing?  How is it possible, that this does not match anything?

#+begin_src emacs-lisp
  (string-match "^/home/delexi/Mail/"
                "/home/delexi/Mail/gmail/Inbox/cur/")
#+end_src

Thanks in advance,
-- 
 Alexander Baier



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

end of thread, other threads:[~2014-01-30  0:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 20:26 nnir notmuch backend and the string-match function Alexander Baier
2013-11-27 23:33 ` Alexander Baier
2013-12-26 16:23   ` Lars Ingebrigtsen
2013-12-28 12:35     ` Alexander Baier
2014-01-30  0:31       ` Lars Ingebrigtsen

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