|
Don't lose your *Remember* buffer: msg#00115emacs.wiki.general
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I use the following in .emacs to keep me from accidentally destroying a *Remember* buffer by exiting Emacs. There's also something for Gnus in there. Is there a better way? If not, enjoy. ,---- | (defun my-cleanup-then-save-buffers-kill-emacs (&optional arg) | "Clean up before saving buffers and killing Emacs." | (interactive "P") | ;; stop here if there's a *Remember* buffer | (if (get-buffer remember-buffer) | (remember) | ;; clean up Gnus | (and | (fboundp 'gnus-alive-p) | (gnus-alive-p) | (let ((gnus-interactive-exit nil)) | (gnus-group-exit))) | (save-buffers-kill-emacs arg))) | (global-set-key "\C-x\C-c" 'my-cleanup-then-save-buffers-kill-emacs) `---- - -- Andrew J. Korty, Principal Security Engineer, GCIA, GCFA Office of the Vice President for Information Technology Indiana University -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBo7B18gM8+Mr5peERAleoAJ42XstuJ0TzKp7SzbPh38ThBWOq8ACg9r7W DYHmSHpSnQk8xL/tEA8QEFk= =igOx -----END PGP SIGNATURE----- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: wiki-project: 00115, TC |
|---|---|
| Next by Date: | Re: Configuration with sub-directories: 00115, Michael Olson |
| Previous by Thread: | [Fwd: Re: Configuration with sub-directories]i: 00115, Nicolas Charpentier |
| Next by Thread: | Re: Don't lose your *Remember* buffer: 00115, Dryice Liu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |