From: Josh Huber <huber@alum.wpi.edu>
Subject: letting split rules have access to the message body...
Date: 10 May 2001 17:30:34 -0400 [thread overview]
Message-ID: <87pudg99j9.fsf@mclinux.com> (raw)
This was brought up a week or two ago, and people (Kai?) just said,
well...why don't you just do:
(save-restriction
(widen)
...
)
well, that didn't work for me, and I'm not quite sure how it would
work due to this little snippit of code in nnmail-article-group, which
does this:
;; Find headers.
(goto-char beg)
(setq end (if (search-forward "\n\n" nil t) (point) (point-max)))
(set-buffer nntp-server-buffer)
(erase-buffer)
;; Copy the headers into the work buffer.
(insert-buffer-substring obuf beg end)
thus, the original contents of the message are NOT accessible to the
split rules, even if you (widen). Unless that is, I'm missing
something, which I could be...this is my first gnus source hack, so
here it goes. I tested this on the re-spooling of *one* (1) message,
and disabled it, because I want to see if there could be any unwanted
side-effects, and how to fix them if there are problems:
Index: nnmail.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmail.el,v
retrieving revision 6.13
diff -u -r6.13 nnmail.el
--- nnmail.el 2001/04/29 12:36:09 6.13
+++ nnmail.el 2001/05/10 21:23:41
@@ -941,8 +941,9 @@
(setq end (if (search-forward "\n\n" nil t) (point) (point-max)))
(set-buffer nntp-server-buffer)
(erase-buffer)
- ;; Copy the headers into the work buffer.
- (insert-buffer-substring obuf beg end)
+ ;; Copy the whole buffer in, and narrow to the headers...
+ (insert-buffer obuf)
+ (narrow-to-region beg end)
;; Fold continuation lines.
(goto-char (point-min))
(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
This seems sane to me, but I'm looking for comments. I don't want my
mail to blow up due to this small change :)
Thanks,
--
Josh Huber
next reply other threads:[~2001-05-10 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-10 21:30 Josh Huber [this message]
2001-05-11 13:20 ` Josh Huber
2001-05-11 22:50 ` Kai Großjohann
2001-05-14 19:13 ` Josh Huber
2001-05-14 20:16 ` Kai Großjohann
2001-05-14 21:18 ` Josh Huber
2001-05-15 9:24 ` Kai Großjohann
2001-05-15 16:33 ` Josh Huber
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=87pudg99j9.fsf@mclinux.com \
--to=huber@alum.wpi.edu \
/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).