Gnus development mailing list
 help / color / mirror / Atom feed
From: Peter <jhrasko1@yahoo.com>
To: ding@gnus.org
Subject: Re: nnimap and searching articles by message-id
Date: Fri, 25 Sep 2009 23:41:06 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090926T013608-33@post.gmane.org> (raw)
In-Reply-To: <87ocoyivkt.fsf@lifelogs.com>

Here is what I am running with now.  It works fine for me, although I am not
sure what is the effect of the change in nnimap-retrieve-which-headers that
Reiner first proposed.

*** /scratch/ppovinec/emacs23/share/emacs/23.0.96/lisp/gnus/nnimap.el.orig	Sat
Jun 20 21:37:54 2009
--- /scratch/ppovinec/emacs23/share/emacs/23.0.96/lisp/gnus/nnimap.el	Fri Sep 25
16:28:31 2009
***************
*** 252,257 ****
--- 252,266 ----
    :type 'boolean
    :group 'nnimap)
  
+ (defcustom nnimap-search-mid-strip-angles t ;; nil
+   "Strip angles around Message-ID search.
+ 
+ Some non-compliant (???) IMAP servers require to strip the angles
+ around Message-ID when doing an UID SEARCH."
+   :version "23.2" ;; No Gnus 0.12
+   :group 'nnimap
+   :type '(choice boolean))
+ 
  (defvoo nnimap-need-unselect-to-notice-new-mail t
    "Unselect mailboxes before looking for new mail in them.
  Some servers seem to need this under some circumstances.")
***************
*** 654,660 ****
  			   articles)))))
        (mapcar (lambda (msgid)
  		(imap-search
! 		 (format "HEADER Message-Id \"%s\"" msgid)))
  	      articles))))
  
  (defun nnimap-group-overview-filename (group server)
--- 663,672 ----
  			   articles)))))
        (mapcar (lambda (msgid)
  		(imap-search
! 		 (format "HEADER Message-Id \"%s\""
! 			 (if nnimap-search-mid-strip-angles
! 			     (gnus-replace-in-string msgid "[<>]" "")
! 			   msgid))))
  	      articles))))
  
  (defun nnimap-group-overview-filename (group server)
***************
*** 950,956 ****
    (when (nnimap-possibly-change-group group server)
      (let ((article (if (stringp article)
  		       (car-safe (imap-search
! 				  (format "HEADER Message-Id \"%s\"" article)
  				  nnimap-server-buffer))
  		     article)))
        (when article
--- 962,971 ----
    (when (nnimap-possibly-change-group group server)
      (let ((article (if (stringp article)
  		       (car-safe (imap-search
!                                   (format "HEADER Message-Id \"%s\""
!                                           (if nnimap-search-mid-strip-angles
!                                               (gnus-replace-in-string article
"[<>]" "")
!                                             article))
  				  nnimap-server-buffer))
  		     article)))
        (when article










  reply	other threads:[~2009-09-25 23:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <loom.20090919T032021-30@post.gmane.org>
2009-09-19  9:12 ` Reiner Steib
2009-09-21 23:25   ` janko hrasko
2009-09-25 21:05     ` Ted Zlatanov
2009-09-25 23:41       ` Peter [this message]
2009-10-08 20:08         ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20090926T013608-33@post.gmane.org \
    --to=jhrasko1@yahoo.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).