* Daemon mode wishlist
@ 2008-09-26 19:40 Romain Francoise
2008-09-26 20:27 ` Dan Nicolaescu
0 siblings, 1 reply; 17+ messages in thread
From: Romain Francoise @ 2008-09-26 19:40 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
The new daemon mode is neat but it's not really useful for me
because there's no way to customize the socket name, it always uses
the default 'server' socket. --daemon is processed before --eval so
I can't change it with --eval '(setq server-name "foo")' as the
preload-emacs script does.
Ideally emacs would have a -S option to set the session/socket name
and emacsclient would have switches to list the available sessions
and select one, like screen does.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-26 19:40 Daemon mode wishlist Romain Francoise
@ 2008-09-26 20:27 ` Dan Nicolaescu
2008-09-26 21:24 ` Stefan Monnier
2008-09-27 9:55 ` Romain Francoise
0 siblings, 2 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2008-09-26 20:27 UTC (permalink / raw
To: emacs-devel
Romain Francoise <romain@orebokech.com> writes:
> The new daemon mode is neat but it's not really useful for me
> because there's no way to customize the socket name, it always uses
> the default 'server' socket. --daemon is processed before --eval so
> I can't change it with --eval '(setq server-name "foo")' as the
> preload-emacs script does.
Doesn't --eval '(progn (setq server-name "foo") (server-start))' work?
> Ideally emacs would have a -S option to set the session/socket name
> and emacsclient would have switches to list the available sessions
> and select one, like screen does.
My plan is to change --daemon syntax to be --daemon[=NAME[:PORT]]
Then (daemonp) would return (NAME . PORT)
and change server-start to take NAME and PORT as optional arguments.
Do you want to help implementing/documenting and more importantly
getting this approved?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-26 20:27 ` Dan Nicolaescu
@ 2008-09-26 21:24 ` Stefan Monnier
2008-09-27 15:53 ` Dan Nicolaescu
2008-09-27 9:55 ` Romain Francoise
1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-09-26 21:24 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
>> The new daemon mode is neat but it's not really useful for me
>> because there's no way to customize the socket name, it always uses
>> the default 'server' socket. --daemon is processed before --eval so
>> I can't change it with --eval '(setq server-name "foo")' as the
>> preload-emacs script does.
We should change startup.el so that server-start is called after processing
the .emacs (and the --eval).
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-26 20:27 ` Dan Nicolaescu
2008-09-26 21:24 ` Stefan Monnier
@ 2008-09-27 9:55 ` Romain Francoise
2008-09-27 12:27 ` Stefan Monnier
2008-09-27 16:09 ` Dan Nicolaescu
1 sibling, 2 replies; 17+ messages in thread
From: Romain Francoise @ 2008-09-27 9:55 UTC (permalink / raw
To: emacs-devel
Dan Nicolaescu <dann@ics.uci.edu> writes:
> Doesn't --eval '(progn (setq server-name "foo") (server-start))' work?
Ah, I hadn't thought of that. The server gets restarted, of course,
but yes it works. Thanks.
> My plan is to change --daemon syntax to be --daemon[=NAME[:PORT]]
> Then (daemonp) would return (NAME . PORT)
> and change server-start to take NAME and PORT as optional arguments.
And PORT could be t if you want Emacs to start a TCP server on a
random port as is the default now?
> Do you want to help implementing/documenting and more importantly
> getting this approved?
The first step is probably to get this approved. :)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-27 9:55 ` Romain Francoise
@ 2008-09-27 12:27 ` Stefan Monnier
2008-10-02 18:05 ` Romain Francoise
2008-09-27 16:09 ` Dan Nicolaescu
1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-09-27 12:27 UTC (permalink / raw
To: Romain Francoise; +Cc: emacs-devel
>> Doesn't --eval '(progn (setq server-name "foo") (server-start))' work?
> Ah, I hadn't thought of that. The server gets restarted, of course,
> but yes it works. Thanks.
>> My plan is to change --daemon syntax to be --daemon[=NAME[:PORT]]
>> Then (daemonp) would return (NAME . PORT)
>> and change server-start to take NAME and PORT as optional arguments.
> And PORT could be t if you want Emacs to start a TCP server on a
> random port as is the default now?
>> Do you want to help implementing/documenting and more importantly
>> getting this approved?
> The first step is probably to get this approved. :)
All of these new features will have to wait. The only thing we should
do at this stage is move the (server-start) to after processing .emacs
and --eval.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-26 21:24 ` Stefan Monnier
@ 2008-09-27 15:53 ` Dan Nicolaescu
2008-09-28 1:09 ` Stefan Monnier
0 siblings, 1 reply; 17+ messages in thread
From: Dan Nicolaescu @ 2008-09-27 15:53 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> The new daemon mode is neat but it's not really useful for me
> >> because there's no way to customize the socket name, it always uses
> >> the default 'server' socket. --daemon is processed before --eval so
> >> I can't change it with --eval '(setq server-name "foo")' as the
> >> preload-emacs script does.
>
> We should change startup.el so that server-start is called after processing
> the .emacs (and the --eval).
I don't see that as being better, but if someone else wants to do it and
also find a way to solve the problem of specifying the server name and
port on the command line, I won't stand in the way.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-27 9:55 ` Romain Francoise
2008-09-27 12:27 ` Stefan Monnier
@ 2008-09-27 16:09 ` Dan Nicolaescu
1 sibling, 0 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2008-09-27 16:09 UTC (permalink / raw
To: Romain Francoise; +Cc: emacs-devel
Romain Francoise <romain@orebokech.com> writes:
> Dan Nicolaescu <dann@ics.uci.edu> writes:
>
> > My plan is to change --daemon syntax to be --daemon[=NAME[:PORT]]
> > Then (daemonp) would return (NAME . PORT)
> > and change server-start to take NAME and PORT as optional arguments.
>
> And PORT could be t if you want Emacs to start a TCP server on a
> random port as is the default now?
Just omitting it sounds better.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-27 15:53 ` Dan Nicolaescu
@ 2008-09-28 1:09 ` Stefan Monnier
2008-09-28 1:39 ` Dan Nicolaescu
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-09-28 1:09 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
>> We should change startup.el so that server-start is called after processing
>> the .emacs (and the --eval).
> I don't see that as being better, but if someone else wants to do it and
> also find a way to solve the problem of specifying the server name and
> port on the command line, I won't stand in the way.
It allows the use of
emacs --eval '(setq server-name "foo")' --daemon
which seems sufficient. Also it makes server-start take into account
the config settings in the user's .emacs.
I.e. I thing it's just the right thing to do.
You happened to place the call to server-start just at the same place
where you had to disable the call to frame-initialize, but there's
really no fundamental reason why it should be there.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-28 1:09 ` Stefan Monnier
@ 2008-09-28 1:39 ` Dan Nicolaescu
2008-09-28 2:08 ` Stefan Monnier
2008-09-28 7:41 ` Paul R
0 siblings, 2 replies; 17+ messages in thread
From: Dan Nicolaescu @ 2008-09-28 1:39 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> We should change startup.el so that server-start is called after processing
> >> the .emacs (and the --eval).
>
> > I don't see that as being better, but if someone else wants to do it and
> > also find a way to solve the problem of specifying the server name and
> > port on the command line, I won't stand in the way.
>
> It allows the use of
>
> emacs --eval '(setq server-name "foo")' --daemon
>
> which seems sufficient. Also it makes server-start take into account
> the config settings in the user's .emacs.
> I.e. I thing it's just the right thing to do.
Using --eval is a hack (a Turing complete one), using parameters to
--daemon is more in the spirit of how command line options work (see
what I described in a previous mail: --daemon[=NAME[:PORT]]).
But having that implemented would have increased the size of the patch
(and it's only useful to a very small minority anyway, and that small
minority can use --eval to set the server-name and restart the server).
> You happened to place the call to server-start just at the same place
> where you had to disable the call to frame-initialize, but there's
> really no fundamental reason why it should be there.
Not exactly, I wanted things to work by default, if people change the
server name in .emacs, and use --daemon=NAME, I'd rather want the server
name to be NAME. But again, if someone wants to change the place where
the server is started, he can go ahead.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-28 1:39 ` Dan Nicolaescu
@ 2008-09-28 2:08 ` Stefan Monnier
2008-09-28 9:37 ` Romain Francoise
2008-09-28 7:41 ` Paul R
1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-09-28 2:08 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
> Not exactly, I wanted things to work by default, if people change the
> server name in .emacs, and use --daemon=NAME, I'd rather want the server
> name to be NAME. But again, if someone wants to change the place where
> the server is started, he can go ahead.
Could someone do that, please?
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-28 1:39 ` Dan Nicolaescu
2008-09-28 2:08 ` Stefan Monnier
@ 2008-09-28 7:41 ` Paul R
2008-09-28 22:47 ` Stefan Monnier
1 sibling, 1 reply; 17+ messages in thread
From: Paul R @ 2008-09-28 7:41 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: Stefan Monnier, emacs-devel
Hello,
On Sat, 27 Sep 2008 18:39:12 -0700 (PDT), Dan Nicolaescu <dann@ics.uci.edu> said:
Dan> Not exactly, I wanted things to work by default, if people change
Dan> the server name in .emacs, and use --daemon=NAME, I'd rather want
Dan> the server name to be NAME.
Dan makes a good point here. It also seems to me, from an interface
point of view, that emacs command line should either provide :
emacs --eval '(progn (setq server-name "foo") (daemonize))'
or
emacs --daemon[=name[:port]]
Or maybe both. Mixing the two as proposed by Stephan makes perfect
sense for whoever happens to know precisely the loading sequence of
emacs. But probably not as much for the rest of the world.
I know it's feature freeze, but polishing *the CLI* of daemon mode
isn't really a *feature*, and is not likely to introduce some new bug
reports, don't you think ?
--
Paul
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-28 2:08 ` Stefan Monnier
@ 2008-09-28 9:37 ` Romain Francoise
0 siblings, 0 replies; 17+ messages in thread
From: Romain Francoise @ 2008-09-28 9:37 UTC (permalink / raw
To: Stefan Monnier; +Cc: Dan Nicolaescu, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Could someone do that, please?
Done.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-28 7:41 ` Paul R
@ 2008-09-28 22:47 ` Stefan Monnier
0 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2008-09-28 22:47 UTC (permalink / raw
To: Paul R; +Cc: Dan Nicolaescu, emacs-devel
> emacs --eval '(progn (setq server-name "foo") (daemonize))'
> or
> emacs --daemon[=name[:port]]
emacs --eval '(setq server-name "foo")' --daemon
should work now. The server-name can also be set in your .emacs.
This seems to be plenty for those rare cases where this is needed.
> I know it's feature freeze, but polishing *the CLI* of daemon mode
> isn't really a *feature*, and is not likely to introduce some new bug
> reports, don't you think ?
We have more important things to fix first,
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-09-27 12:27 ` Stefan Monnier
@ 2008-10-02 18:05 ` Romain Francoise
2008-10-02 18:59 ` Stefan Monnier
0 siblings, 1 reply; 17+ messages in thread
From: Romain Francoise @ 2008-10-02 18:05 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> All of these new features will have to wait. The only thing we
> should do at this stage is move the (server-start) to after
> processing .emacs and --eval.
Unfortunately this causes a problem if .emacs prompts the user for
something, as `desktop-read' does if a stale lock exists for the
desktop file. It calls `y-or-n-p' but the user cannot see nor
answer the question because there is no initial frame, and the
server is not yet started. :(
Any suggestions on how we should handle this? Should desktop.el be
changed to not prompt?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-10-02 18:05 ` Romain Francoise
@ 2008-10-02 18:59 ` Stefan Monnier
2010-06-02 18:32 ` emacs-dwim
0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2008-10-02 18:59 UTC (permalink / raw
To: Romain Francoise; +Cc: emacs-devel
>> All of these new features will have to wait. The only thing we
>> should do at this stage is move the (server-start) to after
>> processing .emacs and --eval.
> Unfortunately this causes a problem if .emacs prompts the user for
> something, as `desktop-read' does if a stale lock exists for the
> desktop file. It calls `y-or-n-p' but the user cannot see nor
> answer the question because there is no initial frame, and the
> server is not yet started. :(
> Any suggestions on how we should handle this? Should desktop.el be
> changed to not prompt?
By fixing the other problem, the one where "emacs --daemon" returns
before the server is ready. Basically, all the .emacs should be read as
if we're running with "--batch", and only at the end should we detach
from the terminal.
As for desktop-read, it will probably need to be reworked to do the
right thing with --daemon.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2008-10-02 18:59 ` Stefan Monnier
@ 2010-06-02 18:32 ` emacs-dwim
2010-06-03 1:07 ` Chong Yidong
0 siblings, 1 reply; 17+ messages in thread
From: emacs-dwim @ 2010-06-02 18:32 UTC (permalink / raw
To: Emacs-devel
This one bit me today, causing only minor crashage. /tmp/X.log filled the
drive with "y, n, or !" prompts from emacs-daemon when my desktop tried to
reload a file with an unsafe file-local variable. Emacs itself survived
until i shut down gracefully; other processes did not.
--
View this message in context: http://old.nabble.com/Daemon-mode-wishlist-tp19695101p28758321.html
Sent from the Emacs - Dev mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Daemon mode wishlist
2010-06-02 18:32 ` emacs-dwim
@ 2010-06-03 1:07 ` Chong Yidong
0 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2010-06-03 1:07 UTC (permalink / raw
To: emacs-dwim; +Cc: Emacs-devel
emacs-dwim <gift_o@excite.com> writes:
> This one bit me today, causing only minor crashage. /tmp/X.log filled the
> drive with "y, n, or !" prompts from emacs-daemon when my desktop tried to
> reload a file with an unsafe file-local variable. Emacs itself survived
> until i shut down gracefully; other processes did not.
Could you be a bit more specific about what went wrong? Do you mean
that repeated "y, n, or !" prompts were issued in daemon mode, but not
when you run Emacs normally?
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2010-06-03 1:07 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-26 19:40 Daemon mode wishlist Romain Francoise
2008-09-26 20:27 ` Dan Nicolaescu
2008-09-26 21:24 ` Stefan Monnier
2008-09-27 15:53 ` Dan Nicolaescu
2008-09-28 1:09 ` Stefan Monnier
2008-09-28 1:39 ` Dan Nicolaescu
2008-09-28 2:08 ` Stefan Monnier
2008-09-28 9:37 ` Romain Francoise
2008-09-28 7:41 ` Paul R
2008-09-28 22:47 ` Stefan Monnier
2008-09-27 9:55 ` Romain Francoise
2008-09-27 12:27 ` Stefan Monnier
2008-10-02 18:05 ` Romain Francoise
2008-10-02 18:59 ` Stefan Monnier
2010-06-02 18:32 ` emacs-dwim
2010-06-03 1:07 ` Chong Yidong
2008-09-27 16:09 ` Dan Nicolaescu
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.