Gnus development mailing list
 help / color / mirror / Atom feed
* patch: nnmaildir expiry improvements
@ 2002-01-02 22:44 Paul Jarc
  2002-01-03 17:18 ` Paul Jarc
  2002-01-03 18:14 ` Paul Jarc
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Jarc @ 2002-01-02 22:44 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

Hey Lars, can I get CVS write access now?  My paperwork's done.
	* nnmaildir.el (nnmaildir-request-expire-articles): evaluate
	the expire-group parameter once per article rather than once
	per group; bind `nnmaildir-article-file-name' and `article'
	for convenience.  Leave article alone when expire-group
	specifies the current group.
	(nnmaildir--update-nov): be more concurrency-friendly with
	temp file names.


paul

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmaildir-expire.patch --]
[-- Type: text/x-patch, Size: 4307 bytes --]

Index: lisp/nnmaildir.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmaildir.el,v
retrieving revision 6.5
diff -u -r6.5 nnmaildir.el
--- lisp/nnmaildir.el	2002/01/02 04:08:32	6.5
+++ lisp/nnmaildir.el	2002/01/02 22:32:20
@@ -422,7 +422,7 @@
         (nnmaildir--nov-set-mtime nov mtime)
         (nnmaildir--nov-set-neh nov (copy-sequence nnmail-extra-headers))
         (prin1 (list msgid nov) (current-buffer))
