From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Editing Lisp through changing indentation Date: Fri, 19 Jul 2013 11:23:32 +0200 Message-ID: <877ggm3nu3.fsf@zigzag.favinet> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1374225853 4334 80.91.229.3 (19 Jul 2013 09:24:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Jul 2013 09:24:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Barry OReilly Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 19 11:24:12 2013 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 1V06v6-0000ix-Eh for ged-emacs-devel@m.gmane.org; Fri, 19 Jul 2013 11:24:12 +0200 Original-Received: from localhost ([::1]:52387 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06v6-0001SU-1S for ged-emacs-devel@m.gmane.org; Fri, 19 Jul 2013 05:24:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06s3-0005YP-TX for emacs-devel@gnu.org; Fri, 19 Jul 2013 05:21:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V06s2-0005qN-G8 for emacs-devel@gnu.org; Fri, 19 Jul 2013 05:21:03 -0400 Original-Received: from smtp207.alice.it ([82.57.200.103]:49377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06s2-0005q3-4s for emacs-devel@gnu.org; Fri, 19 Jul 2013 05:21:02 -0400 Original-Received: from zigzag.favinet (79.10.68.118) by smtp207.alice.it (8.6.060.26) id 51DA9655021922A7; Fri, 19 Jul 2013 11:20:59 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1V06uh-0004QC-Jp; Fri, 19 Jul 2013 11:23:47 +0200 In-Reply-To: (Barry OReilly's message of "Thu, 18 Jul 2013 23:23:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.103 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:162010 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Barry OReilly () Thu, 18 Jul 2013 23:23:47 -0400 The motivating idea is this: When reading Lisp, I find I pay attention to open parens (because foo is not (foo) is not ((foo))) and just the close parens whose opener is on the same line. When a sexp spans more than one line, I deduce the close paren from indentation. I think this explanation might be clearer if you say "close paren from the preceding sexp". I only understood that nuance after playing with the commands (which work fine, btw). If that's how we read Lisp, then why not edit Lisp that way: change the indentation and let the close parens adjust themselves to be consistent. Well, here i have a different pov. When i edit Lisp, indentation is the last thing to fall into place (i.e., a "fixup" operation, via =E2=80=98C-M-= q=E2=80=99); i prefer to grok/munge whitespace-agnostic sexps first and foremost, via the usual C-M-{SPC,k,f,b,n,p,u,d}, etc. I include "grok" because i read code actively, moving in and around it, watching what mic-paren bolds. The commands you provide can be described as "(un)tucking the sexp at point into the preceding sexp at the tail position", which translates to adding-to /removing-from a function call an argument that happens to be situated following that function call. That's not something i do often. But anyway, it is good to see hacking of this kind. Don't stop! =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) =3D> nil --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlHpBZcACgkQZwMiJEyAdQJDmgCgtNwBpDgSyuXkZt6N8C24xXRQ oswAn3fAogYUCjj2xrPfkMtWkW7SbNLI =qhfg -----END PGP SIGNATURE----- --=-=-=--