* patch: create nonexistent groups in nnmaildir-save-mail
@ 2001-12-25 23:59 Paul Jarc
2001-12-26 0:52 ` Harry Putnam
2001-12-26 1:31 ` Harry Putnam
0 siblings, 2 replies; 8+ messages in thread
From: Paul Jarc @ 2001-12-25 23:59 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
Oops. I had thought nnmail took care of this.
* nnmaildir.el (nnmaildir-save-mail): create the destination
groups if they do not exist.
paul
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmaildir.patch --]
[-- Type: text/x-patch, Size: 2743 bytes --]
Index: lisp/nnmaildir.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmaildir.el,v
retrieving revision 6.3
diff -u -r6.3 nnmaildir.el
--- lisp/nnmaildir.el 2001/12/21 23:13:00 6.3
+++ lisp/nnmaildir.el 2001/12/26 00:11:36
@@ -37,7 +37,7 @@
;; * We make it easy to manipulate marks, etc., from outside Gnus.
;; * All information about a group is stored in the maildir, for easy
;; backup and restoring.
-;; * Use the filesystem as a database.
+;; * We use the filesystem as a database.
;;
;; Todo:
;; * Ignore old NOV data when gnus-extra-headers has changed.
@@ -1383,18 +1383,23 @@
(catch 'return
(if group-art nil
(throw 'return nil))
- (let ((group-art group-art)
- x nnmaildir--file deactivate-mark)
+ (let ((ret group-art)
+ ga gname x groups nnmaildir--file deactivate-mark)
(save-excursion
(goto-char (point-min))
(save-match-data
(while (looking-at "From ")
(replace-match "X-From-Line: ")
(forward-line 1))))
- (setq x (caar group-art) group-art (cdr group-art))
- (if (nnmaildir-request-accept-article x) nil
- (throw 'return nil)) ; not that nnmail bothers to check
- (setq x (nnmaildir--prepare nil x)
+ (setq groups (nnmaildir--srv-get-groups nnmaildir--cur-server)
+ ga (car group-art) group-art (cdr group-art)
+ gname (car ga))
+ (or (intern-soft gname groups)
+ (nnmaildir-request-create-group gname)
+ (throw 'return nil)) ;; not that nnmail bothers to check :(
+ (if (nnmaildir-request-accept-article gname) nil
+ (throw 'return nil))
+ (setq x (nnmaildir--prepare nil gname)
nnmaildir--file (nnmaildir--srv-get-dir nnmaildir--cur-server)
nnmaildir--file (concat nnmaildir--file
(nnmaildir--grp-get-name x))
@@ -1406,10 +1411,13 @@
(nnmaildir--art-get-prefix x)
(nnmaildir--art-get-suffix x)))
(while group-art
- (setq x (caar group-art) group-art (cdr group-art))
- (if (nnmaildir-request-accept-article x) nil
- (throw 'return nil))))
- group-art))
+ (setq ga (car group-art) group-art (cdr group-art)
+ gname (car ga))
+ (if (and (or (intern-soft gname groups)
+ (nnmaildir-request-create-group gname))
+ (nnmaildir-request-accept-article gname)) nil
+ (setq ret (delq ga ret)))) ;; We'll still try the other groups
+ ret)))
(defun nnmaildir-active-number (group)
(let ((x (nnmaildir--prepare nil group)))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-25 23:59 patch: create nonexistent groups in nnmaildir-save-mail Paul Jarc
@ 2001-12-26 0:52 ` Harry Putnam
2001-12-26 16:37 ` Paul Jarc
2001-12-26 1:31 ` Harry Putnam
1 sibling, 1 reply; 8+ messages in thread
From: Harry Putnam @ 2001-12-26 0:52 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
> Oops. I had thought nnmail took care of this.
> * nnmaildir.el (nnmaildir-save-mail): create the destination
> groups if they do not exist.
>
>
> paul
Running patch direct from you message (defined region) with:
M-| patch /usr/local/share/emacs/site-lisp/nnmaildir.el
Fails in part. Appears to be just documentation:
patching file `/export/home/reader/site-lisp/nnmaildir.el'
Hunk #1 FAILED at 37.
Hunk #2 succeeded at 1339 (offset -44 lines).
1 out of 3 hunks FAILED -- saving rejects to /export/home/reader/site-lisp/nnmaildir.el.rej
The *.rej looks like:
***************
*** 37,43 ****
;; * We make it easy to manipulate marks, etc., from outside Gnus.
;; * All information about a group is stored in the maildir, for easy
;; backup and restoring.
- ;; * Use the filesystem as a database.
;;
;; Todo:
;; * Ignore old NOV data when gnus-extra-headers has changed.
--- 37,43 ----
;; * We make it easy to manipulate marks, etc., from outside Gnus.
;; * All information about a group is stored in the maildir, for easy
;; backup and restoring.
+ ;; * We use the filesystem as a database.
;;
;; Todo:
;; * Ignore old NOV data when gnus-extra-headers has changed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-25 23:59 patch: create nonexistent groups in nnmaildir-save-mail Paul Jarc
2001-12-26 0:52 ` Harry Putnam
@ 2001-12-26 1:31 ` Harry Putnam
2001-12-26 16:53 ` Paul Jarc
1 sibling, 1 reply; 8+ messages in thread
From: Harry Putnam @ 2001-12-26 1:31 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
> Oops. I had thought nnmail took care of this.
> * nnmaildir.el (nnmaildir-save-mail): create the destination
> groups if they do not exist.
>
An addendum to the patch partial failure is that a new group still is
not generated by the nnmail-split
Messages buffer indicates that gnus sees them:
[...]
Reading active file from enews.newsguy.com via nntp...
Reading active file via nnmaildir...
nnmaildir: Reading incoming mail from file...
nnmaildir: Reading incoming mail (3 new)...done
Reading active file from archive via nnfolder...done
Checking new news...
[...]
My split:
(setq nnmail-split-methods
'(("tests" "^Subject: IXNEY")
("misc" "")))
Three messages with subject IXNEY don't end up in `tests'. Nor do
they go to `misc'. They disappear except for Inc*.
nnmaildir-version's value is "2001.12.19"
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-26 0:52 ` Harry Putnam
@ 2001-12-26 16:37 ` Paul Jarc
2001-12-26 16:57 ` ShengHuo ZHU
0 siblings, 1 reply; 8+ messages in thread
From: Paul Jarc @ 2001-12-26 16:37 UTC (permalink / raw)
Harry Putnam <reader@newsguy.com> wrote:
> Running patch direct from you message (defined region) with:
> M-| patch /usr/local/share/emacs/site-lisp/nnmaildir.el
>
> Fails in part. Appears to be just documentation:
You've got a copy from my website. The copy in CVS is slightly
different. You can get rid of the separate copy and just use a new
CVS checkout. The patch should then apply cleanly, assuming it isn't
already in CVS by the time you read this.
paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-26 1:31 ` Harry Putnam
@ 2001-12-26 16:53 ` Paul Jarc
2001-12-26 17:37 ` Harry Putnam
0 siblings, 1 reply; 8+ messages in thread
From: Paul Jarc @ 2001-12-26 16:53 UTC (permalink / raw)
Harry Putnam <reader@newsguy.com> wrote:
> An addendum to the patch partial failure is that a new group still is
> not generated by the nnmail-split
Are you sure you're running the patched version and not a
byte-compiled unpatched version?
paul
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-26 16:37 ` Paul Jarc
@ 2001-12-26 16:57 ` ShengHuo ZHU
0 siblings, 0 replies; 8+ messages in thread
From: ShengHuo ZHU @ 2001-12-26 16:57 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
[...]
> CVS checkout. The patch should then apply cleanly, assuming it isn't
> already in CVS by the time you read this.
It is now.
ShengHuo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-26 16:53 ` Paul Jarc
@ 2001-12-26 17:37 ` Harry Putnam
2001-12-26 19:20 ` Harry Putnam
0 siblings, 1 reply; 8+ messages in thread
From: Harry Putnam @ 2001-12-26 17:37 UTC (permalink / raw)
prj@po.cwru.edu (Paul Jarc) writes:
> Harry Putnam <reader@newsguy.com> wrote:
>> An addendum to the patch partial failure is that a new group still is
>> not generated by the nnmail-split
>
> Are you sure you're running the patched version and not a
> byte-compiled unpatched version?
Yes, but I haven't updated by CVS yet. I only have one nnmaildir.el,
no elc .. I never byte compiled it yet.
But probably not worth while piddling with this version. I'll make a
report after cvs'ing. Looks like ShengHuo is back in `dynamo' mode.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: patch: create nonexistent groups in nnmaildir-save-mail
2001-12-26 17:37 ` Harry Putnam
@ 2001-12-26 19:20 ` Harry Putnam
0 siblings, 0 replies; 8+ messages in thread
From: Harry Putnam @ 2001-12-26 19:20 UTC (permalink / raw)
Harry Putnam <reader@newsguy.com> writes:
> But probably not worth while piddling with this version. I'll make a
> report after cvs'ing. Looks like ShengHuo is back in `dynamo' mode.
Todays cvs nnmaildir.el works for creating new groups. Good work Paul!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-12-26 19:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-25 23:59 patch: create nonexistent groups in nnmaildir-save-mail Paul Jarc
2001-12-26 0:52 ` Harry Putnam
2001-12-26 16:37 ` Paul Jarc
2001-12-26 16:57 ` ShengHuo ZHU
2001-12-26 1:31 ` Harry Putnam
2001-12-26 16:53 ` Paul Jarc
2001-12-26 17:37 ` Harry Putnam
2001-12-26 19:20 ` Harry Putnam
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).