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 17:15:28 +0100 Message-ID: <87lha16fkv.fsf@gmail.com> References: <877flow194.fsf@dustycloud.org> <871tbv4c9a.fsf@mbork.pl> <874mgq879a.fsf@gmail.com> <877fll7w18.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447431369 24322 80.91.229.3 (13 Nov 2015 16:16:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Nov 2015 16:16:09 +0000 (UTC) Cc: emacs-devel To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 13 17:16:04 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 1ZxH17-0005rd-Pb for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 17:16:01 +0100 Original-Received: from localhost ([::1]:53844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH17-0001UD-CF for ged-emacs-devel@m.gmane.org; Fri, 13 Nov 2015 11:16:01 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH0f-0001Tt-LM for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:15:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxH0c-00063M-AY for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:15:33 -0500 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:37959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxH0c-00063I-4l for emacs-devel@gnu.org; Fri, 13 Nov 2015 11:15:30 -0500 Original-Received: by wmec201 with SMTP id c201so37462485wme.1 for ; Fri, 13 Nov 2015 08:15:29 -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:content-transfer-encoding; bh=17k0ioHoSIRHBw1PkDlq5JyDkcLs5s05gD8iJyRXq+U=; b=U9BEnGDwcHWTqmlDSPb1re2zRAz4mnrLTIAlxBLeeNIRqM1u2gJGju+w1wYSIvza5V e+FAuClKIxXA1EN26PE5LZYkQFXxjpb8ByuErfJ4X/XRqoZ036yVWoZWbBfsJPFaf7Ea zhyphy6JEczeWAtiIG/0o+7SJ9MUqtVbzgpjHFkCNT+dJ/T2ECUBGEx+f/tOXuf59MXK l4vVAf4hkyZl/iF+Q4OpvILCnGzfj8ZNc8tzpcGU0kLmrR76xYLmLcImxzYPeeR+2y9D wKzc+XYas5U2x3u4kcdYYJ2OmJg0M0ulM8efcC2w/7wuL9rLnns12ejIWpnN3qlHuzUI ox8g== X-Received: by 10.28.30.3 with SMTP id e3mr4841485wme.78.1447431329475; Fri, 13 Nov 2015 08:15:29 -0800 (PST) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id e79sm4595969wmd.16.2015.11.13.08.15.28 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Nov 2015 08:15:28 -0800 (PST) In-Reply-To: (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vora=22's?= message of "Fri, 13 Nov 2015 15:55:35 +0000") 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::236 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:194383 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > On Fri, Nov 13, 2015 at 3:34 PM, Oleh Krehel wrote: >> Jo=C3=A3o T=C3=A1vora 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).