[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111377: lisp/gnus/nnfolder.el: Allow
From: |
Katsumi Yamaoka |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111377: lisp/gnus/nnfolder.el: Allow regenerating recursive nnfolder names |
Date: |
Sat, 29 Dec 2012 23:18:05 +0000 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111377
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Sat 2012-12-29 23:18:05 +0000
message:
lisp/gnus/nnfolder.el: Allow regenerating recursive nnfolder names
modified:
lisp/gnus/ChangeLog
lisp/gnus/nnfolder.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2012-12-29 15:16:37 +0000
+++ b/lisp/gnus/ChangeLog 2012-12-29 23:18:05 +0000
@@ -1,3 +1,9 @@
+2012-12-29 Lars Magne Ingebrigtsen <address@hidden>
+
+ * nnfolder.el (nnfolder-recursive-directory-files): New function.
+ (nnfolder-generate-active-file): Make this function work with recursive
+ folder names.
+
2012-12-27 Lars Ingebrigtsen <address@hidden>
* nntp.el (nntp-open-connection): Use HELP as the capability command
=== modified file 'lisp/gnus/nnfolder.el'
--- a/lisp/gnus/nnfolder.el 2012-06-26 22:52:31 +0000
+++ b/lisp/gnus/nnfolder.el 2012-12-29 23:18:05 +0000
@@ -1004,6 +1004,28 @@
(nnfolder-save-nov))
(current-buffer))))))
+(defun nnfolder-recursive-directory-files (dir prefix)
+ (let ((files nil))
+ (dolist (file (directory-files dir))
+ (cond
+ ((or (file-symlink-p (expand-file-name file dir))
+ (member file '("." "..")))
+ ;; Ignore
+ )
+ ((file-directory-p (expand-file-name file dir))
+ (setq files (nconc (nnfolder-recursive-directory-files
+ (expand-file-name file dir)
+ (if prefix
+ (concat prefix "." (directory-file-name file))
+ (file-name-nondirectory file)))
+ files)))
+ ((file-regular-p (expand-file-name file dir))
+ (push (if prefix
+ (concat prefix "." file)
+ file)
+ files))))
+ files))
+
;;;###autoload
(defun nnfolder-generate-active-file ()
"Look for mbox folders in the nnfolder directory and make them into groups.
@@ -1020,10 +1042,13 @@
(when (not (message-mail-file-mbox-p file))
(ignore-errors
(delete-file file)))))
- (dolist (file (directory-files nnfolder-directory))
+ (dolist (file (if nnmail-use-long-file-names
+ (directory-files nnfolder-directory)
+ (nnfolder-recursive-directory-files
+ nnfolder-directory nil)))
(when (and (not (backup-file-name-p file))
(message-mail-file-mbox-p
- (nnheader-concat nnfolder-directory file)))
+ (nnfolder-group-pathname file)))
(let ((oldgroup (assoc file nnfolder-group-alist)))
(if oldgroup
(nnheader-message 5 "Refreshing group %s..." file)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111377: lisp/gnus/nnfolder.el: Allow regenerating recursive nnfolder names,
Katsumi Yamaoka <=