all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacsserver unstable?
@ 2007-07-23 23:40 Sven Bretfeld
  2007-07-24 13:44 ` Sven Bretfeld
       [not found] ` <mailman.3864.1185284692.32220.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-23 23:40 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Emacsers

Since today I'm using (server-start) in my .emacs to use Emacs as
editor for Mutt. Every few hours Mutt fails to hand over an email to
emacsclient. It's working again only after I restart the server
manually. The messages-buffer doesn't mention any breakdown of the
server.

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? 

I'm using the Debian-snapshot with the current version 22.1.50.1 on
Debian Etch. 

Has anybody experienced anything similar and knows a workaround?

Greetings,

Sven

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

* 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; 20+ 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] 20+ messages in thread

* Re: emacsserver unstable?
  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>
  1 sibling, 0 replies; 20+ 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] 20+ messages in thread

* Re: emacsserver unstable?
  2007-07-23 23:40 emacsserver unstable? Sven Bretfeld
@ 2007-07-24 13:44 ` Sven Bretfeld
       [not found] ` <mailman.3864.1185284692.32220.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-24 13:44 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Jul 24, 2007 at 01:40:16AM +0200, Sven Bretfeld wrote:
> Hi Emacsers
> 
> Since today I'm using (server-start) in my .emacs to use Emacs as
> editor for Mutt. Every few hours Mutt fails to hand over an email to
> emacsclient. It's working again only after I restart the server
> manually. The messages-buffer doesn't mention any breakdown of the
> server.

Is it perhaps possible to restart the server automatically every, say,
15 minutes? I have no idea how to do it, and what possible side
effects this could have. 

Does anybody know how this could be achieved?

Greetings,

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] 20+ messages in thread

* Re: emacsserver unstable?
       [not found] ` <mailman.3864.1185284692.32220.help-gnu-emacs@gnu.org>
@ 2007-07-24 15:05   ` Tassilo Horn
  2007-07-24 16:08     ` Sven Bretfeld
  0 siblings, 1 reply; 20+ messages in thread
From: Tassilo Horn @ 2007-07-24 15:05 UTC (permalink / raw)
  To: help-gnu-emacs

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

Hi Sven,

> Is it perhaps possible to restart the server automatically every, say,
> 15 minutes?

It should be possible. See

,----[ C-h f run-with-timer RET ]
| run-with-timer is an interactive compiled Lisp function in `timer.el'.
| (run-with-timer SECS REPEAT FUNCTION &rest ARGS)
| 
| Perform an action after a delay of SECS seconds.
| Repeat the action every REPEAT seconds, if REPEAT is non-nil.
| SECS and REPEAT may be integers or floating point numbers.
| The action is to call FUNCTION with arguments ARGS.
| 
| This function returns a timer object which you can use in
| `cancel-timer'.
`----

> I have no idea how to do it, and what possible side effects this could
> have.

I wouldn't do it. When you edit a file with emacsclient while the server
restarts, you'll lose the connection, I think, which probably asks for
troubles.

Bye,
Tassilo
-- 
It  is  said that  looking  into Chuck  Norris'  eyes  will reveal  your
future. Unfortunately, everybody's future is always the same: death by a
roundhouse-kick to the face.

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

* Re: emacsserver unstable?
  2007-07-24 15:05   ` Tassilo Horn
@ 2007-07-24 16:08     ` Sven Bretfeld
  2007-07-24 17:44       ` Peter Dyballa
  0 siblings, 1 reply; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-24 16:08 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Tassilo

On Tue, Jul 24, 2007 at 05:05:48PM +0200, Tassilo Horn wrote:
 
> I wouldn't do it. When you edit a file with emacsclient while the server
> restarts, you'll lose the connection, I think, which probably asks for
> troubles.

You are right. The frame of the Client shuts down when the restart
happens. *Sigh* I'm slowly running out of options. Best would be to
install a stable Emacs 22.1 instead of the Snapshot.

Greetings,

Sven

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

* Re: emacsserver unstable?
  2007-07-24 16:08     ` Sven Bretfeld
