all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Alex Bennée" <kernel-hacker@bennee.com>
To: Thorsten Jolitz <tjolitz@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: stdio access to the Emacs REPL
Date: Fri, 15 Nov 2013 09:04:32 +0000	[thread overview]
Message-ID: <p1d2m2xcgv.fsf@bennee.com> (raw)
In-Reply-To: <877gcft5la.fsf@gmail.com>


tjolitz@gmail.com writes:

> Alex Bennée <kernel-hacker@bennee.com> writes:
>
>> Hi,
>>
>> I'm looking at replacing/augmenting the current xmlrpc method used by
>> Edit with Emacs on Chrome to communicate with the edit-server.
>> Chrome(ium) now provides a new native message API which offers a simpler
>> stdio based access:
>>
>> http://developer.chrome.com/extensions/messaging.html#native-messaging
>>
>> I was wondering if there is anyway to hook a line based stdio link into
>> a running emacs session. Something like:
>>
>> emacsclient -t -e "(eshell)"
>>
<snip>
> and then e.g. use the PicoLisp REPL to communicate with Emacs via stdin/stdout
>
> #+begin_src picolisp
> : (emc '(read) "(princ \"Hello World\")")
> -> "Hello World"
> : (emc '(read) "server-name")
> -> "my-server"
> : (emc '(line) "server-name")
> -> ("\"" "m" "y" "-" "s" "e" "r" "v" "e" "r" "\"")
> : (emc '(line T) "server-name")
> -> "\"my-server\""
> #+end_src

Thanks, that seems to work quite nicely. Unfortunatly I can't get the
Chrome side of stuff to work but that's not an Emacs problem ;-)


Cheers,

--
Alex Bennée
http://www.bennee.com/~alex




      reply	other threads:[~2013-11-15  9:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 11:40 stdio access to the Emacs REPL Alex Bennée
2013-11-11 13:45 ` Thorsten Jolitz
2013-11-15  9:04   ` Alex Bennée [this message]

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=p1d2m2xcgv.fsf@bennee.com \
    --to=kernel-hacker@bennee.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tjolitz@gmail.com \
    /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.