[Top][All Lists]

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

Re: parinfer-mode for Emacs might be neat for encouraging Lisp adoption

From: Marcin Borkowski
Subject: Re: parinfer-mode for Emacs might be neat for encouraging Lisp adoption
Date: Fri, 13 Nov 2015 15:49:14 +0100
User-agent: mu4e 0.9.15; emacs

On 2015-11-13, at 12:32, Oleh Krehel <address@hidden> wrote:

> Marcin Borkowski <address@hidden> writes:
>> Oleh's lispy does a similar (though not identical) thing.
> I've looked through the Parinfer web page and I don't think it's a great
> idea (it's a neat trick though):
> - It doesn't solve the problem of pasting unbalanced code.
> - It relies on indentation to guess the thing to do.
> - The thing to do might be surprising.
> + It balances parens for potentially generic commands that know nothing
>   of Parinfer.

Interesting thoughts.  I'd agree with the first one and the third one -
the second one might be a plus for some folks, and with experience you'd
be less and less surprised by various behaviors.  (BTW, lispy can be
a bit surprising too!)

> I think the first 3 negative points probably outweigh the single
> positive point. Still, it would be cool to try it if anyone is up for
> implementing it.

Not me, definitely.

> By the way, is anyone else on emacs-devel using lispy?  It's a really
> cool way to quickly navigate, edit, examine, and debug Elisp.  It was
> intended to be an easier Paredit, so picking it up shouldn't be too
> hard, but it will probably take a long while to pick up everything and
> reach top efficiency. See https://github.com/abo-abo/lispy if you're
> interested.

Hear, hear!

I definitely do not use even 10% of the power of lispy; still, if only
for hjkl, f, () and <> commands, it's a huge boost!  Also, C is quite
useful.  And q, of course - it's a huge time-and-keystroke-saver.  Also
[] and {}, and " (especially with an active region!).  Only recently did
I learn about sw (cool!), and I use xi/xc from time to time (and not
only to show off when I show Emacs to my coworkers!), and that's pretty
much it as far as my usage goes (at least now).

In fact, I have a blog post on Lispy in the pipeline (it will still have
to wait a few weeks probably).

And a funny thing is that after learning (the basics of) lispy, I want
to have more vim-like, one-finger keystrokes (no C-/M- for common tasks)
- I plan to define a few hydras for navigation in e.g. LaTeX documents.

Oleh, thanks for this great package!

> It also has a bunch of integration tests (I saw this discussed in a
> recent thread). The tests look like this:
>     (should (string= (lispy-with "(|(a) (b) (c))" "j")
>                      "((a) |(b) (c))"))
> The parts are:
> 1. The buffer state before, including point and mark.
> 2. The user input.
> 3. The buffer state after, including point and mark.
> There are around 700 of these tests and they run very fast, around 1.5s
> to finish all of them. I think it would be cool for ERT to have this
> kind of interface, and functions like `forward-list', `up-list',
> `beginning-of-defun' etc could be tested this way.
> These type of tests are also a good way to learn new bindings (since
> they're built into the test), and what they should do in specific
> situations (since it's not easy for the user to experience each
> situation which results in a different branch taken by the command in
> question).

And that I didn't know.  Cool, too!


Marcin Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University

reply via email to

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