-        (setq file (concat novdir ":"))
+        (setq file (concat novfile ":"))
         (nnmaildir--unlink file)
         (write-region (point-min) (point-max) file nil 'no-message))
       (rename-file file novfile 'replace)
@@ -1460,7 +1460,8 @@
   (let ((no-force (not force))
         (group (nnmaildir--prepare server gname))
         pgname time boundary time-iter bound-iter high low target dir nlist
-        stop num article didnt suffix nnmaildir--file deactivate-mark)
+        stop number article didnt suffix nnmaildir--file
+        nnmaildir-article-file-name deactivate-mark)
     (catch 'return
       (if group nil
         (nnmaildir--srv-set-error nnmaildir--cur-server
@@ -1482,11 +1483,7 @@
                 high (1- high)))
       (setcar (cdr boundary) low)
       (setcar boundary high)
-      (setq target (nnmaildir--param pgname 'expire-group)
-            target (and (stringp target)
-                        (not (string-equal target pgname))
-                        target)
-            dir (nnmaildir--srv-get-dir nnmaildir--cur-server)
+      (setq dir (nnmaildir--srv-get-dir nnmaildir--cur-server)
             dir (nnmaildir--srv-grp-dir dir gname)
             dir (nnmaildir--cur dir)
             nlist (nnmaildir--grp-get-lists group)
@@ -1495,17 +1492,17 @@
       (save-excursion
         (set-buffer (get-buffer-create " *nnmaildir move*"))
         (while ranges
-          (setq num (car ranges) ranges (cdr ranges))
-          (while (eq num (car ranges))
+          (setq number (car ranges) ranges (cdr ranges))
+          (while (eq number (car ranges))
             (setq ranges (cdr ranges)))
-          (if (numberp num) (setq stop num)
-            (setq stop (car num) num (cdr num)))
-          (setq nlist (nthcdr (- (nnmaildir--art-get-num (car nlist)) num)
+          (if (numberp number) (setq stop number)
+            (setq stop (car number) number (cdr number)))
+          (setq nlist (nthcdr (- (nnmaildir--art-get-num (car nlist)) number)
                               nlist))
           (while (and nlist
                       (setq article (car nlist)
-                            num (nnmaildir--art-get-num article))
-                      (>= num stop))
+                            number (nnmaildir--art-get-num article))
+                      (>= number stop))
             (setq nlist (cdr nlist)
                   suffix (nnmaildir--art-get-suffix article))
             (catch 'continue
@@ -1531,14 +1528,20 @@
                                  time-iter (cdr time-iter)))
                          (and bound-iter time-iter
                               (car-less-than-car bound-iter time-iter))))
-                  (setq didnt (cons (nnmaildir--art-get-num article) didnt))
-                (when target
+                  (setq didnt (cons number didnt))
+                (save-excursion
+                  (setq nnmaildir-article-file-name nnmaildir--file
+                        target (nnmaildir--param pgname 'expire-group)))
+                (when (and (stringp target)
+                           (not (string-equal target pgname))) ;; Move it.
                   (erase-buffer)
                   (nnheader-insert-file-contents nnmaildir--file)
                   (gnus-request-accept-article target nil nil 'no-encode))
-                (nnmaildir--unlink nnmaildir--file)
-                (nnmaildir--art-set-suffix article 'expire)
-                (nnmaildir--art-set-nov article nil)))))
+                (if (equal target pgname)
+                    (setq didnt (cons number didnt)) ;; Leave it here.
+                  (nnmaildir--unlink nnmaildir--file)
+                  (nnmaildir--art-set-suffix article 'expire)
+                  (nnmaildir--art-set-nov article nil))))))
         (erase-buffer))
       didnt)))
 

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

* Re: patch: nnmaildir expiry improvements
  2002-01-02 22:44 patch: nnmaildir expiry improvements Paul Jarc
@ 2002-01-03 17:18 ` Paul Jarc
  2002-01-03 17:31   ` Lars Magne Ingebrigtsen
  2002-01-03 20:44   ` Steve Youngs
  2002-01-03 18:14 ` Paul Jarc
  1 sibling, 2 replies; 6+ messages in thread
From: Paul Jarc @ 2002-01-03 17:18 UTC (permalink / raw)


I wrote:
> Hey Lars, can I get CVS write access now?  My paperwork's done.
> 	* nnmaildir.el (nnmaildir-request-expire-articles): evaluate
> 	the expire-group parameter once per article rather than once
> 	per group; bind `nnmaildir-article-file-name' and `article'
> 	for convenience.  Leave article alone when expire-group
> 	specifies the current group.
> 	(nnmaildir--update-nov): be more concurrency-friendly with
> 	temp file names.

Ok, I have write access now.  So when I do "cvs commit lisp/nnmaildir.el",
I get a buffer to edit.  Is this where I add my ChangeLog entry (along
with a timestamp line)?


paul



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

* Re: patch: nnmaildir expiry improvements
  2002-01-03 17:18 ` Paul Jarc
@ 2002-01-03 17:31   ` Lars Magne Ingebrigtsen
  2002-01-03 20:44   ` Steve Youngs
  1 sibling, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-03 17:31 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Ok, I have write access now.  So when I do "cvs commit lisp/nnmaildir.el",
> I get a buffer to edit.  Is this where I add my ChangeLog entry (along
> with a timestamp line)?

The ChangeLog entry should be added to the ChangeLog, and you should
also include the same in the cvs-log buffer.  You may choose to remove
the first line and the indentation.

ChangeLog:

2002-01-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* gnus.texi (Article Keymap): Addition.
	(Summary Mail Commands): Fix.

cvs-log entry:        
        
* gnus.texi (Article Keymap): Addition.
(Summary Mail Commands): Fix.



-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: patch: nnmaildir expiry improvements
  2002-01-02 22:44 patch: nnmaildir expiry improvements Paul Jarc
  2002-01-03 17:18 ` Paul Jarc
@ 2002-01-03 18:14 ` Paul Jarc
  2002-01-03 18:33   ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 6+ messages in thread
From: Paul Jarc @ 2002-01-03 18:14 UTC (permalink / raw)


I wrote:
> Hey Lars, can I get CVS write access now?  My paperwork's done.
> 	* nnmaildir.el (nnmaildir-request-expire-articles): evaluate
> 	the expire-group parameter once per article rather than once
> 	per group; bind `nnmaildir-article-file-name' and `article'
> 	for convenience.  Leave article alone when expire-group
> 	specifies the current group.
> 	(nnmaildir--update-nov): be more concurrency-friendly with
> 	temp file names.

After a bit of fumbling with "cvs commit", I've now committed this
patch.  Can someone back out my accidental change to the top-level
Changelog (or show me how)?


paul



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

* Re: patch: nnmaildir expiry improvements
  2002-01-03 18:14 ` Paul Jarc
@ 2002-01-03 18:33   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 2002-01-03 18:33 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> After a bit of fumbling with "cvs commit", I've now committed this
> patch.  Can someone back out my accidental change to the top-level
> Changelog (or show me how)?

Just remove the text from the ChangeLog and then check it in again. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



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

* Re: patch: nnmaildir expiry improvements
  2002-01-03 17:18 ` Paul Jarc
  2002-01-03 17:31   ` Lars Magne Ingebrigtsen
@ 2002-01-03 20:44   ` Steve Youngs
  1 sibling, 0 replies; 6+ messages in thread
From: Steve Youngs @ 2002-01-03 20:44 UTC (permalink / raw)


|--==> "PJ" == Paul Jarc <prj@po.cwru.edu> writes:

  PJ> Ok, I have write access now.  So when I do "cvs commit lisp/nnmaildir.el",
  PJ> I get a buffer to edit.  Is this where I add my ChangeLog entry (along
  PJ> with a timestamp line)?

I'd suggest that it you're not familiar with CVS you set up a "test"
project on your local system.  That way you'll be able to see what
happens from both the client and server side of CVS.

Once you get to know the basic CVS commands have a look at the elisp
package, "PCL-CVS".  It makes CVS'ing from within (X)Emacs so much
easier.  It's what I use for all the projects that I have commit
privileges for (I think Lars uses it too).

Further reading:

        M-x manual-entry RET cvs RET
        M-x manual-entry RET cvs(5) RET
        M-x manual-entry RET co RET
        M-x manual-entry RET ci RET
        M-x manual-entry RET rcs RET
        C-h C-i cvs RET
        C-h C-i pcl-cvs RET

Have fun with it!  And don't worry, there's not too much that you can
break that can't be easily fixed. :-P


-- 
|---<Steve Youngs>---------------<GnuPG KeyID: 10D5C9C5>---|
|            XEmacs - It's not just an editor.             |
|                    It's a way of life.                   |
|------------------------------------<youngs@xemacs.org>---|



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

end of thread, other threads:[~2002-01-03 20:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 22:44 patch: nnmaildir expiry improvements Paul Jarc
2002-01-03 17:18 ` Paul Jarc
2002-01-03 17:31   ` Lars Magne Ingebrigtsen
2002-01-03 20:44   ` Steve Youngs
2002-01-03 18:14 ` Paul Jarc
2002-01-03 18:33   ` Lars Magne 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).