all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Mattie <codermattie@runbox.com>
To: emacs-devel@gnu.org
Cc: sds@gnu.org
Subject: Re: over-engineered (and under-standardized) inferior interfaces
Date: Mon, 25 Aug 2014 02:23:00 -0700	[thread overview]
Message-ID: <20140825022300.6049e88c@runbox.com> (raw)
In-Reply-To: <m2vbpl1wfz.fsf@sds-macbook-pro.home>

On Thu, 21 Aug 2014 15:20:32 -0400
Sam Steingold <sds@gnu.org> 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.




      parent reply	other threads:[~2014-08-25  9:23 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-21 19:20 over-engineered (and under-standardized) inferior interfaces Sam Steingold
2014-08-21 20:29 ` Stefan Monnier
2014-08-21 21:21   ` Jorgen Schaefer
2014-08-21 22:00     ` Dmitry
2014-08-21 22:10       ` Eric S. Raymond
2014-08-22  3:45     ` Stefan Monnier
2014-08-22  5:57       ` Andreas Röhler
2014-08-22 10:55       ` Phillip Lord
2014-08-22 11:41         ` Jorgen Schaefer
2014-08-22 21:29   ` Sam Steingold
2014-08-31 16:30   ` Elias Mårtenson
2014-08-31 20:01     ` Stefan Monnier
2014-08-21 20:43 ` Andreas Schwab
2014-08-21 21:06   ` Sam Steingold
2014-08-22  5:56     ` Andreas Schwab
2014-08-22  6:17     ` Michael Albinus
2014-08-22 21:25       ` Sam Steingold
2014-08-23 15:16         ` Michael Albinus
2014-08-25 17:05           ` Sam Steingold
2014-08-27  6:57             ` Michael Albinus
2014-08-27 10:46               ` Sam Steingold
2014-08-27 11:29                 ` Michael Albinus
2014-08-27 12:32                   ` Sam Steingold
2014-08-27 12:51                     ` Michael Albinus
2014-08-27 13:00                       ` Sam Steingold
2014-08-27 13:16                         ` Michael Albinus
2014-08-27 13:52                           ` Sam Steingold
2014-08-27 13:57                             ` Sam Steingold
2014-08-27 18:17                               ` Michael Albinus
2014-08-28  1:01                                 ` Sam Steingold
2014-08-28  8:48                                   ` Michael Albinus
2014-08-28 16:02                                     ` Sam Steingold
2014-08-28 18:35                                       ` Michael Albinus
2014-08-28 19:22                                         ` Sam Steingold
2014-08-28 19:44                                           ` Michael Albinus
2014-08-28 19:54                                             ` Sam Steingold
2014-08-28 20:04                                               ` Michael Albinus
2014-08-29 15:00                                                 ` Sam Steingold
2014-09-05 14:19                                                   ` Michael Albinus
2014-09-08 13:17                                                     ` Sam Steingold
2014-09-08 14:15                                                       ` Michael Albinus
2014-09-08 14:38                                                         ` Sam Steingold
2014-09-08 14:47                                                           ` Michael Albinus
2014-08-27 14:05                             ` Tassilo Horn
2014-08-27 18:13                               ` Michael Albinus
2014-08-25  9:23 ` Michael Mattie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140825022300.6049e88c@runbox.com \
    --to=codermattie@runbox.com \
    --cc=emacs-devel@gnu.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.