Xref: utzoo comp.emacs:8997 gnu.emacs:3737 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!nosc!crash!ncr-sd!rancho!rock From: rock@rancho.uucp (Rock Kent) Newsgroups: comp.emacs,gnu.emacs Subject: Re: Rmail question and mods Message-ID: <1990Sep1.170511.11598@rancho.uucp> Date: 1 Sep 90 17:05:11 GMT References: <14771@wpi.wpi.edu> Distribution: comp Organization: Del Rayo Ranch, San Diego, CA Lines: 44 In-Reply-To: john@wpi.wpi.edu's message of 30 Aug 90 15:22:08 GMT John> I have a question for all you rmail wizards out there. I want John> to modify my rmail so that whenever I type 'o' to save a message, it John> will not ask me if I wish to create it if it doesn't exist. I've John> narrowed down the function I need to modify, John> rmail-output-to-rmail-file. You can do what you want if you modify rmail-output-to-rmail-file (rmailout.el) as follows: (setq rmail-last-rmail-file file-name) (rmail-maybe-set-message-counters) (or (get-file-buffer file-name) **Delete | (file-exists-p file-name) **Change from| (if (yes-or-no-p ** to| (if (file-exists-p file-name) **Delete | (concat "\"" file-name "\" does not exist, create it? ")) (let ((file-buffer (create-file-buffer file-name))) (save-excursion (set-buffer file-buffer) (rmail-insert-rmail-file-header) (let ((require-final-newline nil)) (write-region (point-min) (point-max) file-name t 1))) **Change from| (kill-buffer file-buffer)) ** to| (kill-buffer file-buffer)))) **Delete | (error "Output file does not exist"))) (save-restriction (widen) I'm really gonna have to learn context diffs some day :-). You should really wrap up your revised rmail-output-to-rmail-file into your .emacs so that you don't have to remember that you changed the source. You can do something like: (setq rmail-mode-hook '(lambda () (defun rmail-output-to-rmail-file . . . your new revised function definition . . . ) )) Good luck. *************************************************************************** *Rock Kent rock@rancho.uucp POB 8964, Rancho Sante Fe, CA. 92067* ***************************************************************************