From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: parinfer-mode for Emacs might be neat for encouraging Lisp adoption Date: Fri, 13 Nov 2015 12:32:17 +0100 Message-ID: <874mgq879a.fsf@gmail.com> References: <877flow194.fsf@dustycloud.org> <871tbv4c9a.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1447414390 29283 80.91.229.3 (13 Nov 2015 11:33:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 11:33:10 +0000 (UTC) Cc: Christopher Allan Webber , Emacs developers To: Marcin Borkowski Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 12:32:57 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 1ZxCbA-0006lW-5k for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 12:32:56 +0100 Original-Received: from localhost ([::1]:52359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxCb9-0003od-KC for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 06:32:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxCad-0003NM-Tg for emacs-devel@gnu.org; Fri, 13 Nov 2015 06:32:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxCaa-00065e-IT for emacs-devel@gnu.org; Fri, 13 Nov 2015 06:32:23 -0500 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:33396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxCaa-00065P-Cb for emacs-devel@gnu.org; Fri, 13 Nov 2015 06:32:20 -0500 Original-Received: by wmec201 with SMTP id c201so76763199wme.0 for ; Fri, 13 Nov 2015 03:32:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=I2bU7YuoOxjuNths/zmWj/wenIB9x4PhgsVJ1LgBLJg=; b=Rns5ZuxII2DknVbspeSU0Ly8Gp4NTdOR07f4PKSvxqZbJtiwSC2M7a66tIxcCCIRga RbTqZIhGk5dN/u6XRTpKquyifyMzWLXXX8BNiACj2JP+QRWKRDcU93fiRqmQn8Uj2A3D Rx28fmbPUhd70SSwj8P7chVTqVzK7N5tNXCLqPX9Y0+XNyCk7/QOtT+3ju27s6KbnjFF SbE9nXaaxDs1UppS+XrQJS0a+UuT7PC1DpTewCRRpJKhz0rZFjq9DOj6rA+cX69xCNvY 6fOYb1DGTDFpku+rGDfEHW5H9HhpHSXG8GDvLXfcTQG2engw22SlhMT+luYsZuBN9FLn b2+w== X-Received: by 10.194.203.106 with SMTP id kp10mr22394996wjc.86.1447414339337; Fri, 13 Nov 2015 03:32:19 -0800 (PST) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id s9sm3544476wmf.2.2015.11.13.03.32.18 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Nov 2015 03:32:18 -0800 (PST) In-Reply-To: <871tbv4c9a.fsf@mbork.pl> (Marcin Borkowski's message of "Thu, 12 Nov 2015 13:45:37 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::22d 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:194348 Archived-At: Marcin Borkowski writes: > On 2015-11-12, at 00:30, Christopher Allan Webber wrote: > >> Here's a project borrowing some neat ideas from Emacs and extensions >> (especially paredit) on lisp editing and providing some of its own >> ideas, too: >> >> http://shaunlebron.github.io/parinfer/index.html >> >> I could imagine this could make GNU Emacs an even better lisp hacking >> environment for some than it already is, or make jumping in easier, for >> some people. Maybe someone will be inspired and add a plugin for it? >> There's a space listed for editor implementations here: >> >> http://shaunlebron.github.io/parinfer/index.html#editor-plugins >> >> I don't have time to work on this, but I imagine someone on this list >> might find it interesting enough to take for a spin, so I thought I'd >> post it here. At the very least, it's clearly critical for GNU Emacs to >> be the most advanced lisp editing environment there is. ;) > > 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. 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. 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. 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).