logo       

Re: Don't lose your *Remember* buffer: msg#00135

emacs.wiki.general

Subject: Re: Don't lose your *Remember* buffer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frederik Fouvry <fouvry@xxxxxxxxxxxxxx> writes:

> There is a hook (_of course_ there is one! ;-) `kill-emacs-hook' for
> doing things on exit, and another (kill-emacs-query-functions) one for
> querying the user about killing Emacs (in certain circumstances).
> Adding your function one of to the hook will be more robust a setup
> (no key redefinition needed, and the same behaviour whichever way you
> exit Emacs).

I should have known.

> The last variable (which is run by save-buffers-kill-emacs) is
> probably the best one for the remember function (e.g.
>
> (defun remember-not-active-p ()
> (not (get-buffer remember-buffer)))

I'm now using

,----
| (defun my-remember-maybe ()
| "Visit the *Remember* buffer if one exists."
| (or (not (get-buffer remember-buffer))
| (and (remember)
| nil)))
`----

because I want Emacs to automatically switch to the *Remember* buffer
instead of exiting. Thanks!

- --
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 (Darwin)

iD8DBQFBpPaz8gM8+Mr5peERArn+AKCHUMqmYyyI3kXz+A+av+2G1H0phwCgxOXd
KV94FYSwleN+wYWcv7DuP7U=
=0HQo
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise