From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Troy Hinckley Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: shelisp Date: Wed, 10 Apr 2019 18:54:34 -0600 Message-ID: <910F4703-FDA0-495F-9695-8BEFE949C368@gmail.com> References: <38bhvF4r6NWO3KPjXFZMsQDq_LDLQjahDaYopMDI5XpvO8_STwEz509kjXRtf1MJAGzDUdG8Vs7nwWEdWxujuODzhDzVj0h0tM-V08MJlFg=@protonmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="40846"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "emacs-devel@gnu.org" To: Michael Mauger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 11 02:54:47 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 1hENzK-000AVU-UX for ged-emacs-devel@m.gmane.org; Thu, 11 Apr 2019 02:54:47 +0200 Original-Received: from localhost ([127.0.0.1]:39732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hENzJ-0003Av-Nx for ged-emacs-devel@m.gmane.org; Wed, 10 Apr 2019 20:54:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hENzD-0003Ae-Af for emacs-devel@gnu.org; Wed, 10 Apr 2019 20:54:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hENzC-00011V-2q for emacs-devel@gnu.org; Wed, 10 Apr 2019 20:54:39 -0400 Original-Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:46587) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hENzB-000118-P4 for emacs-devel@gnu.org; Wed, 10 Apr 2019 20:54:38 -0400 Original-Received: by mail-io1-xd2e.google.com with SMTP id p23so3847433iol.13 for ; Wed, 10 Apr 2019 17:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o0PWF8rbbGKRPxO2ZsYQVQZwLOKBhVTArHno59Fa+zw=; b=Imi/YthB6L21bDddUZJQGOemwIWy/+BkhVtrFiNVbmbBPzv/RhG0BbVq2OzRFhSLi6 gvr6RR527KYJQvyK6BOlcpqIwWRmIGO/3RACEfjWZ4vowCQlD20s9z4Dj8exu0J4ZMkt 47L/+F6mZsRJA5JxGV6nAgLzh3ekquWDiRrB1HCOD0vNyjjeprD92iGJRhd/BCY/rGiD 0dprcspgyF8lLZ3/yYKq5RxPnyAJn6D8i7dYtl2zpwjJTgVv6Nbkr63dlhejEG9Pm6ft lmoRroRfYQITSyEr8gcKV3MfxCh5/8Pj4eOyZQ5AUGdq9dic0uCVPkaz/4AqeQ1ORsyf B6ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=o0PWF8rbbGKRPxO2ZsYQVQZwLOKBhVTArHno59Fa+zw=; b=doQqM3J+enPlym8wvzEzh0bIOCLZAo856Ww2rrBP9H3nhm7+o1Xx3qneF5Jgv4WkFo H5ogG54vkSQet5msFJ1LaJPrtNCDpOZeMo/9/Cd94y4QNwYWQ9u1UgmpNxbvaXKZH4RQ hWLQodPNqRLTw6rNcHoqD04w7Bj6WrLpGDoOuFEx9Y8jJLmrRyc+fCt7B+8PaxmQeyz4 fQ13hfGKNYd0HF43wE5QUZ1CztBBEC6JcO9rAKcdyD847BooTyYn11B6RjGELDjhy/ZF HspzPQIGL3Uk/qj3N2r1VLFZyUsNpxhDHfB+K6F9vkHsL8Wcrk7Q/ro7XxfXAieFbo9A oyqQ== X-Gm-Message-State: APjAAAVQm+tOEqLTJ7xEmeUj/LeLJFW8S1Wc46UyERel17Kb4jg2N12H ROQZJYAoNRxKLCxMztJPJgsj0ImTg/Q= X-Google-Smtp-Source: APXvYqwhJ1uTF/FVruTX8nGT2+OLi2tzlBuZPqQE+oq2xBwSepzhGptCalbZm35bbnQsvWCxOFzmDw== X-Received: by 2002:a6b:b7d8:: with SMTP id h207mr32219328iof.210.1554944075812; Wed, 10 Apr 2019 17:54:35 -0700 (PDT) Original-Received: from [192.168.1.123] (h24-56-179-184.ftclco.broadband.dynamic.tds.net. [24.56.179.184]) by smtp.gmail.com with ESMTPSA id a8sm14556464iol.35.2019.04.10.17.54.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 17:54:35 -0700 (PDT) X-Mailer: iPhone Mail (16D57) In-Reply-To: <38bhvF4r6NWO3KPjXFZMsQDq_LDLQjahDaYopMDI5XpvO8_STwEz509kjXRtf1MJAGzDUdG8Vs7nwWEdWxujuODzhDzVj0h0tM-V08MJlFg=@protonmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2e 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:235262 Archived-At: Do you have this code hosted somewhere? - Troy Hinckley > On Apr 6, 2019, at 7:21 PM, Michael Mauger wrote: > > 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 > > >