@ 2007-07-24 17:44       ` Peter Dyballa
  2007-07-24 19:08         ` Sven Bretfeld
  2007-07-25 13:43         ` Sven Bretfeld
  0 siblings, 2 replies; 20+ messages in thread
From: Peter Dyballa @ 2007-07-24 17:44 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: help-gnu-emacs


Am 24.07.2007 um 18:08 schrieb Sven Bretfeld:

> Best would be to install a stable Emacs 22.1 instead of the Snapshot.

I wouldn't think so. On Mac OS X I am always working in such  
snapshots from CVS. They work. And they make me happy when they allow  
me to report a bug!

Can you try to minimise your user init file, ~/.emacs or such? Could  
be there is some code that causes the error you see ...

How many executables of emacsclient do you have on disk? Which one is  
found and actually executed? Can you use ps or pstree to exactly find  
out which one is running and then dying? Do you have LD_LIBRARY or  
such environment variables set? Could be they have in an interactive  
session a different effect than in tool launched by so gadgetry. lsof  
can exactly show which shared library files are used in some process.

--
Mit friedvollen Grüßen

   Pete

Irgendwer sollte den Kugelschreiber mit einem Kleiderbügel kreuzen,  
dass die Kulis sich vermehren, statt stets nur zu verschwinden!

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

* Re: emacsserver unstable?
  2007-07-24 17:44       ` Peter Dyballa
@ 2007-07-24 19:08         ` Sven Bretfeld
  2007-07-24 20:22           ` Peter Dyballa
  2007-07-25 13:43         ` Sven Bretfeld
  1 sibling, 1 reply; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-24 19:08 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Pete

On Tue, Jul 24, 2007 at 07:44:02PM +0200, Peter Dyballa wrote:
 
> Can you try to minimise your user init file, ~/.emacs or such? Could  
> be there is some code that causes the error you see ...

That's an idea. I will try what happens if I reduce the init file to
the necessities needed for Mutt.
> 
> How many executables of emacsclient do you have on disk? 

Only one file is found by locate:

sven@kamaloka:/usr/bin$ ls -l emacsclient.emacs-snapshot
-rwxr-xr-x 1 root root 11608 2007-07-01 20:05
emacsclient.emacs-snapshot

There are two softlinks pointing to this executable:

sven@kamaloka:/usr/bin$ ls -l emacsclient
lrwxrwxrwx 1 root root 29 2007-05-22 02:21 emacsclient ->
/etc/alternatives/emacsclient

sven@kamaloka:/etc/alternatives$ ls -l emacsclient
lrwxrwxrwx 1 root root 35 2007-07-04 23:17 emacsclient ->
/usr/bin/emacsclient.emacs-snapshot

> Which one is found and actually executed? Can you use ps or pstree
> to exactly find out which one is running and then dying?

It can only be /usr/bin/emacsclient.emacs-snapshot. While I'm writing
this Mail in a frame created by emacsclient, ps gives:

sven@kamaloka:/usr/bin$ ps aux | grep emacsclient
sven      8666  0.0  0.0   1572   424 pts/4    S+   20:14   0:00
emacsclient /home/sven/tmp/mutt/mutt-kamaloka-1000-3486-276

which doesn't say much, I think.

> Do you have LD_LIBRARY or such environment variables set? Could be
> they have in an interactive session a different effect than in tool
> launched by so gadgetry. lsof can exactly show which shared library
> files are used in some process.

Hm. At least not in my .bashrc. I'm not familiar with libraries,
sorry. The only help I knew after Google returned unintelligible
information on LD_LIBRARY, was to search for it with apt-utils-search,
to find out that none of the resulting packages is installed on my
system. 

By the way, the emacsserver seems to die only when it has no
clients. I'm sitting on this email since half an hour now. When the
server is idle, it would have given up service in the meantime.But
that was to be expected, I think.

Next thing I do, is to reduce my .emacs. I will report then.

Greetings,

Sven

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

* Re: emacsserver unstable?
  2007-07-24 19:08         ` Sven Bretfeld
