unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleh Krehel <ohwoeowho@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: parinfer-mode for Emacs might be neat for encouraging Lisp adoption
Date: Fri, 13 Nov 2015 17:15:28 +0100	[thread overview]
Message-ID: <87lha16fkv.fsf@gmail.com> (raw)
In-Reply-To: <CALDnm51R7EMHc37ALsVYLUD-sjp_UyY0LznT_cvYB7QqDtzNeg@mail.gmail.com> ("João Távora"'s message of "Fri, 13 Nov 2015 15:55:35 +0000")

João Távora <joaotavora@gmail.com> writes:

> On Fri, Nov 13, 2015 at 3:34 PM, Oleh Krehel <ohwoeowho@gmail.com> wrote:
>> João Távora <joaotavora@gmail.com> writes:
>>
>>> Hi Oleh,
>>>
>>> What do you think of this prototype?
>
>> I think this is what `aggresive-indent-mode' does. Additionally "DEL" on
>> `let*' doesn't work for me for some reason.
>
> Ahaha. Right. That's what I get for not reading up on prior art :-)
>
>> I've disabled it long time ago, since I use lispy. But I tried just now
>> and the interactive variant of this doesn't work in `electric-pair-mode':
>>
>> (progn
>>   (kill-new "(foo")
>>   (yank))
>
> What do you mean, it doesn't work what did you expect to happen?

Well, suppose it was Parinfer-like. Then it would either modify "(foo"
to either "foo" or "(foo)". That's what I meant: automatic re-balancing
after each buffer change.

> electric-pair-mode only kicks in when inserting parenthesis interactively.

I understand. I'm saying that neither Parinfer, nor lispy, nor
electic-pair-mode solves the problem of pasting "(foo".

>> The thing with lispy is that you get /extra/ free shortcuts only for
>> LISP. These free shortcuts are possible to get only for LISP because of
>
> To be fair to lispy, probably also for JSON and some other languages.

You can enable lispy for JSON. I just checked, "C" (`lispy-convolute')
still works. Even "w" (`lispy-move-up') sort-of works :)

>> the
>> The first `forward-list' will work fine, but the second one will
>> throw. Why not just call `up-list' in that case?
>> "]" (`lispy-forward') is `forward-list' with exactly that modification.
>
> I like that it forbids me to go past the end of the list. I even use that
> for programming without looking at the computer. Just forward list a
> million times until you hear the bell.

Also a feature in lispy: "99j" or "999]" or "99>" will not exit the
parent list.

> I understand lispy's convenience philosophy, but it's undeniable that
> it expands the instruction set. I'm after the low hanging fruit: keep
> the same reduced instruction set and have Emacs resonably guess
> what I'm trying to do.

It's a reasonable choice, although I made a different one.
What I try to do is to use an extended instruction set until I sieve out
a super-efficient subset of that instruction set.

For example, "j" is usually a better command than "C-M-n". In plain
Emacs terms, from the left paren, "j" translates to "C-M-n C-M-n C-M-p",
i.e. it selects the next sexp while staying on the same side (left or
right).



  reply	other threads:[~2015-11-13 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-11 23:30 parinfer-mode for Emacs might be neat for encouraging Lisp adoption Christopher Allan Webber
2015-11-12 12:45 ` Marcin Borkowski
2015-11-13 11:32   ` Oleh Krehel
2015-11-13 14:49     ` Marcin Borkowski
2015-11-13 15:34     ` João Távora
2015-11-13 15:57       ` Marcin Borkowski
2015-11-13 15:58       ` Marcin Borkowski
2015-11-13 16:00         ` João Távora
2015-11-20  2:37           ` Stefan Monnier
     [not found]     ` <CALDnm53TD9N6ZYhALP4ynVANAUpKJTWATNmL_FA80JrOpdBErQ@mail.gmail.com>
     [not found]       ` <877fll7w18.fsf@gmail.com>
2015-11-13 15:55         ` João Távora
2015-11-13 16:15           ` Oleh Krehel [this message]
2016-02-15 20:05 ` Christopher Allan Webber

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87lha16fkv.fsf@gmail.com \
    --to=ohwoeowho@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).