From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.help Subject: Re: stdio access to the Emacs REPL Date: Fri, 15 Nov 2013 09:04:32 +0000 Message-ID: References: <877gcft5la.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1384506299 19511 80.91.229.3 (15 Nov 2013 09:04:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Nov 2013 09:04:59 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Thorsten Jolitz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 15 10:05:05 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VhFKp-0002Xp-VC for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Nov 2013 10:05:04 +0100 Original-Received: from localhost ([::1]:59452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhFKp-0003bv-FB for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Nov 2013 04:05:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhFKa-0003bg-II for help-gnu-emacs@gnu.org; Fri, 15 Nov 2013 04:04:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhFKR-0007QH-6C for help-gnu-emacs@gnu.org; Fri, 15 Nov 2013 04:04:48 -0500 Original-Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:56162 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhFKQ-0007Pj-Vx for help-gnu-emacs@gnu.org; Fri, 15 Nov 2013 04:04:39 -0500 Original-Received: from localhost ([127.0.0.1] helo=sloy) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1VhFMU-0006Nq-IR; Fri, 15 Nov 2013 10:06:46 +0100 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.1 In-reply-to: <877gcft5la.fsf@gmail.com> X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: kernel-hacker@bennee.com X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94493 Archived-At: tjolitz@gmail.com writes: > Alex Bennée 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)" >> > 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