From: yamaoka Date: Tue, 18 Mar 2003 23:29:51 +0000 (+0000) Subject: Synch to Oort Gnus 200303181900. X-Git-Tag: t-gnus-6_15_18-00-quimby~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9e79419347d5026238de1a217ac8cfc774885212;p=elisp%2Fgnus.git- Synch to Oort Gnus 200303181900. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e567724..dc75e3c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2003-03-18 Paul Jarc + + * nnmaildir.el (nnmaildir-open-server, + nnmaildir-request-scan, + nnmaildir-request-create-group, + nnmaildir-request-delete-group): Replace create-directory with + target-prefix. + +2003-03-18 Jesper Harder + + * mm-bodies.el (mm-decode-coding-region-safely): Don't use + find-charset-region which is slooow in XEmacs. + 2003-03-18 Katsumi Yamaoka * gnus-sum.el (gnus-summary-highlight-line-0): Silence the byte- @@ -33,7 +46,7 @@ * lpath.el (featurep): Bind mm-w3m-mode-map. -2003-03-12 Paul Jarc +2003-03-17 Paul Jarc * nnmail.el (nnmail-cache-primary-mail-backend): Not all 'respool-able backends define a global nnchoke-get-new-mail diff --git a/lisp/mm-bodies.el b/lisp/mm-bodies.el index b28c50c..e4c7894 100644 --- a/lisp/mm-bodies.el +++ b/lisp/mm-bodies.el @@ -282,14 +282,17 @@ use the supplied charset unconditionally." "Decode region between START and END with CODING-SYSTEM. If CODING-SYSTEM is not a valid coding system for the text, let Emacs decide which coding system to use." - (let* ((decoded (mm-decode-coding-string (buffer-substring start end) - coding-system)) - (charsets (find-charset-string decoded))) - (if (or (memq 'eight-bit-control charsets) - (memq 'eight-bit-graphic charsets)) - (mm-decode-coding-region start end 'undecided) - (delete-region start end) - (insert decoded)))) + (let* ((orig (buffer-substring start end)) + charsets) + (save-restriction + (narrow-to-region start end) + (mm-decode-coding-region (point-min) (point-max) coding-system) + (setq charsets (find-charset-region (point-min) (point-max))) + (when (or (memq 'eight-bit-control charsets) + (memq 'eight-bit-graphic charsets)) + (delete-region (point-min) (point-max)) + (insert orig) + (mm-decode-coding-region (point-min) (point-max) 'undecided))))) (defun mm-decode-string (string charset) "Decode STRING with CHARSET." diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index e74bc81..e49b77a 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -41,8 +41,6 @@ ;; copying, restoring, etc. ;; ;; Todo: -;; * Replace create-directory with target-prefix, so the maildirs can be in -;; the same directory as the symlinks, starting with, e.g., ".". ;; * Add a hook for when moving messages from new/ to cur/, to support ;; nnmail's duplicate detection. ;; * Allow each mark directory in a group to have its own inode for mark @@ -138,17 +136,17 @@ by nnmaildir-request-article.") ; ("Mark Mod Time Hash") (defstruct nnmaildir--srv - (address nil :type string) ;; server address string - (method nil :type list) ;; (nnmaildir "address" ...) - (prefix nil :type string) ;; "nnmaildir+address:" - (dir nil :type string) ;; "/expanded/path/to/server/dir/" - (ls nil :type function) ;; directory-files function - (groups nil :type vector) ;; obarray mapping group names->groups - (curgrp nil :type nnmaildir--grp) ;; current group, or nil - (error nil :type string) ;; last error message, or nil - (mtime nil :type list) ;; modtime of dir - (gnm nil) ;; flag: split from mail-sources? - (create-dir nil :type string)) ;; group creation directory + (address nil :type string) ;; server address string + (method nil :type list) ;; (nnmaildir "address" ...) + (prefix nil :type string) ;; "nnmaildir+address:" + (dir nil :type string) ;; "/expanded/path/to/server/dir/" + (ls nil :type function) ;; directory-files function + (groups nil :type vector) ;; obarray mapping group name->group + (curgrp nil :type nnmaildir--grp) ;; current group, or nil + (error nil :type string) ;; last error message, or nil + (mtime nil :type list) ;; modtime of dir + (gnm nil) ;; flag: split from mail-sources? + (target-prefix nil :type string)) ;; symlink target prefix (defun nnmaildir--expired-article (group article) (setf (nnmaildir--art-nov article) nil) @@ -242,8 +240,9 @@ by nnmaildir-request-article.") (or (file-exists-p (file-name-as-directory dir)) (make-directory-internal (directory-file-name dir)))) (defun nnmaildir--delete-dir-files (dir ls) - (mapcar 'delete-file (funcall ls dir 'full "\\`[^.]" 'nosort)) - (delete-directory dir)) + (when (file-attributes dir) + (mapcar 'delete-file (funcall ls dir 'full "\\`[^.]" 'nosort)) + (delete-directory dir))) (defun nnmaildir--group-maxnum (server group) (if (zerop (nnmaildir--grp-count group)) 0 @@ -606,11 +605,20 @@ by nnmaildir-request-article.") (car x) (setf (nnmaildir--srv-gnm server) t) (require 'nnmail)) - (setq x (assq 'create-directory defs)) - (when x - (setq x (cadr x) - x (eval x)) - (setf (nnmaildir--srv-create-dir server) x)) + (setq x (assq 'target-prefix defs)) + (if x + (progn + (setq x (cadr x) + x (eval x)) + (setf (nnmaildir--srv-target-prefix server) x)) + (setq x (assq 'create-directory defs)) + (if x + (progn + (setq x (cadr x) + x (eval x) + x (file-name-as-directory x)) + (setf (nnmaildir--srv-target-prefix server) x)) + (setf (nnmaildir--srv-target-prefix server) ""))) (setf (nnmaildir--srv-groups server) (make-vector size 0)) (setq nnmaildir--cur-server server) t))) @@ -760,12 +768,14 @@ by nnmaildir-request-article.") (nnmaildir-get-new-mail t) (nnmaildir-group-alist nil) (nnmaildir-active-file nil) - x srv-ls srv-dir method groups group dirs grp-dir seen deactivate-mark) + x srv-ls srv-dir method groups target-prefix group dirs grp-dir seen + deactivate-mark) (nnmaildir--prepare server nil) (setq srv-ls (nnmaildir--srv-ls nnmaildir--cur-server) srv-dir (nnmaildir--srv-dir nnmaildir--cur-server) method (nnmaildir--srv-method nnmaildir--cur-server) - groups (nnmaildir--srv-groups nnmaildir--cur-server)) + groups (nnmaildir--srv-groups nnmaildir--cur-server) + target-prefix (nnmaildir--srv-target-prefix nnmaildir--cur-server)) (nnmaildir--with-work-buffer (save-match-data (if (stringp scan-group) @@ -782,6 +792,13 @@ by nnmaildir-request-article.") method srv-dir srv-ls)) groups)) (setq dirs (funcall srv-ls srv-dir nil "\\`[^.]" 'nosort) + dirs (if (zerop (length target-prefix)) + dirs + (remove-if (lambda (dir) + (and (>= (length dir) (length target-prefix)) + (string= (substring dir 0 (length target-prefix)) + target-prefix))) + dirs)) seen (nnmaildir--up2-1 (length dirs)) seen (make-vector seen 0)) (mapcar @@ -942,7 +959,7 @@ by nnmaildir-request-article.") (defun nnmaildir-request-create-group (gname &optional server args) (nnmaildir--prepare server nil) (catch 'return - (let ((create-dir (nnmaildir--srv-create-dir nnmaildir--cur-server)) + (let ((target-prefix (nnmaildir--srv-target-prefix nnmaildir--cur-server)) srv-dir dir groups) (when (zerop (length gname)) (setf (nnmaildir--srv-error nnmaildir--cur-server) @@ -963,18 +980,19 @@ by nnmaildir-request-article.") (concat "Group already exists: " gname)) (throw 'return nil)) (setq srv-dir (nnmaildir--srv-dir nnmaildir--cur-server)) - (if (file-name-absolute-p create-dir) - (setq dir (expand-file-name create-dir)) + (if (file-name-absolute-p target-prefix) + (setq dir (expand-file-name target-prefix)) (setq dir srv-dir dir (file-truename dir) - dir (concat dir create-dir))) - (setq dir (nnmaildir--subdir (file-name-as-directory dir) gname)) + dir (concat dir target-prefix))) + (setq dir (nnmaildir--subdir dir gname)) (nnmaildir--mkdir dir) (nnmaildir--mkdir (nnmaildir--tmp dir)) (nnmaildir--mkdir (nnmaildir--new dir)) (nnmaildir--mkdir (nnmaildir--cur dir)) - (setq create-dir (file-name-as-directory create-dir)) - (make-symbolic-link (concat create-dir gname) (concat srv-dir gname)) + (unless (string= target-prefix "") + (make-symbolic-link (concat target-prefix gname) + (concat srv-dir gname))) (nnmaildir-request-scan 'find-new-groups)))) (defun nnmaildir-request-rename-group (gname new-name &optional server) @@ -1032,20 +1050,28 @@ by nnmaildir-request-article.") (defun nnmaildir-request-delete-group (gname force &optional server) (let ((group (nnmaildir--prepare server gname)) - pgname grp-dir dir ls deactivate-mark) + pgname grp-dir target dir ls deactivate-mark) (catch 'return (unless group (setf (nnmaildir--srv-error nnmaildir--cur-server) (concat "No such group: " gname)) (throw 'return nil)) + (setq gname (nnmaildir--grp-name group) + pgname (nnmaildir--pgname nnmaildir--cur-server gname) + grp-dir (nnmaildir--srv-dir nnmaildir--cur-server) + target (car (file-attributes (concat grp-dir gname))) + grp-dir (nnmaildir--srvgrp-dir grp-dir gname)) + (unless (or force (stringp target)) + (setf (nnmaildir--srv-error nnmaildir--cur-server) + (concat "Not a symlink: " gname)) + (throw 'return nil)) (if (eq group (nnmaildir--srv-curgrp nnmaildir--cur-server)) (setf (nnmaildir--srv-curgrp nnmaildir--cur-server) nil)) - (setq gname (nnmaildir--grp-name group) - pgname (nnmaildir--pgname nnmaildir--cur-server gname)) (unintern gname (nnmaildir--srv-groups nnmaildir--cur-server)) - (setq grp-dir (nnmaildir--srv-dir nnmaildir--cur-server) - grp-dir (nnmaildir--srvgrp-dir grp-dir gname)) - (if (not force) (setq grp-dir (directory-file-name grp-dir)) + (if (not force) + (progn + (setq grp-dir (directory-file-name grp-dir)) + (nnmaildir--unlink grp-dir)) (setq ls (nnmaildir--group-ls nnmaildir--cur-server pgname)) (if (nnmaildir--param pgname 'read-only) (progn (delete-directory (nnmaildir--tmp grp-dir)) @@ -1064,14 +1090,16 @@ by nnmaildir-request-article.") (nnmaildir--unlink (concat dir "markfile{new}")) (delete-directory (nnmaildir--marks-dir dir)) (delete-directory dir) - (setq grp-dir (directory-file-name grp-dir) - dir (car (file-attributes grp-dir))) - (unless (eq (aref "/" 0) (aref dir 0)) - (setq dir (concat (file-truename - (nnmaildir--srv-dir nnmaildir--cur-server)) - dir))) - (delete-directory dir)) - (nnmaildir--unlink grp-dir) + (if (not (stringp target)) + (delete-directory grp-dir) + (setq grp-dir (directory-file-name grp-dir) + dir target) + (unless (eq (aref "/" 0) (aref dir 0)) + (setq dir (concat (file-truename + (nnmaildir--srv-dir nnmaildir--cur-server)) + dir))) + (delete-directory dir) + (nnmaildir--unlink grp-dir))) t))) (defun nnmaildir-retrieve-headers (articles &optional gname server fetch-old) diff --git a/texi/ChangeLog b/texi/ChangeLog index 71c646d..d32c283 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,4 +1,14 @@ -2003-03-09 Paul Jarc +2003-03-18 Paul Jarc + + * gnus.texi (Maildir): Replace create-directory with + target-prefix. + +2003-03-18 Paul Jarc + + * gnus.texi (Maildir): More info for expire-group; add + distrust-Lines:. + +2003-03-17 Paul Jarc * gnus.texi (Comparing Mail Back Ends): nnmaildir fixes. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 3aa01ae..6146952 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -13873,41 +13873,51 @@ nnmaildir $B$O5-;v$N0u$H(B NOV $B%G!<%?$r$=$l$>$l$N(B maildir $B$K3JG<$7$^$ @table @code @item directory $B$=$l$>$l$N(B nnmaildir $B%5!<%P!<(B ($B0l$D$r1[$($k%5!<%P!<$,I,MW$@$H$O$H$F$b;W(B -$B$($^$;$s$,(B) $B$KBP$7$F!"%G%#%l%/%H%j$r:n$C$F(B maildir $B$X$N%7%s%\%j%C%/%j%s(B -$B%/$rD%$kI,MW$,$"$j$^$9(B ($BB>$NL\E*$N$?$a$K$9$G$K;H$o$l$F$$$k%G%#%l%/%H%j$r(B -$BA*$s$G$O$$$1$^$;$s(B)$B!#%5!<%P!<$N%G%#%l%/%H%j$KD>@\(B ($B%7%s%\%j%C%/%j%s%/$N(B -$BBe$o$j$K(B) nnmaildir $B$rCV$/$3$H$b$G$-$k$N$G$9$,!"$=$l(B -$B$O(B @code{nnmaildir-request-delete-group} $B$rGKC>$5$;!"(BGnus $B$G$=$l$i$N%0%k!<(B -$B%W$r>C$9$3$H$,$G$-$J$/$J$C$F$7$^$$$^$9(B ($B$=$l$i$r(B shell $B$+$i(B @code{rm -r -foo} $B$G>C$9$3$H$O$G$-$^$9(B)$B!#$=$l$>$l$N(B maildir $B$O!"$=$N%5!<%P!<$N%K%e!<(B -$B%9%0%k!<%W$H$7$F(B Gnus $B$K8=$l!"%7%s%\%j%C%/%j%s%/$N%U%!%$%kL>$,$=$N%0%k!<(B -$B%W$NL>A0$K$J$j$^$9!#%G%#%l%/%H%j$K$"$k(B `.' $B$G;O$^$k$I$s$J%U%!%$%kL>$bL5(B -$B;k$5$l$^$9!#%G%#%l%/%H%j$O:G=i$K(B Gnus $B$r5/F0$7$?$H$-$H%0%k!<%W%P%C%U%!(B -$B$G(B @kbd{g} $B$r%?%$%W$7$?$H$-$O$$$D$G$bAv::$5$l!"$I$l$+$N(B maildir $B$,:o=|$^(B -$B$?$ODI2C$5$l$?$H$-$KDLCN$7$^$9!#(B +$B$($^$;$s$,(B) $B$KBP$7$F%G%#%l%/%H%j$r:n$j!"$=$l$r(B maildir $B$^$?$O(B maildir $B$X(B +$B$N%7%s%\%j%C%/%j%s%/$H$7$F$NL\E*$N$?$a$K$9$G$K(B +$B;H$o$l$F$$$k%G%#%l%/%H%j$rA*$s$G$O$$$1$^$;$s(B)$B!#$=$l$>$l$N(B maildir $B$O!"$=(B +$B$N%5!<%P!<$N%K%e!<%9%0%k!<%W$H$7$F(B Gnus $B$K8=$l!"%7%s%\%j%C%/%j%s%/$N%U%!(B +$B%$%kL>$,$=$N%0%k!<%W$NL>A0$K$J$j$^$9!#%G%#%l%/%H%j$K$"$k(B `.' $B$G;O$^$k$I(B +$B$s$J%U%!%$%kL>$bL5;k$5$l$^$9!#%G%#%l%/%H%j$O:G=i$K(B Gnus $B$r5/F0$7$?$H$-$H(B +$B%0%k!<%W%P%C%U%!$G(B @kbd{g} $B$r%?%$%W$7$?$H$-$O$$$D$G$bAv::$5$l!"$I$l$+(B +$B$N(B maildir $B$,:o=|$^$?$ODI2C$5$l$?$H$-$KDLCN$7$^$9!#(B @code{directory} $B%Q%i%a!<%?$NCM$O(B Lisp $B<0$G$J$1$l$P$J$j$^$;$s!#(B @code{eval} $B$G=hM}$5$l$?8e$G!"(B@code{expand-file-name} $B$K$h$C$F$3$N%5!<%P!<(B $B$N$?$a$N%G%#%l%/%H%j$N%Q%9$r3MF@$7$^$9!#$=$N7k2LF@$i$l$?J8;zNs$,!"%5!<%P!<(B $B$,JD$8$i$l$k$^$G;H$o$l$^$9(B ($B$b$7!"<0$d(B @code{eval} $B$rCN$i$J$/$G$b?4G[$4(B $BL5MQ(B; $BC1$J$kJ8;zNs$GF0:n$7$^$9(B)$B!#$3$N%Q%i%a!<%?$OG$0U$G$O$J$/!"@_Dj$7$J(B -$B$1$l$P$J$j$^$;$s!#(B@file{~/Mail} $B$d%5%V%G%#%l%/%H%j$r;H$&$3$H$O?d>)$G$-$^(B -$B$;$s!#$$$/$D$+$N(B Gnus $B$NB>$NItJ,$,$=$l$r%G%#%U%)%k%H$G$$$m$s$J$b$N$K;H$&(B -$B$N$G!"(Bnnmaildir $B$G$b$=$l$r;H$&$H:.Mp$9$k$+$b$7$l$^$;$s!#(B -@file{~/.nnmaildir} $B$,0lHLE*$JCM$G$9!#(B +$B$1$l$P$J$j$^$;$s!#(B@code{"~/Mail"} $B$d$=$l$N%5%V%G%#%l%/%H%j$r;H$&$3$H$O?d(B +$B>)$G$-$^$;$s!#$$$/$D$+$N(B Gnus $B$NB>$NItJ,$,$=$l$r%G%#%U%)%k%H$G$$$m$s$J$b(B +$B$N$K;H$&$N$G!"(Bnnmaildir $B$G$b$=$l$r;H$&$H:.Mp$9$k$+$b$7$l$^$;$s!#(B +@code{"~/.nnmaildir"} $B$,0lHLE*$JCM$G$9!#(B -@item create-directory +@item target-prefix $B$3$l$O(B Lisp $B<0$G$J$1$l$P$J$j$^$;$s!#(B@code{eval} $B$G=hM}$5$l$?8e$G!"(B @code{expand-file-name} $B$K$h$C$F?7$7$$(B maildir $B$,@8@.$5$l$k%G%#%l%/%H%j(B -$B$NL>A0$r3MF@$7$^$9!#<0$O%5!<%P!<$,3+DL$7$?$H$-$@$1I>2A$5$l!"$=$N7k2LF@$i(B -$B$l$?J8;zNs$,!"%5!<%P!<$,JD$8$i$l$k$^$G;H$o$l$^$9!#$3$N%Q%i%a!<%?$OG$0U$G(B -$B$9$,!"$=$l$rM?$($J$$$H(B Gnus $B$G?7$7$$%0%k!<%W$r:n$k$3$H$,$G$-$^$;$s(B ($B$=$l(B -$B$i$r(B shell $B$+$i(B @code{mkdir -m 0700 foo foo/tmp foo/new foo/cur} $B$G:n$k(B -$B$3$H$O$G$-$^$9(B)$B!#AjBPE*$J%Q%9$O(B @code{directory} $B%Q%9$X$NAjBPCM$G$"$k$b(B -$B$N$H2rC5n$,GKC>$7$F$7$^$$$^$9(B ($B$=$l$i$N5!(B -$BG=$,MW$i$J$$$N$G$"$l$P!"(B@code{create-directory} $B$r40`z$K>JN,$7$F$b9=$$$^(B -$B$;$s(B)$B!#(B +$B$NL>A0$r3MF@$7$^$9!#<0$O%5!<%P!<$,3+DL$7$?$H$-$@$1(B @code{eval} $B$5$l!"$=(B +$B$N7k2LF@$i$l$?J8;zNs$,!"%5!<%P!<$,JD$8$i$l$k$^$G;H$o$l$^$9!#(B + +nnmaildir $B%5!<%P!<$K%0%k!<%W$r:n$k$H!"$=$NL>A0$NF,(B +$B$K(B @code{target-prefix} $B$,IU2C$5$l$?(B maildir $B$H!"$=$N(B maildir $B$r;X$7<($9(B +$B%7%s%\%j%C%/%j%s%/$,AG$N%0%k!<%WL>$NL>A0$G:n@.$5$l$^$9!#$7$?$,$C$F!"(B +@code{directory} $B$,(B @code{"~/.nnmaildir"} $B$G!"(B +@code{target-prefix} $B$,(B @code{"../maildirs/"} $B$@$C$?>l9g$K(B @code{foo} $B$H(B +$B$$$&%0%k!<%W$r:n$k$H!"(Bnnmaildir $B$O(B maildir $B$H$7(B +$B$F(B @file{~/.nnmaildir/../maildirs/foo} $B$r!"(B@file{../maildirs/foo} $B$X$N%7(B +$B%s%\%j%C%/%j%s%/$H$7$F(B @file{~/.nnmaildir/foo} $B$r:n@.$7$^$9!#(B + +$BF1$8(B @code{directory} $B$K(B maildirs $B$H%7%s%\%j%C%/%j%s%/$NN>J}$r:n@.$9$k$?(B +$B$a$K!"%9%i%C%7%e$r4^$^$J$$J8;zNs$r(B @code{target-prefix} $B$K@_Dj$9$k$3$H$,(B +$B$G$-$^$9!#$3$N>l9g$O!"L>A0$,(B @code{target-prefix} $B$G;O$^(B +$B$k(B @code{directory} $B$G8+$D$+$k$I$N(B maildir $B$b!"%0%k!<%W$H$O8+$J$5$l$^$;(B +$B$s(B ($B$,!"$=$l$i$r;X$7<($9%7%s%\%j%C%/%j%s%/$,%0%k!<%W$K$J$j$^$9(B)$B!#(B + +$BFCJL$J>l9g$H$7$F(B @code{target-prefix} $B$,(B @code{""} ($B%G%#%U%)%k%H(B) $B$@$C$?(B +$B$i!"%0%k!<%W$r:n$k$H$-$K!"(B@code{directory} $B$K$*$$$FBP1~$9$k%7%s%\%j%C%/(B +$B%j%s%/$r;}$?$J$$(B maildir $B$,:n@.$5$l$^$9!#$=$N$h$&$J%0%k!<%W$KBP$7$F(B +$B$O!"(B@code{force} $B0z?t$rM?$($J$$$H(B @code{gnus-group-delete-group} $B$,;H$((B +$B$J$$$3$H$KCm0U$7$F2<$5$$!#(B @item directory-files $B$3$l$O(B @code{directory-files} $B$HF1$8%$%s%?!<%U%'!<%9$N4X(B @@ -13972,7 +13982,11 @@ nnmaildir $B$O$$$/$D$+$N%0%k!<%W%Q%i%a!<%?$r;H$$$^$9!#$3$l$i$N$9$Y$F$rL5;k(B $B%0%k!<%W$K0\F0$5$;$i$l$^$9!#(B@emph{$B$3$l$,(B nnmaildir $B%0%k!<%W$K@_Dj$5$l$k(B $B$H!"0\F0@h$N%0%k!<%W$K$*$$$F!"5-;v$,85$N%0%k!<%W$K$"$C$?$H$-$H$A$g$&$IF1(B $B$8$@$18E$/$J$j$^$9!#(B} $B$7$?$,$C$F!"0\F0@h$N%0%k!<%W$K$*$1(B -$B$k(B @code{expire-age} $B$K$OCm0U$7$F2<$5$$!#(B +$B$k(B @code{expire-age} $B$K$OCm0U$7$F2<$5$$!#$3$l$,%Q%i%a!<%?$,B0$9$k$N$HF1(B +$B$8%0%k!<%W$NL>A0$K@_Dj$5$l$k$H!"5-;v$O$^$C$?$/4|8B@Z$l>C5n$5$l$^$;$s!#%Y(B +$B%/%H%k<0$r;H$&$H!":G=i$NMWAG$,0l2s!"$=$l$>$l$N5-;v$K$D$$$FI>2A$5$l$^$9!#(B +$B$7$?$,$C$F!"5-;v$r$I$3$KCV$/$+$r7h$a$k$?$a$K!"$=$N<0(B +$B$O(B @code{nnmaildir-article-file-name} $B$J$I$K>H2q$9$k$3$H$,$G$-$^$9!#(B @item read-only $B$3$l$,(B @code{t} $B$K@_Dj$5$l$F$$$k$H!"(Bnnmaildir $B$O$=$N5-;v$r$3$N%0%k!<%W$G(B @@ -13993,6 +14007,11 @@ nnmaildir $B$O$$$/$D$+$N%0%k!<%W%Q%i%a!<%?$r;H$$$^$9!#$3$l$i$N$9$Y$F$rL5;k(B $B$o$l$^$9!#%G%#%U%)%k%H$O%5!<%P!<$N(B @code{directory-files} $B%Q%i%a!<%?$G@_(B $BDj$5$l$F$$$k4X?t$G$9!#(B +@item distrust-Lines: +$BHs(B-@code{nil} $B$G$"$k$H!"(Bnnmaildir $B$O(B @code{Lines:} $B%X%C%@!<%U%#!<%k%I$r(B +$B;H$&Be$o$j$K$$$D$b5-;v$N9T?t$r?t$($^$9!#(B@code{nil} $B$@$C$?>l9g$O!"$"$l$P(B +$B$=$N%X%C%@!<%U%#!<%k%I$,;H$o$l$^$9!#(B + @item always-marks @code{['(read expire)]} $B$N$h$&$J0u%7%s%\%k$N%j%9%H$G$9!#(BGnus $B$,5-;v$N0u(B $B$r(B nnmaildir $B$K?R$M$k$H$-$O$$$D$G$b!"%U%!%$%k%7%9%F%`$K3JG<$5$l$F$$$k0u(B diff --git a/texi/gnus.texi b/texi/gnus.texi index dbf5684..2953659 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -14533,18 +14533,14 @@ Virtual server settings: @item directory For each of your nnmaildir servers (it's very unlikely that you'd need more than one), you need to create a directory and populate it with -symlinks to maildirs (and nothing else; do not choose a directory -already used for other purposes). You could also put maildirs -themselves (instead of symlinks to them) directly in the server -directory, but that would break @code{nnmaildir-request-delete-group}, -so you wouldn't be able to delete those groups from within Gnus. (You -could still delete them from your shell with @code{rm -r foo}.) Each -maildir will be represented in Gnus as a newsgroup on that server; the -filename of the symlink will be the name of the group. Any filenames -in the directory starting with `.' are ignored. The directory is -scanned when you first start Gnus, and each time you type @kbd{g} in -the group buffer; if any maildirs have been removed or added, -nnmaildir notices at these times. +maildirs or symlinks to maildirs (and nothing else; do not choose a +directory already used for other purposes). Each maildir will be +represented in Gnus as a newsgroup on that server; the filename of the +symlink will be the name of the group. Any filenames in the directory +starting with `.' are ignored. The directory is scanned when you +first start Gnus, and each time you type @kbd{g} in the group buffer; +if any maildirs have been removed or added, nnmaildir notices at these +times. The value of the @code{directory} parameter should be a Lisp form which is processed by @code{eval} and @code{expand-file-name} to get @@ -14552,23 +14548,38 @@ the path of the directory for this server. The form is @code{eval}ed only when the server is opened; the resulting string is used until the server is closed. (If you don't know about forms and @code{eval}, don't worry - a simple string will work.) This parameter is not -optional; you must specify it. I don't recommend using @file{~/Mail} -or a subdirectory of it; several other parts of Gnus use that -directory by default for various things, and may get confused if -nnmaildir uses it too. @file{~/.nnmaildir} is a typical value. +optional; you must specify it. I don't recommend using +@code{"~/Mail"} or a subdirectory of it; several other parts of Gnus +use that directory by default for various things, and may get confused +if nnmaildir uses it too. @code{"~/.nnmaildir"} is a typical value. -@item create-directory +@item target-prefix This should be a Lisp form which is processed by @code{eval} and -@code{expand-file-name} to get the name of the directory where new -maildirs are created. The form is @code{eval}ed only when the server -is opened; the resulting string is used until the server is closed. -This parameter is optional, but if you do not supply it, you cannot -create new groups from within Gnus. (You could still create them from -your shell with @code{mkdir -m 0700 foo foo/tmp foo/new foo/cur}.) A -relative path is interpreted as relative to the @code{directory} path. -@code{create-directory} and @code{directory} must be different; -otherwise, group creation and deletion will break. (If you don't need -those features, you can omit @code{create-directory} entirely.) +@code{expand-file-name}. The form is @code{eval}ed only when the +server is opened; the resulting string is used until the server is +closed. + +When you create a group on an nnmaildir server, the maildir is created +with @code{target-prefix} prepended to its name, and a symlink +pointing to that maildir is created, named with the plain group name. +So if @code{directory} is @code{"~/.nnmaildir"} and +@code{target-prefix} is @code{"../maildirs/"}, then when you create +the group @code{foo}, nnmaildir will create +@file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create +@file{~/.nnmaildir/foo} as a symlink pointing to +@file{../maildirs/foo}. + +You can set @code{target-prefix} to a string without any slashes to +create both maildirs and symlinks in the same @code{directory}; in +this case, any maildirs found in @code{directory} whose names start +with @code{target-prefix} will not be listed as groups (but the +symlinks pointing to them will be). + +As a special case, if @code{target-prefix} is @code{""} (the default), +then when you create a group, the maildir will be created in +@code{directory} without a corresponding symlink. Beware that you +cannot use @code{gnus-group-delete-group} on such groups without the +@code{force} argument. @item directory-files This should be a function with the same interface as @@ -14638,7 +14649,12 @@ articles will be moved to the specified group during expiry before being deleted. @emph{If this is set to an nnmaildir group, the article will be just as old in the destination group as it was in the source group.} So be careful with @code{expire-age} in the destination -group. +group. If this is set to the name of the same group that the +parameter belongs to, then the article is not expired at all. If you +use the vector form, the first element is evaluated once for each +article. So that form can refer to +@code{nnmaildir-article-file-name}, etc., to decide where to put the +article. @item read-only If this is set to @code{t}, nnmaildir will treat the articles in this @@ -14659,6 +14675,11 @@ used to scan the directories in the maildir corresponding to this group to find articles. The default is the function specified by the server's @code{directory-files} parameter. +@item distrust-Lines: +If non-@code{nil}, nnmaildir will always count the lines of an +article, rather than use the @code{Lines:} header field. If +@code{nil}, the header field will be used if present. + @item always-marks A list of mark symbols, such as @code{['(read expire)]}. Whenever Gnus asks nnmaildir for