From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Michael Mauger Newsgroups: gmane.emacs.devel Subject: [ELPA] New package: shelisp Date: Sun, 07 Apr 2019 01:21:54 +0000 Message-ID: <38bhvF4r6NWO3KPjXFZMsQDq_LDLQjahDaYopMDI5XpvO8_STwEz509kjXRtf1MJAGzDUdG8Vs7nwWEdWxujuODzhDzVj0h0tM-V08MJlFg=@protonmail.com> Reply-To: Michael Mauger Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="116132"; mail-complaints-to="usenet@blaine.gmane.org" To: "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 07 03:22:48 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCwWF-000U49-GP for ged-emacs-devel@m.gmane.org; Sun, 07 Apr 2019 03:22:47 +0200 Original-Received: from localhost ([127.0.0.1]:60986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCwWE-0003R5-H4 for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2019 21:22:46 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hCwVV-0003Qy-Qj for emacs-devel@gnu.org; Sat, 06 Apr 2019 21:22:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hCwVU-0005lG-Qs for emacs-devel@gnu.org; Sat, 06 Apr 2019 21:22:01 -0400 Original-Received: from mail1.protonmail.ch ([185.70.40.18]:24538) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hCwVU-0005kj-96 for emacs-devel@gnu.org; Sat, 06 Apr 2019 21:22:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1554600117; bh=KqHlYGiKEQCuPlBJwbPQq0eJODOKiAHj82d8XZKrPk8=; h=Date:To:From:Reply-To:Subject:Feedback-ID:From; b=PFpTgncDqN/kty7KLBbpnQgIhJe6Kz+tXLLJa2sodA2u19l11VyR2HfYhGu0+DwRW l2nqTWY4/FmCvXHfGEHgIge9+D7A4XA6/IAqNs00eWjRMwMzZYuzUn2ZoVcrRzEKNI ASVSQ99eLaaCpDk8CVw3aiRTrxIhJebbLetSFQEs= Feedback-ID: b6CpL0MxcIA6fpHRkn3ZHzWS0Hoqxbtv_SrHfEzC9D85cLvnRsVk4rKaAOJUw48iy20W0W1VX4whjBYFluIX0w==:Ext:ProtonMail X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.70.40.18 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:235050 Archived-At: shelisp --- execute elisp in shell Comint process (likely shell-mode) can write out Emacs Lisp expressions and have them executed. When the shell process writes out a string of the form: \e_#EMACS# elisp-expr \a Where, "elisp-expr" is a valid elisp expression. The elisp expression is executed as if you had invoked the function within Emacs itself. The elisp expression may include a call to the function `f' which will expand the filename parameter into an appropriate filename for Emacs using the appropriate Tramp prefix if necessary. This script also defines an Alist variable that creates shell commands and the `printf'-style format to generate the full elisp expression with command parameters substituted into the command. A function is placed in the `shell-mode-hook' to actually create the shell functions and aliases to format the elisp expressions and embed them in an escape sequence so that they are detected and executed. In most usage this mode merely allows you to type "e filename" rather than "C-x C-f filename" which isn't much of a savings. However, with this mode enabled, you can write shell scripts to invoke Emacs Lisp functions. But beware, the shell script will not wait for completion of the elisp expression, nor return anything back. This package gives the illusion of having emacsclient on any host in any shell-mode session. -- MICHAEL@MAUGER.COM // FSF and EFF member // GNU Emacs sql.el maintainer