unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
@ 2009-03-14  5:23 Jameson Rollins
  2016-02-29  3:48 ` Lars Ingebrigtsen
       [not found] ` <handler.2677.D2677.14792817396961.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Jameson Rollins @ 2009-03-14  5:23 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: rfrancoise

This is a feature request more than a bug: I would really like to see
the ability to run the emacs server daemon ("emacs --daemon") in the
foreground.  This would be very useful.  I would like to be able to
start/control this daemon with a service supervisor (i.e. runit [0]).
This would allow me to easily start the daemon on system start up, and
have access to the daemon from all xsessions and virtual terminals.

I would also be prefer to be able to specify daemon parameters as
well, such as the location of the socket file.

I find the new server to be incredibly useful.  It is a really great
new feature.  I would just like to see these small changes so that I
can really turn my editor into the server it needs to be.

Thanks for all the great work, and let me know if I can provide any
additional information.

[0] http://smarden.org/runit/


In GNU Emacs 23.0.91.1 (i486-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2009-02-28 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20090228-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.91/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

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: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  server-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-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:
x e c SPC m p d p r o x y C-x b RET C-x b RET ESC [ 
B ESC [ B RET ESC O a ESC [ B C-k C-k C-x C-s C-y ESC 
[ B ESC [ B C-x C-s C-x b RET e x e c SPC 2 > & 1 C-x 
C-s ESC [ B ESC [ B ESC [ B C-x C-s C-x k RET C-x C-s 
C-x C-f ESC [ A ESC b C-k l o TAB r u TAB RET C-x k 
RET C-x C-s C-x k RET C-x C-g C-f C-x C-f ESC [ A DEL 
DEL DEL c o n f i g RET s s i z e DEL DEL DEL DEL 1 
0 0 0 0 0 0 RET n n u m DEL DEL DEL 3 DEL 2 ESC [ B 
ESC [ B RET C-x C-s C-x C-c C-g C-x k RET ESC [ B ESC 
[ B ESC [ C ESC [ C ESC [ C ESC [ C ESC [ C ~ / b i 
n / C-x C-s C-x C-c ESC [ B ESC [ C ESC [ C ESC [ C 
ESC [ C ESC [ C ESC [ B C-d / h o m e / j r o l l i 
n s C-x C-s C-x C-c <switch-frame> C-x C-f ESC [ A 
ESC [ A ESC [ B RET ESC [ B ESC [ B ESC [ C ESC [ C 
ESC [ C ESC [ C ESC [ C c h p s t SPC e n v SPC C-x 
C-s ESC b - e SPC C-x C-s C-x C-s C-x C-s C-x C-s C-x 
k RET ESC x r e p o TAB r TAB RET

Recent messages:
Setting up indent for shell type sh
setting up indent stuff
Indentation variables are now local.
Indentation setup for shell type sh
Saving file /home/jrollins/.service/mpdproxy/run...
Wrote /home/jrollins/.service/mpdproxy/run
Saving file /home/jrollins/.service/mpdproxy/run...
Wrote /home/jrollins/.service/mpdproxy/run
(No changes need to be saved) [3 times]
Making completion list...






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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2009-03-14  5:23 bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground Jameson Rollins
@ 2016-02-29  3:48 ` Lars Ingebrigtsen
  2016-02-29 17:08   ` Glenn Morris
       [not found] ` <handler.2677.D2677.14792817396961.notifdone@debbugs.gnu.org>
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-29  3:48 UTC (permalink / raw)
  To: Jameson Rollins; +Cc: 2677, rfrancoise

Jameson Rollins <jrollins@finestructure.net> writes:

> This is a feature request more than a bug: I would really like to see
> the ability to run the emacs server daemon ("emacs --daemon") in the
> foreground.  This would be very useful.  I would like to be able to
> start/control this daemon with a service supervisor (i.e. runit [0]).
> This would allow me to easily start the daemon on system start up, and
> have access to the daemon from all xsessions and virtual terminals.
>
> I would also be prefer to be able to specify daemon parameters as
> well, such as the location of the socket file.

--daemon is a switch for running Emacs in the background.  If you don't
want Emacs running in the background, you don't have to do anything in
particular.

And setting the server socket location can be done easily from an .el
file or with --eval.  So I don't really think there's anything that
needs to be done here.  Please reopen the bug report if you disagree.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-02-29  3:48 ` Lars Ingebrigtsen
@ 2016-02-29 17:08   ` Glenn Morris
  2016-02-29 17:11     ` Glenn Morris
  2016-02-29 17:22     ` Jameson Graef Rollins
  0 siblings, 2 replies; 9+ messages in thread
From: Glenn Morris @ 2016-02-29 17:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 2677, rfrancoise, Jameson Rollins

Lars Ingebrigtsen wrote:

> Jameson Rollins <jrollins@finestructure.net> writes:
>
>> This is a feature request more than a bug: I would really like to see
>> the ability to run the emacs server daemon ("emacs --daemon") in the
>> foreground.  This would be very useful.  I would like to be able to
>> start/control this daemon with a service supervisor (i.e. runit [0]).
>> This would allow me to easily start the daemon on system start up, and
>> have access to the daemon from all xsessions and virtual terminals.
>
> --daemon is a switch for running Emacs in the background.  If you don't
> want Emacs running in the background, you don't have to do anything in
> particular.

--daemon _should_ be a switch for running a "headless" Emacs.
The fact that it forks and runs in the background is not an essential
condition, and the justification for not doing so is provided in the
report. See eg "new-style daemons" on
https://www.freedesktop.org/software/systemd/man/daemon.html

I guess that systemd type = forking should be able to handle current
Emacs, but the above reference says that "new-style" daemons are
preferred.







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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-02-29 17:08   ` Glenn Morris
@ 2016-02-29 17:11     ` Glenn Morris
  2016-02-29 17:22     ` Jameson Graef Rollins
  1 sibling, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2016-02-29 17:11 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 2677, rfrancoise, Jameson Rollins


PS there's more explanation in the merged bug 4944, so I reopened this.





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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-02-29 17:08   ` Glenn Morris
  2016-02-29 17:11     ` Glenn Morris
@ 2016-02-29 17:22     ` Jameson Graef Rollins
  2016-11-16  7:35       ` Glenn Morris
  1 sibling, 1 reply; 9+ messages in thread
From: Jameson Graef Rollins @ 2016-02-29 17:22 UTC (permalink / raw)
  To: Glenn Morris, Lars Ingebrigtsen; +Cc: 2677, rfrancoise

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

On Mon, Feb 29 2016, Glenn Morris <rgm@gnu.org> wrote:
> Lars Ingebrigtsen wrote:
>
>> Jameson Rollins <jrollins@finestructure.net> writes:
>>
>>> This is a feature request more than a bug: I would really like to see
>>> the ability to run the emacs server daemon ("emacs --daemon") in the
>>> foreground.  This would be very useful.  I would like to be able to
>>> start/control this daemon with a service supervisor (i.e. runit [0]).
>>> This would allow me to easily start the daemon on system start up, and
>>> have access to the daemon from all xsessions and virtual terminals.
>>
>> --daemon is a switch for running Emacs in the background.  If you don't
>> want Emacs running in the background, you don't have to do anything in
>> particular.
>
> --daemon _should_ be a switch for running a "headless" Emacs.
> The fact that it forks and runs in the background is not an essential
> condition, and the justification for not doing so is provided in the
> report. See eg "new-style daemons" on
> https://www.freedesktop.org/software/systemd/man/daemon.html
>
> I guess that systemd type = forking should be able to handle current
> Emacs, but the above reference says that "new-style" daemons are
> preferred.

Glenn, than you very much for responding to this and reopening the bug
(I was going to reopen as well).  The issue is as you describe.  There
should at least be a way to operate the emacs server such that it
does not fork, but just runs in a "headless" mode, with logs to stderr.
This is the "new-style" that you're referring to, that is how all modern
init systems handle daemons.

Thanks for the consideration.

jamie.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-02-29 17:22     ` Jameson Graef Rollins
@ 2016-11-16  7:35       ` Glenn Morris
  2016-11-16 15:50         ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2016-11-16  7:35 UTC (permalink / raw)
  To: 2677-done

Version: 26.1

Rev 36b99556 added --new-daemon which runs in the foreground.
Sorry for the huge delay.





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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-11-16  7:35       ` Glenn Morris
@ 2016-11-16 15:50         ` Eli Zaretskii
  2016-11-18  7:01           ` Glenn Morris
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2016-11-16 15:50 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 2677, jrollins

> From: Glenn Morris <rgm@gnu.org>
> Date: Wed, 16 Nov 2016 02:35:29 -0500
> 
> Version: 26.1
> 
> Rev 36b99556 added --new-daemon which runs in the foreground.
> Sorry for the huge delay.

Thanks.

I wonder if the options should better be called --daemon-bg/fg or
maybe --daemon=bg/fg.  That might better explain the nature of the
distinction than "new" and "old".





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

* bug#2677: closed (Re: bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground)
       [not found] ` <handler.2677.D2677.14792817396961.notifdone@debbugs.gnu.org>
@ 2016-11-16 17:21   ` Jameson Graef Rollins
  0 siblings, 0 replies; 9+ messages in thread
From: Jameson Graef Rollins @ 2016-11-16 17:21 UTC (permalink / raw)
  To: 2677

On Tue, Nov 15 2016, GNU bug Tracking System <help-debbugs@gnu.org> wrote:
> Rev 36b99556 added --new-daemon which runs in the foreground.
> Sorry for the huge delay.

Thank you!!!





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

* bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground
  2016-11-16 15:50         ` Eli Zaretskii
@ 2016-11-18  7:01           ` Glenn Morris
  0 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2016-11-18  7:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 2677, jrollins


There were more replies on emacs-devel, so I followed up there.





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

end of thread, other threads:[~2016-11-18  7:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-14  5:23 bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground Jameson Rollins
2016-02-29  3:48 ` Lars Ingebrigtsen
2016-02-29 17:08   ` Glenn Morris
2016-02-29 17:11     ` Glenn Morris
2016-02-29 17:22     ` Jameson Graef Rollins
2016-11-16  7:35       ` Glenn Morris
2016-11-16 15:50         ` Eli Zaretskii
2016-11-18  7:01           ` Glenn Morris
     [not found] ` <handler.2677.D2677.14792817396961.notifdone@debbugs.gnu.org>
2016-11-16 17:21   ` bug#2677: closed (Re: bug#2677: 23.0.91; need ability to run emacs --daemon in the foreground) Jameson Graef Rollins

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).