[Top][All Lists]

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

Re: save all emacs buffers

From: Peter Dyballa
Subject: Re: save all emacs buffers
Date: Mon, 26 Jun 2006 12:32:42 +0200

Am 26.06.2006 um 11:02 schrieb Mathias Dahl:

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

maybe desktop.el will meet your need. BTW, it is better to use it with session.el which save your local variables and registers etc. of your

I think, too, that the combination of these two produces the best
outcome. Session alone seems to forget about some buffers (or simply
does not re-open some files in buffers, maybe those I have only
visited?), and desktop is a bit simplistic. Combining both all useful
files open in buffers again -- and the points are located where they
were before! With some Elisp it's easy to have different work-sets
for different Emacsen (versions for example).

I haven't figured out exactly what is going wrong, but session.el or
desktop.el (don't remember which one) have messed up my Emacs
environment now and then. I think the reason is that it saves too much
"stuff". After disabling it Emacs works normally again. This isn't an
"official" complaint, I will have to do some debugging before I post a
bug about this.

This was just a small warning, desktop.el will probably work nice for
the parent poster.

Maybe these lines help a bit:

;;; Desktop & Session
(unless (string-match "21.2" mEV)
    (desktop-save-mode 1)
    (setq history-length 250)
(setq desktop-globals-to-save '(desktop-missing-file-warning)) % nice when a buffer was visiting an archive, or the senseless file was removed in the meantime (setq desktop-dirname (format "~/.emacs.d/PDesktop-%d" emacs- major-version))
;veraltet: (desktop-load-default)
;    (setq desktop-buffer-modes-to-save
;          (cons 'w3m-mode desktop-buffer-modes-to-save))
;    (setq desktop-locals-to-save
; (cons 'buffer-file-coding-system desktop-locals-to-save)) % automatic now?
    (require 'session)
    (add-hook 'after-init-hook 'session-initialize)
(setq session-save-file (format "~/.Psession-%d" emacs-major- version))

Apple brings an old GNU Emacs 21.2 to Mac OS X which only runs without X11. It would need old syntax, but it isn't worth the effort. The directories "~/.emacs.d/PDesktop-%d" need to be created.

Mit friedvollen Grüßen


Wer eher stirbt ist wenigstens länger tot!

reply via email to

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