From: "Rüdiger Sonderfeld" <ruediger@c-plusplus.de>
To: monnier@iro.umontreal.ca
Cc: emacs-devel@gnu.org
Subject: Re: Proposal: emacsclient --readonly
Date: Fri, 27 Sep 2013 20:22:01 +0200 [thread overview]
Message-ID: <2142801.kzSLt3AetH@descartes> (raw)
Hello,
what happened to this patch? It would be very useful to me right now.
There should probably be a way to add functions to `commands' (in server-
process-filter) though. With this patch it could be done by adding an "--
eval" statement to the args. But there should probably be a clean way.
I'm currently attempting to write an info(1) like program which loads the info
page in the running Emacs session. I need this to support the "doc" comment
in `inferior-octave'. With this patch it could be done without a lot of
hacks.
Regards,
Rüdiger
> === modified file 'lisp/server.el'
> --- lisp/server.el 2013-02-13 04:31:09 +0000
> +++ lisp/server.el 2013-03-25 13:07:44 +0000
> @@ -909,6 +909,12 @@
>
> (process-put proc 'continuation nil)
> (if continuation (ignore-errors (funcall continuation)))))
>
> +(defvar server-custom-option-function #'identity
> + "Function to process additional emacsclient arguments.
> +The function is called with a single argument (a list of args received
> +from emacsclient) and returns the list of args left to process.
> +The easiest way to modify this variable is through `add-function'.")
> +
>
> (cl-defun server-process-filter (proc string)
>
> "Process a request from the server to edit some files.
>
> PROC is the server process. STRING consists of a sequence of
>
> @@ -1067,7 +1076,8 @@
>
> (setq string (substring string (match-end 0)))
> (setq args-left
>
> (mapcar 'server-unquote-arg (split-string request " " t)))
>
> - (while args-left
> + (while (setq arg-left (funcall server-custom-option-function
> + args-left))
>
> (pcase (pop args-left)
>
> ;; -version CLIENT-VERSION: obsolete at birth.
> (`"-version" (pop args-left))
next reply other threads:[~2013-09-27 18:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 18:22 Rüdiger Sonderfeld [this message]
[not found] <87zjxtq304.fsf@michael-laptop.hsd1.ma.comcast.net>
[not found] ` <jwv38vlpnpl.fsf-monnier+emacs@gnu.org>
2013-03-24 16:22 ` Proposal: emacsclient --readonly Michael Mauger
2013-03-25 13:15 ` Stefan Monnier
2013-03-26 2:56 ` Michael Mauger
2013-03-26 13:10 ` Stefan Monnier
2013-03-27 2:02 ` Michael Mauger
2013-03-27 2:33 ` Stefan Monnier
2013-03-27 13:47 ` Michael Mauger
2013-03-30 23:03 ` Michael Mauger
-- strict thread matches above, loose matches on Subject: below --
2013-03-14 2:23 michael
2013-03-14 2:45 ` W. Greenhouse
2013-03-14 3:31 ` Stefan Monnier
2013-03-24 3:45 ` Michael Mauger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2142801.kzSLt3AetH@descartes \
--to=ruediger@c-plusplus.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.