[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Back to emacsclient/server
From: |
Juanma Barranquero |
Subject: |
Re: Back to emacsclient/server |
Date: |
Fri, 27 Oct 2006 02:27:09 +0200 |
OK, there's a rough first cut at the emacsclient patch (attached in
context and unified diffs, for easier reading). No doc patches nor
ChangeLogs, yet.
Notes:
- Should `server-ensure-safe-dir' be used also to create/check
safety of the `server-auth-dir' directory (by default at
~/.emacs.d/server)? If so, `server-ensure-safe-dir' must be changed to
create directories in the path (because `server-auth-dir', unlike
`server-socket-dir', can be customized by the user, and so it can be
at any depth). I've implemented this (by passing the PARENTS arg to
`make-directory'), but I'm not sure that's the right way,
security-wise.
- Also, I've patched `server-ensure-safe-dir' to ignore Unix-style
file permissions in Windows (checking ACLs would be useful, but I
don't know whether that's possible from Emacs).
- emasclient.c compiles and works fine with MinGW 3.4.5; I'll try to
test it with MSVC once the code/features settle.
- With an eye to porting it to MSVC, I've changed the code to use
send/recv instead of streams (it'll be easier to maintain
compatibility, I believe). The Unix sockets code should work OK, but I
don't really know, so please test it.
- I haven't tried compiling on GNU/Linux or Unix, so there could be
typos or oversights, which should be trivial to fix.
- There's a new argument --server-file. If --server-file (or
environment variable EMACS_SERVER_FILE) exist, emacsclient uses TCP
sockets, else it uses Unix sockets (either --socket-name, or "emacs"
by default).
- The only major thing missing is interpreting
--server-file=SERVERNAME as ~/.emacs.d/server/SERVERNAME (currently,
you've got to pass the full path). What would be the easier portable
way to find the user directory? The $HOME (or %HOME in Windows) env
var?
I'd be glad if people could try the patch, with stress on testing on
non-Windows environments and non-TCP sockets (I want to be sure I'm
not breaking anything).
Comments welcome.
/L/e/k/t/u
newserver-c.patch
Description: Binary data
newserver-u.patch
Description: Binary data
Re: Back to emacsclient/server, Stefan Monnier, 2006/10/23
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/23
- Re: Back to emacsclient/server, Stefan Monnier, 2006/10/23
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/24
- Re: Back to emacsclient/server,
Juanma Barranquero <=
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/27
- Re: Back to emacsclient/server, Jason Rumney, 2006/10/27
- Re: Back to emacsclient/server, Stefan Monnier, 2006/10/27
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/27
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/27
- Re: Back to emacsclient/server, Slawomir Nowaczyk, 2006/10/27
- Re: Back to emacsclient/server, Stefan Monnier, 2006/10/27
- Re: Back to emacsclient/server, Juanma Barranquero, 2006/10/27
- Re: Back to emacsclient/server, Richard Stallman, 2006/10/28
- Re: Back to emacsclient/server, Stefan Monnier, 2006/10/29