Your bug report will be posted to the emacs-pr...@gnu.org mailing list.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I'd like to start an emacs daemon on startup in a runlevel script. So I
added
su --login --command 'emacs --daemon' horn
but that doesn't start a daemon. So I tried issuing
emacs --daemon
or
emacs -Q --daemon
on a login shell, but that returns instantly and doesn't start an emacs
daemon, too. Running inside gdb only says "Program exited normally."
When issuing the same commands inside a X terminal emulator they work as
they should, though.
What's going wrong?
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/23.0.60/etc/DEBUG for instructions.
In GNU Emacs 23.0.60.1 (x86_64-pc-linux-gnu, GTK+ Version 2.12.12)
of 2008-09-23 on thinkpad
Windowing system distributor `The X.Org Foundation', version 11.0.10500000
configured using `configure '--prefix=/usr' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libdir=/usr/lib64' '--program-suffix=-emacs-23' '--infodir=/usr/share/info/emacs-23' '--with-sound' '--with-x' '--with-toolkit-scroll-bars' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xpm' '--with-freetype' '--with-xft' '--with-libotf' '--with-m17n-flt' '--with-x-toolkit=gtk' '--without-hesiod' '--with-kerberos' '--with-kerberos5' '--with-gpm' '--with-dbus' '--build=x86_64-pc-linux-gnu' 'build_alias=x86_64-pc-linux-gnu' 'host_alias=x86_64-pc-linux-gnu' 'CFLAGS=-g -ggdb -O1 -pipe' 'LDFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default-enable-multibyte-characters: t
Major mode: Group
Minor modes in effect:
gnus-topic-mode: t
gnus-undo-mode: t
yas/minor-mode: t
shell-dirtrack-mode: t
recentf-mode: t
window-number-meta-mode: t
window-number-mode: t
savehist-mode: t
exec-abbrev-cmd-mode: t
show-paren-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
M-x g <return> <return> <escape> <escape> <escape>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <return> y SPC <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> SPC <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> SPC <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <return>
<return> <return> <return> <return> <return> <backspace>
^ c <return> SPC SPC c M-x r e b <return> <right>
<return>
Recent messages:
20080923T210621.222> Fetching headers for nnimap+Fastmail:INBOX.mailinglists.emacs-devel...
20080923T210621.288> Fetching headers for nnimap+Fastmail:INBOX.mailinglists.emacs-devel...done
20080923T210621.347> Scoring...
20080923T210621.351> Scoring...done
20080923T210621.354> Generating summary...
20080923T210621.364> Generating summary...done
20080923T210646.338> Exiting summary buffer and applying spam rules
20080923T210646.366> nnimap: Setting marks in INBOX.mailinglists.emacs-devel...
20080923T210646.495> nnimap: Setting marks in INBOX.mailinglists.emacs-devel...done
Repeating command self-insert-command
> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
>
> Your bug report will be posted to the emacs-pr...@gnu.org mailing list.
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
> I'd like to start an emacs daemon on startup in a runlevel script. So I
> added
>
> su --login --command 'emacs --daemon' horn
>
> but that doesn't start a daemon. So I tried issuing
>
> emacs --daemon
>
> or
>
> emacs -Q --daemon
>
> on a login shell, but that returns instantly and doesn't start an emacs
> daemon, too. Running inside gdb only says "Program exited normally."
>
> When issuing the same commands inside a X terminal emulator they work as
> they should, though.
Thanks. I checked in a fix, can you please try again?
Hi Dan!
> > I'd like to start an emacs daemon on startup in a runlevel script. So I
> > added
> >
> > su --login --command 'emacs --daemon' horn
> >
> > but that doesn't start a daemon. So I tried issuing
> >
> > emacs --daemon
> >
> > or
> >
> > emacs -Q --daemon
> >
> > on a login shell, but that returns instantly and doesn't start an emacs
> > daemon, too. Running inside gdb only says "Program exited normally."
> >
> > When issuing the same commands inside a X terminal emulator they work as
> > they should, though.
>
> Thanks. I checked in a fix, can you please try again?
Yes, it works now. Thanks a lot.
But I have two additional questions.
1) How do I shutdown the emacs server cleanly?
IMO there should be some --kill-daemon option so that it can really be
integrated as a system service. Then of course there's the question
what to do if unsaved buffers and running processes exist, where I
don't have a good answer now. Maybe killing processes unconditionally
and saving files as #<filerame>#. Unsaved buffers could be saved as
~/.emacs.d/unsaved-buffers/<buffername>.
2) In my .emacs I have (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)).
But when I start emacsclient -c the first time, it has a toolbar,
although the value of `tool-bar-mode' is nil. Then I have to toggle
t-b-m twice, and from there on it's disabled for the current and all
new frames. I disable the scroll- and menu-bars the same way, and
they are disabled directly, e.g. even for the first X frame.
Bye,
Tassilo
> Dan Nicolaescu <da...@ics.uci.edu> writes:
>
> Hi Dan!
>
> > > I'd like to start an emacs daemon on startup in a runlevel script. So I
> > > added
> > >
> > > su --login --command 'emacs --daemon' horn
> > >
> > > but that doesn't start a daemon. So I tried issuing
> > >
> > > emacs --daemon
> > >
> > > or
> > >
> > > emacs -Q --daemon
> > >
> > > on a login shell, but that returns instantly and doesn't start an emacs
> > > daemon, too. Running inside gdb only says "Program exited normally."
> > >
> > > When issuing the same commands inside a X terminal emulator they work as
> > > they should, though.
> >
> > Thanks. I checked in a fix, can you please try again?
>
> Yes, it works now. Thanks a lot.
>
> But I have two additional questions.
>
> 1) How do I shutdown the emacs server cleanly?
Use emacsclient to eval `save-buffers-kill-emacs'?
> 2) In my .emacs I have (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)).
There's a better way to do this, use ~/.Xdefaults:
Emacs.ToolBar: 0
Emacs.verticalScrollBars: off
> But when I start emacsclient -c the first time, it has a toolbar,
> although the value of `tool-bar-mode' is nil. Then I have to toggle
> t-b-m twice, and from there on it's disabled for the current and all
> new frames. I disable the scroll- and menu-bars the same way, and
> they are disabled directly, e.g. even for the first X frame.
I checked in a fix to fix the initialization of tool-bar-mode and menu-bar-mode.
Hi Dan,
> > But I have two additional questions.
> >
> > 1) How do I shutdown the emacs server cleanly?
>
> Use emacsclient to eval `save-buffers-kill-emacs'?
I'm pretty sure I tried `kill-emacs' yesterday and the emacs process
survived, but the server was shut down, so I couldn't connect anymore.
But I tested again and it works. Thanks for the hint.
> > 2) In my .emacs I have (if (fboundp 'tool-bar-mode) (tool-bar-mode -1)).
>
> There's a better way to do this, use ~/.Xdefaults:
>
> Emacs.ToolBar: 0
> Emacs.verticalScrollBars: off
Yes, I know. But I like to have all my emacs customizations in lisp and
in ~/.emacs.
> > But when I start emacsclient -c the first time, it has a
> > toolbar, although the value of `tool-bar-mode' is nil. Then I
> > have to toggle t-b-m twice, and from there on it's disabled for
> > the current and all new frames. I disable the scroll- and
> > menu-bars the same way, and they are disabled directly,
> > e.g. even for the first X frame.
>
> I checked in a fix to fix the initialization of tool-bar-mode and
> menu-bar-mode.
Nothing visible has changed for me. Still the first X11 frame after
starting the daemon has a tool-bar (and tool-bar-mode is nil).
Bye,
Tassilo
--
Some people wear Superman pajamas. Superman wears Chuck Norris pajamas.
> Dan Nicolaescu <da...@ics.uci.edu> writes:
>
> > > But when I start emacsclient -c the first time, it has a
> > > toolbar, although the value of `tool-bar-mode' is nil. Then I
> > > have to toggle t-b-m twice, and from there on it's disabled for
> > > the current and all new frames. I disable the scroll- and
> > > menu-bars the same way, and they are disabled directly,
> > > e.g. even for the first X frame.
> >
> > I checked in a fix to fix the initialization of tool-bar-mode and
> > menu-bar-mode.
>
> Nothing visible has changed for me. Still the first X11 frame after
> starting the daemon has a tool-bar (and tool-bar-mode is nil).
Did you recompile startup.el and dump emacs again?
I used my package manager (paludis). It always copies the fresh source
tree to some location and makes a full bootstrap.
Bye,
Tassilo
It works for me with a .emacs containing just your code:
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))