emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: Don't lose your *Remember* buffer


From: Andrew J. Korty
Subject: [emacs-wiki-discuss] Re: Don't lose your *Remember* buffer
Date: Wed, 24 Nov 2004 16:01:36 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (darwin)

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

Frederik Fouvry <address@hidden> 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-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]