emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ELPA] New package: shelisp


From: Troy Hinckley
Subject: Re: [ELPA] New package: shelisp
Date: Wed, 10 Apr 2019 18:54:34 -0600

Do you have this code hosted somewhere?

- Troy Hinckley

> On Apr 6, 2019, at 7:21 PM, Michael Mauger <address@hidden> 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.
> 
> --
> address@hidden // FSF and EFF member // GNU Emacs sql.el maintainer
> 
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]