all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* desktop-save
@ 2002-11-04  9:25 Dmitry Trunikov
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Trunikov @ 2002-11-04  9:25 UTC (permalink / raw)


Hello friends :)
I need in your help. I use emacs 21.1 on Linux. Tell me please how can I 
store current emacs'es desktop (all opened buffers) for restoring it in 
future? Thnx.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: desktop-save
       [not found] <mailman.1036402706.16169.help-gnu-emacs@gnu.org>
@ 2002-11-06 15:54 ` Sven Utcke
  0 siblings, 0 replies; 6+ messages in thread
From: Sven Utcke @ 2002-11-06 15:54 UTC (permalink / raw)


Dmitry Trunikov <tda@quasarlabs.com> writes:

> I need in your help. I use emacs 21.1 on Linux. Tell me please how can
> I store current emacs'es desktop (all opened buffers) for restoring it
> in future? Thnx.

M-x desktop-save

But surely you knew that, given the subject.  So what's your problem?

Sven
-- 
 _  __                     The Cognitive Systems Group
| |/ /___  __ _ ___                                       University of Hamburg
| ' </ _ \/ _` (_-<  phone:    +49 (0)40 42883-2576      Vogt-Koelln-Strasse 30
|_|\_\___/\__, /__/  fax  :    +49 (0)40 42883-2572             D-22527 Hamburg
          |___/ http://kogs-www.informatik.uni-hamburg.de/~utcke/home.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* desktop-save
@ 2005-07-11 23:30 Lennart Borgman
       [not found] ` <42D31F5D.1080706@comcast.net>
  0 siblings, 1 reply; 6+ messages in thread
From: Lennart Borgman @ 2005-07-11 23:30 UTC (permalink / raw)


The doc string for function `desktop-save-mode' talks about a variable 
`desktop-save' that does not exist. (Maybe the intended variable was 
`desktop-save-mode' but that would be pretty useless here as far as I 
can see.)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: desktop-save
       [not found] ` <42D31F5D.1080706@comcast.net>
@ 2005-07-12  6:39   ` Lennart Borgman
  0 siblings, 0 replies; 6+ messages in thread
From: Lennart Borgman @ 2005-07-12  6:39 UTC (permalink / raw)


David Hunter wrote:

> Lennart Borgman wrote:
>
>> The doc string for function `desktop-save-mode' talks about a 
>> variable `desktop-save' that does not exist. (Maybe the intended 
>> variable was `desktop-save-mode' but that would be pretty useless 
>> here as far as I can see.)
>
>
> 'desktop-save-mode' is autoloaded, so you can always see its docs.  
> 'desktop-save' is not autoloaded, so it's not defined or documented 
> until you cause desktop.el to be loaded. 

Thanks, I missed that. But I think it is quite a bit confusing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* desktop-save
@ 2012-09-15  6:12 drain
  2012-09-15  8:34 ` desktop-save Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: drain @ 2012-09-15  6:12 UTC (permalink / raw)
  To: Help-gnu-emacs

Have any of you customized how Emacs saves / loads your sessions? If so, how
so?

Looking for ideas. 



--
View this message in context: http://emacs.1067599.n5.nabble.com/desktop-save-tp264127.html
Sent from the Emacs - Help mailing list archive at Nabble.com.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: desktop-save
  2012-09-15  6:12 desktop-save drain
@ 2012-09-15  8:34 ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2012-09-15  8:34 UTC (permalink / raw)
  To: drain; +Cc: Help-gnu-emacs


Am 15.09.2012 um 08:12 schrieb drain:

> Have any of you customized how Emacs saves / loads your sessions? If so, how
> so?
> 
> Looking for ideas. 
> 

(defconst mEV (emacs-version)
  "Keep the Emacs version string,
   which is needed a few times.")

(defconst mWS (symbol-value 'window-system)
  "Running as some windowing system's client,
   or as slave of a terminal emulator?")

(setq ETyp emacs-major-version)
  (message "Zeile  47 .emacs, ETyp ist %d" ETyp)

(if (not (symbolp 'user-emacs-directory))
  (defconst user-emacs-directory
    (if (eq system-type 'ms-dos)
        ;; MS-DOS cannot have initial dot.
        "~/_emacs.d/"
      "~/.emacs.d/")
    "Directory beneath which additional per-user Emacs-specific files are placed.
Various programs in Emacs store information in this directory.
Note that this should end with a directory separator."))
;; 1/4
(unless (string= "XEmacs" mEV)
;---   (desktop-load-default)
      (setq history-length 250)
      (setq desktop-globals-to-save '(desktop-missing-file-warning))
      (add-hook 'dired-mode-hook 'auto-revert-mode)
      (setq desktop-dirname (format "%sPDesktop-%d" user-emacs-directory ETyp))
      (setq desktop-base-lock-name (format ".emacs.desktop-%s.lock" window-system))
      (setq desktop-base-file-name (format "emacs.desktop-%s" window-system))
      (add-hook 'shell-mode-hook
	  (lambda ()
	    (setq histfile (format "history_%s" window-system))
	    (setq comint-input-ring-file-name
		  (expand-file-name histfile desktop-dirname))
	    (setq histfile (format "echo \"set histfile = %s\" > ~/.emacs_tcsh-init"
				   comint-input-ring-file-name))
	    (shell-command histfile)
	    (kill-buffer "*Shell Command Output*")
	    ))
      (require 'session)
      (add-hook 'after-init-hook 'session-initialize)
      (when (< 21 ETyp)
        (unless buffer-read-only
          (delete-trailing-whitespace)
	)
        (desktop-save-mode 1)
        (setq session-save-file-coding-system 'utf-8-unix))
      (setq session-save-file (format "%s/Psession-%s" desktop-dirname window-system))
      (setq custom-file (format "~/.emacs-Abrichtung-%d.el" ETyp))
      (setq desktop-path (list desktop-dirname))
      (load custom-file)
      (load (format "~/.emacs_%s" mWS))
      (add-hook 'before-save-hook 'time-stamp)
      (setq search-whitespace-regexp nil)
)

It is kind of practical for me, allowing me to have Emacsen of different versions and windowing systems, and each with its own "setup" (via different customisation files). I think the shell history is quite the same in all. My own variables are probably useless. I started to use them for other purposes first, but I think it should work without them.

--
Greetings

  Pete

The best way to accelerate a PC is 9.8 m/s²




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-15  8:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-11 23:30 desktop-save Lennart Borgman
     [not found] ` <42D31F5D.1080706@comcast.net>
2005-07-12  6:39   ` desktop-save Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2012-09-15  6:12 desktop-save drain
2012-09-15  8:34 ` desktop-save Peter Dyballa
     [not found] <mailman.1036402706.16169.help-gnu-emacs@gnu.org>
2002-11-06 15:54 ` desktop-save Sven Utcke
2002-11-04  9:25 desktop-save Dmitry Trunikov

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.