From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jo=E3o_T=E1vora?= Newsgroups: gmane.emacs.help Subject: Re: moving in js Date: Fri, 10 Aug 2012 02:14:41 +0100 Message-ID: References: <5021685A.2080408@easy-emacs.de> <5021FB1B.1070201@easy-emacs.de> <50234E6E.4060303@easy-emacs.de> <5023E330.8070205@easy-emacs.de> <5023F124.50900@easy-emacs.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344561325 28725 80.91.229.3 (10 Aug 2012 01:15:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Aug 2012 01:15:25 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org List" To: =?ISO-8859-1?Q?Andreas_R=F6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 10 03:15:24 2012 Return-path: Envelope-to: geh-help-gnu-emacs@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 1Szdoq-00044U-LO for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Aug 2012 03:15:16 +0200 Original-Received: from localhost ([::1]:59309 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szdop-0000pB-JZ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Aug 2012 21:15:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szdog-0000mc-8f for help-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:15:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Szdod-0008Pi-KI for help-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:15:06 -0400 Original-Received: from mail-pb0-f41.google.com ([209.85.160.41]:35420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Szdod-0008MT-Dl for help-gnu-emacs@gnu.org; Thu, 09 Aug 2012 21:15:03 -0400 Original-Received: by pbbro12 with SMTP id ro12so1995872pbb.0 for ; Thu, 09 Aug 2012 18:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=ubaF/XNDNfS64MgzXQ1oQc7yE+uBrx30AZkvNZMyVDs=; b=i7aNtkek49q1sYa8bzEvFGeRWTKUloge4ZLXQN5T+V1bRn+dcZZgnlUe60X+SRYbko WXLqJGGNlOn0Mlhf0H2goYQTV4d7R07nOe4cobcFGevoPItYFr+eZZLnlBGrMZAOCjHH VV7x45VSIV1y0tomG3c4kDFodMiTHSe6SuGIlNNK8ShUucR3uv8Z6yObGjQTqO+0u4ay K5dJ7Ng3JYfzRDeiyRvCoOam5X/AKsekFVa1ARhTOfAsBOXa4mVPoOBc/THFu/hXerAn 7qcyErGIYCH3rOIimCwBTzX/o7w8e85dsAOjO2JOW0/gP4c4ReprNWWsMIVBcNjqSCj6 wryg== Original-Received: by 10.68.222.103 with SMTP id ql7mr8218899pbc.48.1344561302166; Thu, 09 Aug 2012 18:15:02 -0700 (PDT) Original-Received: by 10.142.70.4 with HTTP; Thu, 9 Aug 2012 18:14:41 -0700 (PDT) In-Reply-To: <5023F124.50900@easy-emacs.de> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.41 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:86278 Archived-At: > Single words and symbols also are not balanced expressions IMO. > When on ba|z > > (foo (bar ba|z) quux) > > C-M-b would reach |baz > > (foo (bar |baz) quux) > > i.e, it would do backward-word No, it's doing backward-sexp. "baz" happens to also be a sexp (an atomic), and it's not a question of opinion (see below). > a repeat would do backward-word again, a third would error > > Can't see any relation to stipulated move over balanced expression here. > > Looks fairly arbitrary. It's not. In lisp-mode, where this is clearer (but as we have seen it can and has been generalized to other programming modes), a word and a symbol are also sexp's. See http://en.wikipedia.org/wiki/S-expression: a sexp can be an atom or a list ( a . b ) where a and b are themselves sexp's. As you have found, backward-word doesn't error, because it doesn't care about sexp's. But backward-sexp does :-) , indeed it *must* error to tell you there are no more sexp's backwards at that level. IMO this is one of the best designed features in Emacs, and one many non-Emacs users envy. When I move and delete with the C-M-* keys, I get structured editing for free. And (shameless plug) if I add autopair.el to that, I don't need paredit.el at all. Furthermore, because Emacs generalizes the sexp concept to other modes via syntax-tables, structured editing (and autopair) "just work" in almost every programming mode that defines delimiters. > CC to help, as it might be of some interest for others to. of course, I forgot to send my previous message to the list. --=20 Jo=E3o T=E1vora