* Emacs server
@ 2012-02-17 9:16 Thorsten
2012-02-17 11:52 ` Peter Münster
0 siblings, 1 reply; 9+ messages in thread
From: Thorsten @ 2012-02-17 9:16 UTC (permalink / raw)
To: help-gnu-emacs
Hello list,
I try to run emacs24 as a server on ArchLinux, and it works with M-x
server-start inside a runnung emacs. When I start emacs with --daemon, I
receive the message that the daemon is started, and I see how the
load-files are loaded, and finally control is given back to the shell
process. However, emacsclient does not find a socket, and top doesn't
show an emacs process running.
Here are my start scripts:
daemon:
,-----------------------------------------------------------------------
| #!/bin/sh
| exec emacs --daemon=emacs1 -l ~/.emacs.d/emacs24-starter-kit/init.el
`-----------------------------------------------------------------------
client:
,---------------------
| #!/bin/sh
| exec emacsclient -c
`---------------------
What might be the problem?
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 9:16 Emacs server Thorsten
@ 2012-02-17 11:52 ` Peter Münster
2012-02-17 13:42 ` Thorsten
0 siblings, 1 reply; 9+ messages in thread
From: Peter Münster @ 2012-02-17 11:52 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, Feb 17 2012, Thorsten wrote:
> | exec emacs --daemon=emacs1 -l ~/.emacs.d/emacs24-starter-kit/init.el
> | exec emacsclient -c
Change server to "emacs --daemon -l ..." or
client to "emacsclient -s emacs1 -c ..."
(not both, exclusive or ;)
--
Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 11:52 ` Peter Münster
@ 2012-02-17 13:42 ` Thorsten
2012-02-17 14:04 ` Peter Münster
2012-02-21 2:53 ` Kevin Rodgers
0 siblings, 2 replies; 9+ messages in thread
From: Thorsten @ 2012-02-17 13:42 UTC (permalink / raw)
To: help-gnu-emacs
Peter Münster <pmlists@free.fr> writes:
> On Fri, Feb 17 2012, Thorsten wrote:
>
>> | exec emacs --daemon=emacs1 -l ~/.emacs.d/emacs24-starter-kit/init.el
>> | exec emacsclient -c
>
> Change server to "emacs --daemon -l ..." or
> client to "emacsclient -s emacs1 -c ..."
> (not both, exclusive or ;)
Thank, that does the job. One more related question: I like to have a
black background and white (or wheat) foreground (and I'm not such a fan
of the color-themes because of their generally weak contrasts). In an X
session, I would start emacs with -fg black and -bg wheat flags. In an
console session, this looks strange, but starting emacs without those
two flags already gives a black background and a white foreground.
Now - what can I do when I want to have only one emacs-server running
and start several emacsclients in the console as well as in the X
session? Is there a way to start different emacsclients with different
fg/bg colors without always changing the colors explicitly with M-x
set-{background, foreground}-color when switching between the clients?
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 13:42 ` Thorsten
@ 2012-02-17 14:04 ` Peter Münster
2012-02-17 14:20 ` Thorsten
2012-02-18 22:53 ` Thorsten
2012-02-21 2:53 ` Kevin Rodgers
1 sibling, 2 replies; 9+ messages in thread
From: Peter Münster @ 2012-02-17 14:04 UTC (permalink / raw)
To: help-gnu-emacs
On Fri, Feb 17 2012, Thorsten wrote:
> Is there a way to start different emacsclients with different fg/bg
> colors without always changing the colors explicitly with M-x
> set-{background, foreground}-color when switching between the clients?
Perhaps the variables `server-visit-hook' and `window-system can help'.
--
Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 14:04 ` Peter Münster
@ 2012-02-17 14:20 ` Thorsten
2012-02-18 22:53 ` Thorsten
1 sibling, 0 replies; 9+ messages in thread
From: Thorsten @ 2012-02-17 14:20 UTC (permalink / raw)
To: help-gnu-emacs
Peter Münster <pmlists@free.fr> writes:
> On Fri, Feb 17 2012, Thorsten wrote:
>
>> Is there a way to start different emacsclients with different fg/bg
>> colors without always changing the colors explicitly with M-x
>> set-{background, foreground}-color when switching between the clients?
>
> Perhaps the variables `server-visit-hook' and `window-system can
> help'.
That sounds very promising - thanks again for your help.
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 14:04 ` Peter Münster
2012-02-17 14:20 ` Thorsten
@ 2012-02-18 22:53 ` Thorsten
2012-02-19 13:31 ` Thorsten
1 sibling, 1 reply; 9+ messages in thread
From: Thorsten @ 2012-02-18 22:53 UTC (permalink / raw)
To: help-gnu-emacs
Peter Münster <pmlists@free.fr> writes:
> On Fri, Feb 17 2012, Thorsten wrote:
>
>> Is there a way to start different emacsclients with different fg/bg
>> colors without always changing the colors explicitly with M-x
>> set-{background, foreground}-color when switching between the clients?
>
> Perhaps the variables `server-visit-hook' and `window-system can
> help'.
'window-system seems to be deprecated in favor of 'display-graphic-p, no
problem. But where are the server hooks gone? I find references to
several server hooks on the web, but my emacs24 only returns one server
variable:
,------------
| server-mode
`------------
I used M-x apropo to look for a hooks - but no server-hooks among the
thousands of hooks.
Do I miss something, or are they simply gone? The `server-visit-hook
would serve me perfectly to solve my problem.
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-18 22:53 ` Thorsten
@ 2012-02-19 13:31 ` Thorsten
0 siblings, 0 replies; 9+ messages in thread
From: Thorsten @ 2012-02-19 13:31 UTC (permalink / raw)
To: help-gnu-emacs
Thorsten <quintfall@googlemail.com> writes:
> Peter Münster <pmlists@free.fr> writes:
>
>> On Fri, Feb 17 2012, Thorsten wrote:
>>
>>> Is there a way to start different emacsclients with different fg/bg
>>> colors without always changing the colors explicitly with M-x
>>> set-{background, foreground}-color when switching between the clients?
>>
>> Perhaps the variables `server-visit-hook' and `window-system can
>> help'.
>
>
> 'window-system seems to be deprecated in favor of 'display-graphic-p, no
> problem. But where are the server hooks gone? I find references to
> several server hooks on the web, but my emacs24 only returns one server
> variable:
>
> ,------------
> | server-mode
> `------------
>
>
> I used M-x apropo to look for a hooks - but no server-hooks among the
> thousands of hooks.
> Do I miss something, or are they simply gone? The `server-visit-hook
> would serve me perfectly to solve my problem.
I missed something essential - the server hooks only show up in the
system, when a server is running.
Sorry for the noise ...
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-17 13:42 ` Thorsten
2012-02-17 14:04 ` Peter Münster
@ 2012-02-21 2:53 ` Kevin Rodgers
2012-02-21 7:58 ` Thorsten
1 sibling, 1 reply; 9+ messages in thread
From: Kevin Rodgers @ 2012-02-21 2:53 UTC (permalink / raw)
To: help-gnu-emacs
On 2/17/12 6:42 AM, Thorsten wrote:
> Thank, that does the job. One more related question: I like to have a
> black background and white (or wheat) foreground (and I'm not such a fan
> of the color-themes because of their generally weak contrasts). In an X
> session, I would start emacs with -fg black and -bg wheat flags. In an
> console session, this looks strange, but starting emacs without those
> two flags already gives a black background and a white foreground.
>
> Now - what can I do when I want to have only one emacs-server running
> and start several emacsclients in the console as well as in the X
> session? Is there a way to start different emacsclients with different
> fg/bg colors without always changing the colors explicitly with M-x
> set-{background, foreground}-color when switching between the clients?
Does emacsclient handle the -name argument? If so, you can set up different
foreground/background pairs in ~/.Xdefaults with different instance names.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Emacs server
2012-02-21 2:53 ` Kevin Rodgers
@ 2012-02-21 7:58 ` Thorsten
0 siblings, 0 replies; 9+ messages in thread
From: Thorsten @ 2012-02-21 7:58 UTC (permalink / raw)
To: help-gnu-emacs
Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> On 2/17/12 6:42 AM, Thorsten wrote:
>> Thank, that does the job. One more related question: I like to have a
>> black background and white (or wheat) foreground (and I'm not such a fan
>> of the color-themes because of their generally weak contrasts). In an X
>> session, I would start emacs with -fg black and -bg wheat flags. In an
>> console session, this looks strange, but starting emacs without those
>> two flags already gives a black background and a white foreground.
>>
>> Now - what can I do when I want to have only one emacs-server running
>> and start several emacsclients in the console as well as in the X
>> session? Is there a way to start different emacsclients with different
>> fg/bg colors without always changing the colors explicitly with M-x
>> set-{background, foreground}-color when switching between the clients?
>
> Does emacsclient handle the -name argument? If so, you can set up
> different
> foreground/background pairs in ~/.Xdefaults with different instance names.
Yes
"The emacsclient program can specify a server by name, using the -s
option"
Since I want only one server instance running, you mean I could define
alias-names that point to the same server, but set up different fg/bg
colors?
I would not know how to do this.
I already solved the color-problem using the server-visit-hook and
display-graphic-p predicate.
I still have some problems to gracefully exit my "1 server, many
(terminal and X11) clients" setup. When I use 'C-x #' to close unused
emacsclients in the X11 and return to my terminal session, all my
emacsclients there are killed too - very inconvenient. And when I
finally kill the emacs-daemon with 'M-x kill-emacs', I'm asked at the
next start-up if I want to recover the crashed session. But I don't want
to crash emacs on exit, I want to shut it down in a controlled and
civilized manner.
cheers
--
Thorsten
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-02-21 7:58 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-17 9:16 Emacs server Thorsten
2012-02-17 11:52 ` Peter Münster
2012-02-17 13:42 ` Thorsten
2012-02-17 14:04 ` Peter Münster
2012-02-17 14:20 ` Thorsten
2012-02-18 22:53 ` Thorsten
2012-02-19 13:31 ` Thorsten
2012-02-21 2:53 ` Kevin Rodgers
2012-02-21 7:58 ` Thorsten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).