+2003-03-18 Paul Jarc <prj@po.cwru.edu>
+
+ * 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 <harder@ifa.au.dk>
+
+ * mm-bodies.el (mm-decode-coding-region-safely): Don't use
+ find-charset-region which is slooow in XEmacs.
+
2003-03-18 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-sum.el (gnus-summary-highlight-line-0): Silence the byte-
* lpath.el (featurep): Bind mm-w3m-mode-map.
-2003-03-12 Paul Jarc <prj@po.cwru.edu>
+2003-03-17 Paul Jarc <prj@po.cwru.edu>
* nnmail.el (nnmail-cache-primary-mail-backend): Not all
'respool-able backends define a global nnchoke-get-new-mail
"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."
;; 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
; ("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)
(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
(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)))
(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)
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
(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)
(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)
(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))
(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)
-2003-03-09 Paul Jarc <prj@po.cwru.edu>
+2003-03-18 Paul Jarc <prj@po.cwru.edu>
+
+ * gnus.texi (Maildir): Replace create-directory with
+ target-prefix.
+
+2003-03-18 Paul Jarc <prj@po.cwru.edu>
+
+ * gnus.texi (Maildir): More info for expire-group; add
+ distrust-Lines:.
+
+2003-03-17 Paul Jarc <prj@po.cwru.edu>
* gnus.texi (Comparing Mail Back Ends): nnmaildir fixes.
@table @code
@item directory
\e$B$=$l$>$l$N\e(B nnmaildir \e$B%5!<%P!<\e(B (\e$B0l$D$r1[$($k%5!<%P!<$,I,MW$@$H$O$H$F$b;W\e(B
-\e$B$($^$;$s$,\e(B) \e$B$KBP$7$F!"%G%#%l%/%H%j$r:n$C$F\e(B maildir \e$B$X$N%7%s%\%j%C%/%j%s\e(B
-\e$B%/$rD%$kI,MW$,$"$j$^$9\e(B (\e$BB>$NL\E*$N$?$a$K$9$G$K;H$o$l$F$$$k%G%#%l%/%H%j$r\e(B
-\e$BA*$s$G$O$$$1$^$;$s\e(B)\e$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!"\e(Bnnmaildir \e$B$G$b$=$l$r;H$&$H:.Mp$9$k$+$b$7$l$^$;$s!#\e(B
-@file{~/.nnmaildir} \e$B$,0lHLE*$JCM$G$9!#\e(B
+\e$B$1$l$P$J$j$^$;$s!#\e(B@code{"~/Mail"} \e$B$d$=$l$N%5%V%G%#%l%/%H%j$r;H$&$3$H$O?d\e(B
+\e$B>)$G$-$^$;$s!#$$$/$D$+$N\e(B Gnus \e$B$NB>$NItJ,$,$=$l$r%G%#%U%)%k%H$G$$$m$s$J$b\e(B
+\e$B$N$K;H$&$N$G!"\e(Bnnmaildir \e$B$G$b$=$l$r;H$&$H:.Mp$9$k$+$b$7$l$^$;$s!#\e(B
+@code{"~/.nnmaildir"} \e$B$,0lHLE*$JCM$G$9!#\e(B
-@item create-directory
+@item target-prefix
\e$B$3$l$O\e(B Lisp \e$B<0$G$J$1$l$P$J$j$^$;$s!#\e(B@code{eval} \e$B$G=hM}$5$l$?8e$G!"\e(B
@code{expand-file-name} \e$B$K$h$C$F?7$7$$\e(B maildir \e$B$,@8@.$5$l$k%G%#%l%/%H%j\e(B
-\e$B$NL>A0$r3MF@$7$^$9!#<0$O%5!<%P!<$,3+DL$7$?$H$-$@$1I>2A$5$l!"$=$N7k2LF@$i\e(B
-\e$B$l$?J8;zNs$,!"%5!<%P!<$,JD$8$i$l$k$^$G;H$o$l$^$9!#$3$N%Q%i%a!<%?$OG$0U$G\e(B
-\e$B$9$,!"$=$l$rM?$($J$$$H\e(B Gnus \e$B$G?7$7$$%0%k!<%W$r:n$k$3$H$,$G$-$^$;$s\e(B (\e$B$=$l\e(B
-\e$B$i$r\e(B shell \e$B$+$i\e(B @code{mkdir -m 0700 foo foo/tmp foo/new foo/cur} \e$B$G:n$k\e(B
-\e$B$3$H$O$G$-$^$9\e(B)\e$B!#AjBPE*$J%Q%9$O\e(B @code{directory} \e$B%Q%9$X$NAjBPCM$G$"$k$b\e(B
-\e$B$N$H2r<a$5$l$^$9!#\e(B@code{create-directory} \e$B$H\e(B @code{directory} \e$B$O0c$C$F$$\e(B
-\e$B$J$1$l$P$J$j$^$;$s!#$5$b$J$$$H@8@.$H>C5n$,GKC>$7$F$7$^$$$^$9\e(B (\e$B$=$l$i$N5!\e(B
-\e$BG=$,MW$i$J$$$N$G$"$l$P!"\e(B@code{create-directory} \e$B$r40`z$K>JN,$7$F$b9=$$$^\e(B
-\e$B$;$s\e(B)\e$B!#\e(B
+\e$B$NL>A0$r3MF@$7$^$9!#<0$O%5!<%P!<$,3+DL$7$?$H$-$@$1\e(B @code{eval} \e$B$5$l!"$=\e(B
+\e$B$N7k2LF@$i$l$?J8;zNs$,!"%5!<%P!<$,JD$8$i$l$k$^$G;H$o$l$^$9!#\e(B
+
+nnmaildir \e$B%5!<%P!<$K%0%k!<%W$r:n$k$H!"$=$NL>A0$NF,\e(B
+\e$B$K\e(B @code{target-prefix} \e$B$,IU2C$5$l$?\e(B maildir \e$B$H!"$=$N\e(B maildir \e$B$r;X$7<($9\e(B
+\e$B%7%s%\%j%C%/%j%s%/$,AG$N%0%k!<%WL>$NL>A0$G:n@.$5$l$^$9!#$7$?$,$C$F!"\e(B
+@code{directory} \e$B$,\e(B @code{"~/.nnmaildir"} \e$B$G!"\e(B
+@code{target-prefix} \e$B$,\e(B @code{"../maildirs/"} \e$B$@$C$?>l9g$K\e(B @code{foo} \e$B$H\e(B
+\e$B$$$&%0%k!<%W$r:n$k$H!"\e(Bnnmaildir \e$B$O\e(B maildir \e$B$H$7\e(B
+\e$B$F\e(B @file{~/.nnmaildir/../maildirs/foo} \e$B$r!"\e(B@file{../maildirs/foo} \e$B$X$N%7\e(B
+\e$B%s%\%j%C%/%j%s%/$H$7$F\e(B @file{~/.nnmaildir/foo} \e$B$r:n@.$7$^$9!#\e(B
+
+\e$BF1$8\e(B @code{directory} \e$B$K\e(B maildirs \e$B$H%7%s%\%j%C%/%j%s%/$NN>J}$r:n@.$9$k$?\e(B
+\e$B$a$K!"%9%i%C%7%e$r4^$^$J$$J8;zNs$r\e(B @code{target-prefix} \e$B$K@_Dj$9$k$3$H$,\e(B
+\e$B$G$-$^$9!#$3$N>l9g$O!"L>A0$,\e(B @code{target-prefix} \e$B$G;O$^\e(B
+\e$B$k\e(B @code{directory} \e$B$G8+$D$+$k$I$N\e(B maildir \e$B$b!"%0%k!<%W$H$O8+$J$5$l$^$;\e(B
+\e$B$s\e(B (\e$B$,!"$=$l$i$r;X$7<($9%7%s%\%j%C%/%j%s%/$,%0%k!<%W$K$J$j$^$9\e(B)\e$B!#\e(B
+
+\e$BFCJL$J>l9g$H$7$F\e(B @code{target-prefix} \e$B$,\e(B @code{""} (\e$B%G%#%U%)%k%H\e(B) \e$B$@$C$?\e(B
+\e$B$i!"%0%k!<%W$r:n$k$H$-$K!"\e(B@code{directory} \e$B$K$*$$$FBP1~$9$k%7%s%\%j%C%/\e(B
+\e$B%j%s%/$r;}$?$J$$\e(B maildir \e$B$,:n@.$5$l$^$9!#$=$N$h$&$J%0%k!<%W$KBP$7$F\e(B
+\e$B$O!"\e(B@code{force} \e$B0z?t$rM?$($J$$$H\e(B @code{gnus-group-delete-group} \e$B$,;H$(\e(B
+\e$B$J$$$3$H$KCm0U$7$F2<$5$$!#\e(B
@item directory-files
\e$B$3$l$O\e(B @code{directory-files} \e$B$HF1$8%$%s%?!<%U%'!<%9$N4X\e(B
\e$B%0%k!<%W$K0\F0$5$;$i$l$^$9!#\e(B@emph{\e$B$3$l$,\e(B nnmaildir \e$B%0%k!<%W$K@_Dj$5$l$k\e(B
\e$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\e(B
\e$B$8$@$18E$/$J$j$^$9!#\e(B} \e$B$7$?$,$C$F!"0\F0@h$N%0%k!<%W$K$*$1\e(B
-\e$B$k\e(B @code{expire-age} \e$B$K$OCm0U$7$F2<$5$$!#\e(B
+\e$B$k\e(B @code{expire-age} \e$B$K$OCm0U$7$F2<$5$$!#$3$l$,%Q%i%a!<%?$,B0$9$k$N$HF1\e(B
+\e$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\e(B
+\e$B%/%H%k<0$r;H$&$H!":G=i$NMWAG$,0l2s!"$=$l$>$l$N5-;v$K$D$$$FI>2A$5$l$^$9!#\e(B
+\e$B$7$?$,$C$F!"5-;v$r$I$3$KCV$/$+$r7h$a$k$?$a$K!"$=$N<0\e(B
+\e$B$O\e(B @code{nnmaildir-article-file-name} \e$B$J$I$K>H2q$9$k$3$H$,$G$-$^$9!#\e(B
@item read-only
\e$B$3$l$,\e(B @code{t} \e$B$K@_Dj$5$l$F$$$k$H!"\e(Bnnmaildir \e$B$O$=$N5-;v$r$3$N%0%k!<%W$G\e(B
\e$B$o$l$^$9!#%G%#%U%)%k%H$O%5!<%P!<$N\e(B @code{directory-files} \e$B%Q%i%a!<%?$G@_\e(B
\e$BDj$5$l$F$$$k4X?t$G$9!#\e(B
+@item distrust-Lines:
+\e$BHs\e(B-@code{nil} \e$B$G$"$k$H!"\e(Bnnmaildir \e$B$O\e(B @code{Lines:} \e$B%X%C%@!<%U%#!<%k%I$r\e(B
+\e$B;H$&Be$o$j$K$$$D$b5-;v$N9T?t$r?t$($^$9!#\e(B@code{nil} \e$B$@$C$?>l9g$O!"$"$l$P\e(B
+\e$B$=$N%X%C%@!<%U%#!<%k%I$,;H$o$l$^$9!#\e(B
+
@item always-marks
@code{['(read expire)]} \e$B$N$h$&$J0u%7%s%\%k$N%j%9%H$G$9!#\e(BGnus \e$B$,5-;v$N0u\e(B
\e$B$r\e(B nnmaildir \e$B$K?R$M$k$H$-$O$$$D$G$b!"%U%!%$%k%7%9%F%`$K3JG<$5$l$F$$$k0u\e(B
@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
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
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
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