[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacsserver unstable?
From: |
Tassilo Horn |
Subject: |
Re: emacsserver unstable? |
Date: |
Tue, 24 Jul 2007 09:48:16 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) |
Sven Bretfeld <sven.bretfeld@gmx.ch> writes:
Hi Sven,
> I never close Emacs, but I'm working heavily with AucTeX and shell
> buffers. Is it possible that I unconsciously close the server by some
> operation? Or is it generally unstable?
No, at least here it runs fine. Maybe you start another emacs instance
sometimes? This will make the former server unavailable and if you close
the server you have none at all. To prevent that I use this code in my
~/.emacs which uses a lock file so that only the first instance acts as
server.
,----[ ~/.emacs ]
| (defparameter th-server-lock-file "~/.emacs.d/server.lock"
| "Emacs server lock file.")
|
| (defun th-server-start ()
| (interactive)
| (shell-command (concat "touch " th-server-lock-file))
| (server-start)
| (message "Emacs Server started...")
| ;; Titel
| (setq frame-title-format
| '("Emacs (Server): %b")))
|
| ;; Emacs-server nur dann starten, wenn noch kein anderer gestartet wurde.
| (if (and (not (file-exists-p th-server-lock-file))
| (not noninteractive))
| (th-server-start)
| (message "Emacs Server NOT started, because lockfile exists.")
| (setq frame-title-format
| '("Emacs: %b")))
|
| (defun th-server-remove-lock-file ()
| (interactive)
| (when (boundp 'server-process)
| (shell-command (concat "rm " th-server-lock-file))))
|
| ;; Beim Beenden der Server-Instanz das Lockfile löschen.
| (add-hook 'kill-emacs-hook
| 'th-server-remove-lock-file)
`----
Bye,
Tassilo
--
No person, no idea, and no religion deserves to be illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)
- Re: emacsserver unstable?, (continued)
- Re: emacsserver unstable?, Sven Bretfeld, 2007/07/24
- Re: emacsserver unstable?, Peter Dyballa, 2007/07/24
- Re: emacsserver unstable?, Sven Bretfeld, 2007/07/25
- Re: emacsserver unstable?, Sven Bretfeld, 2007/07/25
- Re: emacsserver unstable?, Sven Bretfeld, 2007/07/25
- Message not available
- Re: emacsserver unstable?, Tassilo Horn, 2007/07/26
Re: emacsserver unstable?,
Tassilo Horn <=