From: "Ehud Karni" <ehud@unix.mvs.co.il>
Cc: help-gnu-emacs@gnu.org
Subject: Re: auto-save-desktop?
Date: Tue, 15 Apr 2003 18:58:46 +0300 [thread overview]
Message-ID: <200304151558.h3FFwkW2028041@beta.mvs.co.il> (raw)
In-Reply-To: <b7h4f7$fe5$1@reader1.panix.com> (message from Steve Wainstead on Tue, 15 Apr 2003 10:24:50 -0400)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 15 Apr 2003 10:24:50 -0400, Steve Wainstead <swain@ampira.com> wrote:
>
> Does anyone know of an extension (or an existing way in Emacs that I
> missed) to automatically save the desktop? I'd like Emacs to do
> desktop-save to a user-specified file periodically; I lost my X session
> yesterday and had several open files.
I have the following code on my .emacs :
(defun desktop-save-in-home-dir ()
"save desktop on home directory"
(if (buffer-file-name) ;; do only for real files
(let (find-file-hooks ;; must - do not loop on this function
kill-buffer-hook) ;; must - do not loop on this function
(desktop-save "~/")
))
nil)
(add-hook 'find-file-hooks 'desktop-save-in-home-dir t)
(add-hook 'kill-buffer-hook 'desktop-save-in-home-dir t)
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
mailto:ehud@unix.mvs.co.il Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE+nCwtLFvTvpjqOY0RAtkHAJ485I4poJObLlrvsv05NDqTiptGEACfYjcp
PtfBs2pChwPdIa0Ac0hJBN0=
=aMF1
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-04-15 15:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-15 14:24 auto-save-desktop? Steve Wainstead
2003-04-15 15:10 ` auto-save-desktop? Thomas Haselberger
2003-04-15 18:52 ` auto-save-desktop? Steve Wainstead
2003-04-15 15:58 ` Ehud Karni [this message]
[not found] ` <mailman.4659.1050422363.21513.help-gnu-emacs@gnu.org>
2003-04-17 19:30 ` auto-save-desktop? Steve Wainstead
2003-04-18 0:40 ` auto-save-desktop? gebser
2003-04-20 22:36 ` auto-save-desktop? Steve Wainstead
2003-04-26 12:52 ` auto-save-desktop? John Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304151558.h3FFwkW2028041@beta.mvs.co.il \
--to=ehud@unix.mvs.co.il \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.