emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: server stuff


From: Stefan Monnier
Subject: Re: server stuff
Date: Fri, 10 Jan 2003 14:16:12 -0500

> I suggest changes to server.el along these lines, mainly so users can
> use Custom to set it up.  Also, I don't think /tmp should be hardwired
> but if that's changed, emacsclient.c will need changing in sync, which
> I haven't done.

I agree that $TMP or $TMPDIR should be obeyed in the same way
as temporary-file-directory.

> ! (defcustom server-temp-file-regexp (concat "^" temporary-file-directory

Lacks regexp-quoting.

> + ;; Fixme: This doesn't look secure.  If it really is, it deserves a
> + ;; comment, but I'd expect it to be created in a protected subdir as
> + ;; normal.  -- fx

I believe that the creation of such sockets is atomic similarly
to OCREAT (at least it failed when I tried it with a pre-existing socket),
so I think it's safe.  But I must admit not knowing for sure.

> + ;;;###autoload
> + (define-minor-mode server-mode
> +   "Toggle Server mode.
> + With ARG, turn Server mode on if ARG is positive, off otherwise.
> + Server mode runs a process that accepts commands from the
> + `emacsclient' program.  See `server-start' and Info node `Emacs server'."
> +   :global t
> +   :group 'server
> +   ;; Fixme: Should this check for an existing server socket and do
> +   ;; nothing if there is one (for multiple Emacs sessions)?
> +   (server-start (not server-mode)))
> + (custom-add-version 'server-mode "21.4")

You can pass a :version argument to define-minor-mode instead of
calling (custom-add-version 'server-mode "21.4").

>   (defun server-process-filter (proc string)
> +   "Process a request from the server to edit some files.
> + PROC is the server process.  Format of STRING is \"PATH PATH PATH... \n\"."
                                                                        ^^
I think the \ needs to be doubled.


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]