all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: emacsserver unstable?
       [not found] <mailman.3828.1185234040.32220.help-gnu-emacs@gnu.org>
@ 2007-07-24  7:48 ` Tassilo Horn
  2007-07-24  9:09   ` Sven Bretfeld
       [not found]   ` <mailman.3845.1185268221.32220.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Tassilo Horn @ 2007-07-24  7:48 UTC (permalink / raw)
  To: help-gnu-emacs

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)

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

* Re: emacsserver unstable?
  2007-07-24  7:48 ` emacsserver unstable? Tassilo Horn
@ 2007-07-24  9:09   ` Sven Bretfeld
       [not found]   ` <mailman.3845.1185268221.32220.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Sven Bretfeld @ 2007-07-24  9:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Tassilo

On Tue, Jul 24, 2007 at 09:48:16AM +0200, Tassilo Horn wrote:
> 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.

Thanks for the answer. But no, I have only one instance running. I
found out that it even happens when I'm not working at all. I restarted
the server yesterday night before I went to bed. My first Email today
(this one) again needed a restart.

I will see if your code changes anything. But I'm not
optimistic. Thank you very much anyway.

Is there a way to find out what happens to the server, maybe by way of
a protocol or a bug-tracer? I think the normal toggle-debug-on-error
won't work in this case.

Greetings,

Sven

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

* Re: emacsserver unstable?
       [not found]   ` <mailman.3845.1185268221.32220.help-gnu-emacs@gnu.org>
@ 2007-07-25  5:59     ` Stefan Monnier
  2007-07-26 13:26       ` Sven Bretfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2007-07-25  5:59 UTC (permalink / raw)
  To: help-gnu-emacs

> Thanks for the answer.  But no, I have only one instance running.  I found
> out that it even happens when I'm not working at all.  I restarted the
> server yesterday night before I went to bed.  My first Email today (this
> one) again needed a restart.

At this point, my best bet is that your system runs a daily script at night
that "cleans up" the /tmp area and ends up removing the emacs-server socket.


        Stefan

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

* Re: emacsserver unstable?
  2007-07-25  5:59     ` Stefan Monnier
@ 2007-07-26 13:26       ` Sven Bretfeld
  2007-07-26 15:10         ` [SOLVED] " Sven Bretfeld
  2007-07-26 18:27         ` Peter Dyballa
  0 siblings, 2 replies; 6+ messages in thread
From: Sven Bretfeld @ 2007-07-26 13:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hi to all

The problem is almost solved, I think. At least it is identified.

On Wed, Jul 25, 2007 at 01:59:13AM -0400, Stefan Monnier wrote:
> 
> At this point, my best bet is that your system runs a daily script at night
> that "cleans up" the /tmp area and ends up removing the emacs-server socket.

You are almost right. I found out that the connection to emacsserver
is disrupted exactly every full hour. At this time the timestamp of
the socket /tmp/emacs1000/server also changes. I have no idea how to
prevent the socket from being refreshed by this cronjob. I have to go
through the Debian cron manuals to find out.

As this problem may occur to other Debian users too, I will post the
solution when I have found it.

Thanks for all the help

Pete, I'm still brooding over your exam.

Sven


-- 
PS: Bitte schicken Sie mir reine Text-Nachrichten. Bitte schicken Sie
mir keine Word-, PowerPoint- oder Excel-Anhänge. Sehen Sie dazu bitte
auch http://www.gnu.org/philosophy/no-word-attachments.de.html.

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

* Re: [SOLVED] emacsserver unstable?
  2007-07-26 13:26       ` Sven Bretfeld
@ 2007-07-26 15:10         ` Sven Bretfeld
  2007-07-26 18:27         ` Peter Dyballa
  1 sibling, 0 replies; 6+ messages in thread
From: Sven Bretfeld @ 2007-07-26 15:10 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, Jul 26, 2007 at 03:26:01PM +0200, Sven Bretfeld wrote:
> You are almost right. I found out that the connection to emacsserver
> is disrupted exactly every full hour. At this time the timestamp of
> the socket /tmp/emacs1000/server also changes. I have no idea how to
> prevent the socket from being refreshed by this cronjob. I have to go
> through the Debian cron manuals to find out.

I have found the nasty cronjob. It's like so often: the user himself
is to blame. I have a user-cronjob running that extracts the
information of my Emacs todo-list and writes it info a file which is
in turn displayed on screen.

Idiot that I am, a wrote the script in a way that it evaluates my
complete .emacs, including (server-start). So the emacsserver never
gave up service. It was only started automatically by another Emacs
session, what, then, changed the socket and made it unavailable to the
older session.

Thanks for all the help,

Sven

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

* Re: emacsserver unstable?
  2007-07-26 13:26       ` Sven Bretfeld
  2007-07-26 15:10         ` [SOLVED] " Sven Bretfeld
@ 2007-07-26 18:27         ` Peter Dyballa
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-07-26 18:27 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: help-gnu-emacs


Am 26.07.2007 um 15:26 schrieb Sven Bretfeld:

> Pete, I'm still brooding over your exam.

May I motivate you by noting it's funny?

--
Mit friedvollen Grüßen
                                  <]
    Pete      o        __o         |__    o           recumbo
     ___o    /I       -\<,         |o \  -\),-%       ergo sum!
___/\ /\___./ \___...O/ O____.....`-O-'-()--o_________________

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

end of thread, other threads:[~2007-07-26 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.3828.1185234040.32220.help-gnu-emacs@gnu.org>
2007-07-24  7:48 ` emacsserver unstable? Tassilo Horn
2007-07-24  9:09   ` Sven Bretfeld
     [not found]   ` <mailman.3845.1185268221.32220.help-gnu-emacs@gnu.org>
2007-07-25  5:59     ` Stefan Monnier
2007-07-26 13:26       ` Sven Bretfeld
2007-07-26 15:10         ` [SOLVED] " Sven Bretfeld
2007-07-26 18:27         ` Peter Dyballa

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.