@ 2007-07-24 20:22           ` Peter Dyballa
  2007-07-24 21:46             ` Lennart Borgman (gmail)
  2007-07-24 22:01             ` Sven Bretfeld
  0 siblings, 2 replies; 20+ messages in thread
From: Peter Dyballa @ 2007-07-24 20:22 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: help-gnu-emacs


Am 24.07.2007 um 21:08 schrieb Sven Bretfeld:

> There are two softlinks pointing to this executable:

Softlinks are found in men's trousers. You probably mean symbolic  
links ...

>
> sven@kamaloka:/usr/bin$ ps aux | grep emacsclient

There are more options to ps. Some can make ps to display the path  
name of a command, or the environment in which the command runs. From  
the listed PATH value you can determine which file 'command' is.

Have you thought of a ps alias like: 'ps <options> | egrep UID\|!:1 |  
grep -v grep' for (t)csh or 'ps <options> | egrep UID\|${1} | grep -v  
grep' ?

>
>> Do you have LD_LIBRARY or such environment variables set? Could be
>> they have in an interactive session a different effect than in tool
>> launched by so gadgetry. lsof can exactly show which shared library
>> files are used in some process.
>
> Hm. At least not in my .bashrc. I'm not familiar with libraries,
> sorry. The only help I knew after Google returned unintelligible
> information on LD_LIBRARY, was to search for it with apt-utils-search,
> to find out that none of the resulting packages is installed on my
> system.

Again, ps -e or such would show the process environment in which  
command runs – can be a few thousand columns wide!

lsof is a nice tool. It can be used as 'lsof emacs' or 'lsof -p <pid>'

>
> By the way, the emacsserver seems to die only when it has no
> clients.

The communication works over a "socket" in the /tmp tree (lsof should  
list it). Have you set network layer to close a socket after some  
time? Or is there a cron job running that removes everything elder  
than a few minutes from the /tmp tree?

--
Mit friedvollen Grüßen

   Pete

Think of XML as Lisp for COBOL programmers.
                               -- Tony-A (some guy on /.)

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

* Re: emacsserver unstable?
  2007-07-24 20:22           ` Peter Dyballa
@ 2007-07-24 21:46             ` Lennart Borgman (gmail)
  2007-07-24 21:50               ` Peter Dyballa
  2007-07-24 22:01             ` Sven Bretfeld
  1 sibling, 1 reply; 20+ messages in thread
From: Lennart Borgman (gmail) @ 2007-07-24 21:46 UTC (permalink / raw)
  To: Peter Dyballa; +Cc: help-gnu-emacs

Peter Dyballa wrote:
> 
> Am 24.07.2007 um 21:08 schrieb Sven Bretfeld:
> 
>> There are two softlinks pointing to this executable:
> 
> Softlinks are found in men's trousers. You probably mean symbolic links ...

Wonder what all those companies with "softlink" in their names does then?

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

* Re: emacsserver unstable?
  2007-07-24 21:46             ` Lennart Borgman (gmail)
