From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53139 Path: main.gmane.org!not-for-mail From: Niklas Morberg Newsgroups: gmane.emacs.gnus.general Subject: [PATCH] Re: Fancy splitting getting headers from included text Date: Fri, 13 Jun 2003 11:50:53 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: <843cl5i4kg.fsf@lucy.is.informatik.uni-duisburg.de> <874r51jcsv.fsf@cag.lcs.mit.edu> <87znmsygfh.fsf@cag.lcs.mit.edu> <4n3ckjbqpg.fsf@lockgroove.bwh.harvard.edu> <87ptnntyt3.fsf@cag.lcs.mit.edu> <4nsmsja6gw.fsf@lockgroove.bwh.harvard.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1055497737 32366 80.91.224.249 (13 Jun 2003 09:48:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Jun 2003 09:48:57 +0000 (UTC) Original-X-From: ding-owner+M1683@lists.math.uh.edu Fri Jun 13 11:48:54 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19QlAi-0008P0-00 for ; Fri, 13 Jun 2003 11:48:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19QlD5-0003v7-00; Fri, 13 Jun 2003 04:51:03 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19QlCy-0003v1-00 for ding@lists.math.uh.edu; Fri, 13 Jun 2003 04:50:56 -0500 Original-Received: (qmail 57506 invoked by alias); 13 Jun 2003 09:50:55 -0000 Original-Received: (qmail 57501 invoked from network); 13 Jun 2003 09:50:55 -0000 Original-Received: from krynn.se.axis.com (193.13.178.10) by sclp3.sclp.com with SMTP; 13 Jun 2003 09:50:55 -0000 Original-Received: from PCNIKLAS (dh10-13-8-248.se.axis.com [10.13.8.248]) by krynn.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id h5D9orD7029726 for ; Fri, 13 Jun 2003 11:50:53 +0200 Original-To: ding@gnus.org In-Reply-To: (Niklas Morberg's message of "Fri, 13 Jun 2003 11:35:09 +0200") X-Now-Playing: Kiss - Two Sides Of the Coin Mail-Followup-To: ding@gnus.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (windows-nt) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53139 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53139 --=-=-= Niklas Morberg writes: > Niklas Morberg writes: > >> I'm stumped. The regexp in i-d-n-t-h looks fine. If I go to >> the *nntpd* buffer and manually do `M-x re-search-forward >> [RET] ^\r?$' it will move point to the end of headers. Yet >> the function i-d-n-t-h fails to narrow the buffer to >> headers. > > And if I go an article buffer in gnus and do `M-: > (ietf-drums-narrow-to-header) [RET]' the buffer is properly > narrowed. But it does not work with the *nntpd* buffer... Clarification: if I manually go to the *nntpd* buffer and do `M-: (ietf-drums-narrow-to-header) [RET]' it will get narrowed properly. But it doesn't work when called from nnimap-split-articles. Could it be that nnimap-split-articles is using the wrong buffer? Hm. It seems that it is. The following patch makes splitting work as expected (not taking body text into account). --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Description: Narrow proper buffer. cd c:/cygwin/usr/share/site-lisp/ diff -u -b "c:/cygwin/usr/share/site-lisp/nnimap.el~" "c:/cygwin/usr/share/site-lisp/nnimap.el" --- c:/cygwin/usr/share/site-lisp/nnimap.el~ 2003-06-05 09:53:38.000000000 +0200 +++ c:/cygwin/usr/share/site-lisp/nnimap.el 2003-06-13 11:44:28.000000000 +0200 @@ -1271,7 +1271,7 @@ nnimap-split-download-body-default nnimap-split-download-body) (and (nnimap-request-article article) - (mail-narrow-to-head)) + (with-current-buffer nntp-server-buffer (mail-narrow-to-head))) (nnimap-request-head article)) ;; copy article to right group(s) (setq removeorig nil) Diff finished at Fri Jun 13 11:48:11 --=-=-= I have nnimap as my primary select method, maybe the above patch will break stuff for people who have it as their secondary select method? All I know is that with this patch splitting works for me. Niklas --=-=-=--