From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: parinfer-mode for Emacs might be neat for encouraging Lisp adoption Date: Fri, 13 Nov 2015 15:49:14 +0100 Message-ID: <87y4e2nedx.fsf@mbork.pl> References: <877flow194.fsf@dustycloud.org> <871tbv4c9a.fsf@mbork.pl> <874mgq879a.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447426193 31503 80.91.229.3 (13 Nov 2015 14:49:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 14:49:53 +0000 (UTC) Cc: Christopher Allan Webber , Emacs developers To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 15:49:44 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZxFfY-0007ai-AG for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 15:49:40 +0100 Original-Received: from localhost ([::1]:53425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxFfX-0002fQ-D0 for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 09:49:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxFfS-0002c0-J6 for emacs-devel@gnu.org; Fri, 13 Nov 2015 09:49:36 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxFfO-0003Ch-7A for emacs-devel@gnu.org; Fri, 13 Nov 2015 09:49:34 -0500 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:40240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxFfN-000395-TK for emacs-devel@gnu.org; Fri, 13 Nov 2015 09:49:30 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id B37118F2018; Fri, 13 Nov 2015 15:49:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SwEu8uiTiWo1; Fri, 13 Nov 2015 15:49:23 +0100 (CET) Original-Received: from localhost (unknown [109.232.24.28]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 99B748F2017; Fri, 13 Nov 2015 15:49:23 +0100 (CET) User-agent: mu4e 0.9.15; emacs 25.0.50.1 In-reply-to: <874mgq879a.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:5e00:2:52::8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:194368 Archived-At: On 2015-11-13, at 12:32, Oleh Krehel wrote: > Marcin Borkowski 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! Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University