@ 2007-07-24 21:50               ` Peter Dyballa
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Dyballa @ 2007-07-24 21:50 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: help-gnu-emacs


Am 24.07.2007 um 23:46 schrieb Lennart Borgman (gmail):

> Peter Dyballa wrote:
>> Am 24.07.2007 um 21:08 schrieb Sven Bretfeld:
>>> There are two softlinks pointing to this executable:
>> Softlinks are found in men's trousers. You probably mean symbolic  
>> links ...
>
> Wonder what all those companies with "softlink" in their names does  
> then?

Can you give some interesting examples?

--
Greetings

   Pete

Windows, c'est un peu comme le beaujolais nouveau: à chaque nouvelle  
cuvée on sait que ce sera dégueulasse, mais on en prend quand même,  
par masochisme.

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

* Re: emacsserver unstable?
  2007-07-24 20:22           ` Peter Dyballa
  2007-07-24 21:46             ` Lennart Borgman (gmail)
@ 2007-07-24 22:01             ` Sven Bretfeld
  2007-07-24 22:47               ` Peter Dyballa
  1 sibling, 1 reply; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-24 22:01 UTC (permalink / raw)
  To: help-gnu-emacs

Hello Pete

On Tue, Jul 24, 2007 at 10:22:58PM +0200, Peter Dyballa wrote:

> >There are two softlinks pointing to this executable:
> 
> Softlinks are found in men's trousers. You probably mean symbolic  
> links ...

Hehehe. What, then, is a hardlink? I'm using them for storing my
backups with rsync. Oh my god. Is it illegal?
 
> >
> >sven@kamaloka:/usr/bin$ ps aux | grep emacsclient
> 
> There are more options to ps. Some can make ps to display the path  
> name of a command, or the environment in which the command runs. From  
> the listed PATH value you can determine which file 'command' is.
> 
> Have you thought of a ps alias like: 'ps <options> | egrep UID\|!:1 |  
> grep -v grep' for (t)csh or 'ps <options> | egrep UID\|${1} | grep -v  
> grep' ?

I see, this will be my initiation to a higher level of knowing my
computer. Thanks for the information. I will store them and work them
through. 

In the meantime it seems that some code of my .emacs causes the
problem. I have reduced it to only the lines connected to the use with
Mutt. Then it worked perfectly for an hour with no further crashes of
the server. Now I'm gradually building the file up again to identify
the evil lines. I will give report.

Thanks,

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] 20+ messages in thread

* Re: emacsserver unstable?
  2007-07-24 22:01             ` Sven Bretfeld
@ 2007-07-24 22:47               ` Peter Dyballa
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Dyballa @ 2007-07-24 22:47 UTC (permalink / raw)
  To: Sven Bretfeld; +Cc: help-gnu-emacs


Am 25.07.2007 um 00:01 schrieb Sven Bretfeld:

> What, then, is a hardlink?

In MS-DOS it's a cross-referenced file => damaged file system.

In a UNIX file system (ufs, or BSD Fast File System) a file can be  
one or a whole series of blocks on a disk in one file system. These  
can be addressed from one single "inode" (member of a directory  
structure) or more than one inode. On the same volume/partition/slice  
one file can be referenced from more than one directory, i.e. it  
seems to exist more than once. There is no original. The ls command  
shows a link count (3 in this example), and also an inode number  
(9099707):

	9099707 -rw-r--r--   3 pete  admin  123 25 Jul 00:17 drei
	9099707 -rw-r--r--   3 pete  admin  123 25 Jul 00:17 eins
	9099707 -rw-r--r--   3 pete  admin  123 25 Jul 00:17 zwei

No hard link consumes any disk space. It is restricted to the same  
file system. When you need a link to a file in another file system,  
it has to be a symbolic link. This one is kind of a regular file  
which passes every access to the file it points to. A sym-link costs  
as many bytes disk space as the pointer is long (plus the inode entry):

	9099811 lrwxr-xr-x   1 pete  admin   72 25 Jul 00:17 sym-link -> / 
usr/local/texlive/2007/texmf-dist/fonts/type1/public/archaic/linb10.pfb
	pete 165 /\ echo -n /usr/local/texlive/2007/texmf-dist/fonts/type1/ 
public/archaic/linb10.pfb | wc -c
	      72

Sym-links can also point to files on another computer. The target to  
which a sym-link points does not necessarily need to exist. When you  
remove a sym-link, only the sym-link file is removed (the target can  
continue to exist or not-exist as before). When you remove (or  
unlink) a file with a (hard) link count of 1, some disk space is  
freed and the last link to the block(s) that built the disk space of  
a file, is wiped out, data is lost, the file gone.

Question: what happens when you create a hard link to a symbolic link  
that has its target a) in the same file system, b) in another file  
system?

--
Greetings

   Pete

"If builders built buildings the way programmers write programs, then  
the first woodpecker that came along would destroy civilization."
                                  -- Weinberg's Second Law

^ permalink raw reply	[flat|nested] 20+ 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; 20+ 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] 20+ messages in thread

* Re: emacsserver unstable?
  2007-07-24 17:44       ` Peter Dyballa
  2007-07-24 19:08         ` Sven Bretfeld
@ 2007-07-25 13:43         ` Sven Bretfeld
  2007-07-25 15:13           ` Sven Bretfeld
                             ` (2 more replies)
  1 sibling, 3 replies; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-25 13:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Jul 24, 2007 at 07:44:02PM +0200, Peter Dyballa wrote:

