[Mew-dist 03732] Re: Can't goto news-folder

SAKAI Kiyotaka ksakai at example.com
1998年 2月 13日 (金) 10:57:19 JST


>> In article <19980131172321L.tsumura at example.com>, TSUMURA Tomoaki (津邑公暁) <tsumura at example.com> writes:

> news の folder ``-foo.bar'' に移動できないようです。
> 今度は間違ってないといいなぁ。(^^;

> ;; そもそも mew-summary-goto-folder の中の、一番そとの if が
> ;; 要らないのかと思いましたが、そうでもないですね。

この mew-summary-goto-folder ですが、論理関係が交錯してきましたので、
以下のようにしませんか?
-- 
酒井 清隆 (E-mail: ksakai at example.com)


(defun mew-summary-goto-folder (&optional arg fld)
  "Go to the folder which you input.
If executed with 'C-u', 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 (or (file-directory-p dir)
		   (and (y-or-n-p
			 (format
			  "Cache directory for %s does not exist. Create it? "
			  folder))
			(mew-make-directory dir)))
	       (mew-summary-goto-folder-subr folder arg)))
	  (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))))))))

(defun mew-summary-goto-folder-subr (folder arg)
  (let (new-folder)
    (if (get-buffer folder)
	(switch-to-buffer folder)
      (mew-summary-folder-create folder)
      (setq new-folder t))
    (mew-summary-ls t (or arg new-folder))))



Mew-dist メーリングリストの案内