Path: utzoo!attcan!uunet!aplcen!samsung!usc!jarthur!bridge2!mdb From: mdb@ESD.3Com.COM (Mark D. Baushke) Newsgroups: comp.mail.mh Subject: Re: Hierarchical folders in MH Message-ID: Date: 11 Dec 89 07:24:21 GMT References: <1989Dec9.210326.5398@smsc.sony.com> <16411@duke.cs.duke.edu> <1409@crltrx.crl.dec.com> Sender: news@bridge2.ESD.3Com.COM Organization: 3Com Corp., Mountain View, CA. Lines: 45 In-reply-to: jw@sics.se's message of 10 Dec 89 22:28:55 GMT On 10 Dec 89 22:28:55 GMT, jw@sics.se (Johan Widen) said: Johan> One thing that keeps bothering me, but which I have never got Johan> around to fix (8-(), is that completion in the emacs mh-rmail Johan> package does not work on subfolders. When I try to open a Johan> subfolder for the first time, name completion does not work. Johan> When I do it a second time however, emacs will now about the Johan> subfolder, but not about any other as yet unopened subfolders. Johan> Johan Widen Johan> SICS, PO Box 1263, S-164 28 KISTA, SWEDEN Internet: jw@sics.se Johan> Tel: +46 8 752 15 32 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30 The following may be of interest to you. I hacked it up for my own use. I would suggest that you save the value of the mh-folder-list as it may take some time generate. Only do the my-mh-make-big-folder-list when you need the list updated. (defun my-mh-make-big-folder-list () "Return a list of the user's folders. Result is in a form suitable for completing read." (interactive) (message "Collecting folder names...") (save-window-excursion (mh-exec-cmd-quiet " *mh-temp*" "folders" "-fast" "-recurse") (goto-char (point-min)) (let ((list nil)) (while (not (eobp)) (let ((start (point)) (count 0)) (search-forward "\n" nil t) (let ((folder (buffer-substring start (- (point) 1)))) (mh-push (list (format "+%s" folder)) list)))) (message "Collecting folder names...done") list))) (setq mh-folder-list (my-mh-make-big-folder-list)) Enjoy! -- Mark D. Baushke Internet: mdb@ESD.3Com.COM UUCP: {3comvax,auspex,sun}!bridge2!mdb