1.95b27 | 1.94 | prom-mew
-- comment --
-- old --
; -*- Emacs Lisp -*- mew-1.94
(defun mew-summary-goto-folder (&optional arg fld)
"Go to the folder which you input. If executed with '\\[universal-argument]', the cursor always goes to the bottom of Summary mode."
(interactive "P") (let* ((folder (or fld (mew-input-folder (mew-inbox-folder)))) (dir (mew-expand-folder folder))) (cond ((mew-folder-newsp folder)
(mew-summary-goto-folder-subr folder arg))
((mew-folder-imapp folder)
(if (and (not (file-directory-p dir)) (y-or-n-p (format "Cache directory for %s does not exist. Create it? " folder))) (let ((folders-file (expand-file-name mew-folders-file mew-mail-path))) (mew-make-directory dir) (if (and (mew-folder-setup folder) (file-writable-p folders-file)) (save-excursion (mew-set-buffer-tmp) (insert folder) (insert "\n") (write-region (point-min) (point-max) folders-file 'append 'no-msg)))) (mew-folder-setup folder)) (mew-summary-goto-folder-subr folder arg))
((mew-folder-virtualp folder) (if (get-buffer folder)
(progn (mew-summary-goto-folder-subr folder arg) (mew-virtual-mode))
(message "No such virtual folder: %s" folder) (mew-folder-delete folder))) (t ;; mail or local news (if (null dir) (message "Folder is wrong") (if (not (file-directory-p dir)) (message "No such folder %s" folder)
(mew-summary-goto-folder-subr folder arg) (if mew-summary-trace-directory (cd dir))))))))