> Can you try to minimise your user init file, ~/.emacs or such? Could  
> be there is some code that causes the error you see ...

Prepare for the hammer! The issue is in fact related to some code
lines in my init file, not to any cronjob or library on my
system. It's something nobody would probably have expected and it
twists my mind.

The dying of the server seems to depend on the interplay of two
definitions in my .emacs. I will call them code A and code B for
explanation (it's only phenomenology, since I cannot explain what
causes the problem):

Code A:

;; color-theme-------------------------
     (require 'color-theme)
     (color-theme-calm-forest)
;;-------------------------------------

Code B:

;; geometry of frames------------------
(setq default-frame-alist (append (list
  '(width  . 82)
  '(height . 45))
  default-frame-alist))

(add-to-list
  'default-frame-alist
  '(font  . "-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1"))
;;-------------------------------------

What happens is as follows:

- If both codes are on:
  Emacsserver dies after some minutes. I don't
  know when exactly this happens. It seems to be a matter of time, not
  a matter of doing anything. But it's hard to say. Phenomenologically:
  I start Emacs. I change to Mutt (which runs on a different virtual
  desktop) and prepare to compose an email. Emacsclient starts a new
  frame on that virtual desktop with Mutt-mode (same size and color as
  the initial frame, all other buffers of the session are
  accessible). After composing the message I hit C-c C-c and return to
  Mutt to send it. Thereafter, I'm working again on some LaTeX stuff
  in the initial frame. Compose a message again after some
  minutes. Working. Again LaTeX stuff. Again trying to send an
  Email. No frame is started, no Emacsclient available!

- If only Code A is on (Code B commented):
  The initial frame starts a little smaller. Not a problem, I can
  maximize the frame. But, when I start to compose a message from
  Mutt, the new frame is much too small (about half the geometry of the
  initial frame) and with a much smaller font. Too small to work
  with (that's why I inserted code B at all). But emacsserver seems to
  be stable.

- If only Code B is on (Code A commented):
  This is the worst version. Emacsserver seems to be stable, but
  (apart from not having my beloved colors) a strange behavior occurs
  with the fonts. And this really upsets me because I don't know
  why and it didn't happen before I discovered the color-theme half a
  year ago. I often use characters with uncommon accents, for example an n
  with dot above (341797, #o1233445, #x53725, U+1E45). Without the
  color theme newly inserted occurrences of these characters come in
  adobe-helvetica, not in adobe-courier (which is my standard
  font). Older occurrences of these characters are displayed as
  normal. It looks very ugly of course. How can this happen?
  Adobe-courier is defined via customize my standard-font. Nowhere
  have I defined adobe-helvetica. There are font-definitions in
  color-theme.el but this behavior, however, occurs when the
  color-themes are off. Where is the conflict?

- If both codes are commented:
  Same as the previous. Only a smaller initial frame.

What can we make out of this? The font problem, I feel, is
interrelated with the server-problem. Something seems to be in
conflict, but I cannot figure it out.

If someone is inclined to help me figuring out my problem, it might be
best to attach the relevant parts of my .emacs down below.

Please excuse the length of my posting and the ignorance displayed in
it.

Help is much welcome.

Greetings,

Sven

;;;;;;;;;;;~/.emacs

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(case-fold-search t)
 '(current-language-environment "UTF-8")
 '(default-input-method "rfc1345")
 '(delete-selection-mode nil nil (delsel))
 '(global-font-lock-mode t nil (font-lock))
 '(scroll-bar-mode (quote right))
 '(show-paren-mode t nil (paren))
 '(transient-mark-mode t))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:stipple nil :background "#ffffff" :foreground "#000000" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 200 :width normal :family "adobe-courier")))))

;;-----------------------------------------------------------------
;; color-theme
;;-----------------------------------------------------------------
     (require 'color-theme)
;     (color-theme-gnome2)
     (color-theme-calm-forest)
;      (color-theme-dark-blue)
;     (color-theme-dark-blue2)
;      (color-theme-deep-blue)
;     (color-theme-subtle-hacker)

;;----------------------------------------------------------------------
;; Grösse des Frames beim Starten
;;----------------------------------------------------------------------

(setq default-frame-alist (append (list
  '(width  . 82)
  '(height . 45))
  default-frame-alist))

(add-to-list
  'default-frame-alist
  '(font  . "-Adobe-Courier-Medium-R-Normal--24-240-75-75-M-150-ISO8859-1"))

;;-----------------------------------------------------------------
;; Emacs und Mutt
;;-----------------------------------------------------------------

;; Start emacsclient in its own frame------------------------------
  (add-hook 'server-switch-hook
              (lambda nil
                (let ((server-buf (current-buffer)))
                  (bury-buffer)
                  (switch-to-buffer-other-frame server-buf))))

  (add-hook 'server-done-hook 'delete-frame)
  (add-hook 'server-done-hook (lambda nil (kill-buffer nil)))

;; When in Terminal------------------------------------------------
(when (not window-system)
  (set-keyboard-coding-system locale-coding-system)
  (set-terminal-coding-system locale-coding-system)
  (color-theme-emacs-nw)
)

;; mutt-mode-------------------------------------------------------
(setq load-path (cons "~/elisp/mutt" load-path))
(require 'mutt)
(add-to-list 'auto-mode-alist '("mutt-kamaloka.dhatu" . mutt-mode))
(push '(".*/tmp/mutt.*\\'" . mutt-mode) auto-mode-alist)

;;-----------------------------------------------------------------
;; Start emacsserver
;;-----------------------------------------------------------------
(server-start)

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

* Re: emacsserver unstable?
  2007-07-25 13:43         ` Sven Bretfeld
@ 2007-07-25 15:13           ` Sven Bretfeld
  2007-07-25 23:43           ` Sven Bretfeld
       [not found]           ` <mailman.3990.1185406991.32220.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-25 15:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Jul 25, 2007 at 03:43:52PM +0200, Sven Bretfeld wrote:
> - If only Code B is on (Code A commented):
>   This is the worst version. Emacsserver seems to be stable, but
>   (apart from not having my beloved colors) a strange behavior occurs
>   with the fonts. And this really upsets me because I don't know
>   why and it didn't happen before I discovered the color-theme half a
>   year ago. I often use characters with uncommon accents, for example an n
>   with dot above (341797, #o1233445, #x53725, U+1E45). Without the
>   color theme newly inserted occurrences of these characters come in
>   adobe-helvetica, not in adobe-courier (which is my standard
>   font). Older occurrences of these characters are displayed as
>   normal. It looks very ugly of course. How can this happen?
>   Adobe-courier is defined via customize my standard-font. Nowhere
>   have I defined adobe-helvetica. There are font-definitions in
>   color-theme.el but this behavior, however, occurs when the
>   color-themes are off. Where is the conflict?

Ok. After systematically rebuilding my .emacs I found out that the
font problem depends on flyspell. When it is turned on (I have it as
mode-hooks for TeX and Email), the font switch occurs. But only when
the color-theme is NOT loaded. Why? I don't know.

Greetings,

Sven

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

* Re: emacsserver unstable?
  2007-07-25 13:43         ` Sven Bretfeld
  2007-07-25 15:13           ` Sven Bretfeld
@ 2007-07-25 23:43           ` Sven Bretfeld
       [not found]           ` <mailman.3990.1185406991.32220.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 20+ messages in thread
From: Sven Bretfeld @ 2007-07-25 23:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Jul 25, 2007 at 03:43:52PM +0200, Sven Bretfeld wrote:
> On Tue, Jul 24, 2007 at 07:44:02PM +0200, Peter Dyballa wrote:
> 
> > Can you try to minimise your user init file, ~/.emacs or such? Could  
> > be there is some code that causes the error you see ...
> 
> The dying of the server seems to depend on the interplay of two
> definitions in my .emacs. I will call them code A and code B for
> explanation

That's nonsense. I haven't tried long enough. Sorry for this
dead-end. 

After having worked without sourcing a personal init file at all, the
server died anyway after a while. Now I have employed a workaround
with a shellscript that starts a new Emacs session if the server is
not available.

Next week, when my holidays end, I try the same on the Computer in my
office which has an identical setup with the exception that it runs
Emacs 21. 

Greetings, 

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] 20+ messages in thread

* Re: emacsserver unstable?
       [not found]           ` <mailman.3990.1185406991.32220.help-gnu-emacs@gnu.org>
@ 2007-07-26  8:22             ` Tassilo Horn
  0 siblings, 0 replies; 20+ messages in thread
From: Tassilo Horn @ 2007-07-26  8:22 UTC (permalink / raw)
  To: help-gnu-emacs

Sven Bretfeld <sven.bretfeld@gmx.ch> writes:

Hi Sven,

> Now I have employed a workaround with a shellscript that starts a new
> Emacs session if the server is not available.

You don't need a shell script to do that.

    emacsclient --alternate-editor emacs +%d %s

should do the trick.

Bye,
Tassilo
-- 
In ancient  China there is a  legend that one  day a child will  be born
from a dragon, grow  to be a man, and vanquish evil  from the land. That
man is not Chuck Norris, because Chuck Norris killed that man.

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

* Re: emacsserver unstable?
  2007-07-25  5:59     ` Stefan Monnier
@ 2007-07-26 13:26       ` Sven Bretfeld
  2007-07-26 18:27         ` Peter Dyballa
  0 siblings, 1 reply; 20+ 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] 20+ messages in thread

* Re: emacsserver unstable?
  2007-07-26 13:26       ` Sven Bretfeld
@ 2007-07-26 18:27         ` Peter Dyballa
  0 siblings, 0 replies; 20+ 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] 20+ messages in thread

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

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-23 23:40 emacsserver unstable? Sven Bretfeld
2007-07-24 13:44 ` Sven Bretfeld
     [not found] ` <mailman.3864.1185284692.32220.help-gnu-emacs@gnu.org>
2007-07-24 15:05   ` Tassilo Horn
2007-07-24 16:08     ` Sven Bretfeld
2007-07-24 17:44       ` Peter Dyballa
2007-07-24 19:08         ` Sven Bretfeld
2007-07-24 20:22           ` Peter Dyballa
2007-07-24 21:46             ` Lennart Borgman (gmail)
2007-07-24 21:50               ` Peter Dyballa
2007-07-24 22:01             ` Sven Bretfeld
2007-07-24 22:47               ` Peter Dyballa
2007-07-25 13:43         ` Sven Bretfeld
2007-07-25 15:13           ` Sven Bretfeld
2007-07-25 23:43           ` Sven Bretfeld
     [not found]           ` <mailman.3990.1185406991.32220.help-gnu-emacs@gnu.org>
2007-07-26  8:22             ` Tassilo Horn
     [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>
2007-07-25  5:59     ` Stefan Monnier
2007-07-26 13:26       ` 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.