[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: over-engineered (and under-standardized) inferior interfaces
From: |
Michael Mattie |
Subject: |
Re: over-engineered (and under-standardized) inferior interfaces |
Date: |
Mon, 25 Aug 2014 02:23:00 -0700 |
On Thu, 21 Aug 2014 15:20:32 -0400
Sam Steingold <address@hidden> wrote:
> Hi,
>
> I am talking about the various inferior-FOO modes which run on top of
> the comint mode and talk to an underlying interpreter.
> E.g., sql, R(ESS), lisp, bash, python, pig, &c &c &c.
>
> There are two main problems I have with them:
>
>
> 1. Over-engineering of connecting to the interpreter.
>
> Take a look, e.g., at sql.el:sql-product-alist with its program,
> options, login &c.
>
> It all makes perfect sense, I am sure, most of the time.
>
> However, sometimes the way I connect is more convoluted, e.g., I need
> to ssh to server, then sudo to the right user, only then invoke a
> command.
> This means that I have to set sql-program to "ssh", then pull all the
> sudo &c into sql-options, then disable login-params because sql.el
> stuffs them into the command line too early.
>
> It would be nice if, as an alternative to all the many options, I
> could just tell Emacs "run this command line as is and ask me no
> questions".
>
>
>
> 2. Lack of standardization in interaction and keybindings.
>
> The few standard interaction operations are:
>
> -- start an interaction (e.g., run Python on a python-mode buffer)
> -- switch to an existing interaction
> -- send a region, paragraph, function, line
>
> standard options are
>
> -- switch to the interaction buffer after sending the code there?
> -- display the code sent in the buffer?
>
> these things are done differently (if at all) in all the various
> modes. E.g., not all modes bind C-c C-z to switch to the interaction
> buffer. Not all even have a function to send the current line and
> move to the next line (granted, this does not make sense for _all_
> languages).
>
> I wonder if it would be possible to abstract this into a macro:
>
> (define-interaction name get-interaction-buffer-function map)
>
> which will define all those functions and options above (and add
> standard bindings to the map)
>
>
> Thank you for your attention.
>
>
> PS. I know that ESS, pig-mode and some others are not a part of Emacs.
>
I did standard interface, standard API, and used a dynamic ring as a
model
https://lispblivet.sx/code/?p=emacs.git;a=blob_plain;f=emacs/local/elisp/borg-repl.el;hb=refs/heads/master
the idea is impose a standard interface with bindings that map to
buffer local function pointers.
for a mode API side do a dynamic ring with rotation with some nice
facades.
- Re: over-engineered (and under-standardized) inferior interfaces, (continued)
- Re: over-engineered (and under-standardized) inferior interfaces, Michael Albinus, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Sam Steingold, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Michael Albinus, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Sam Steingold, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Michael Albinus, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Sam Steingold, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Sam Steingold, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Michael Albinus, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Tassilo Horn, 2014/08/27
- Re: over-engineered (and under-standardized) inferior interfaces, Michael Albinus, 2014/08/27
Re: over-engineered (and under-standardized) inferior interfaces,
Michael Mattie <=