From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Last call for lua-mode contributors Date: Fri, 20 Jan 2012 14:12:08 +0900 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1327036383 29253 80.91.229.12 (20 Jan 2012 05:13:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 20 Jan 2012 05:13:03 +0000 (UTC) Cc: Emacs Dev To: Ken Raeburn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 20 06:12:57 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ro6mW-0004c8-7D for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 06:12:56 +0100 Original-Received: from localhost ([::1]:40501 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6mV-0001ys-Lk for ged-emacs-devel@m.gmane.org; Fri, 20 Jan 2012 00:12:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6mS-0001yc-96 for emacs-devel@gnu.org; Fri, 20 Jan 2012 00:12:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ro6mQ-0005vU-Pz for emacs-devel@gnu.org; Fri, 20 Jan 2012 00:12:52 -0500 Original-Received: from mail-lpp01m010-f41.google.com ([209.85.215.41]:58908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ro6mQ-0005vI-KH for emacs-devel@gnu.org; Fri, 20 Jan 2012 00:12:50 -0500 Original-Received: by lagw12 with SMTP id w12so117028lag.0 for ; Thu, 19 Jan 2012 21:12:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=OhIUMIn0Cg+OrAIt5xj0gRyJaboC2DANxBLe2mPTIV4=; b=Nlhs4ieWv2IwsImI62l11aUmrIc7YksSlV1reGU6VaJxGTrosNiiAXy4Cu1/Df4EWH v8JYhRljL7MZoHycC0Gfg625p7f0YU1Xz3KlJcLKhqYwgSTNkNvJUlAuNgcInrVsZ6G+ Y5CXoX9A6/ggLlH9lDw8rTNDdmXJZqMIruKpA= Original-Received: by 10.112.39.138 with SMTP id p10mr7156826lbk.98.1327036369332; Thu, 19 Jan 2012 21:12:49 -0800 (PST) Original-Received: by 10.112.49.165 with HTTP; Thu, 19 Jan 2012 21:12:08 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: aIXJUrYixoCAMqe8pe-QiqTWm7Y X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.41 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:147755 Archived-At: 2012/1/20 Ken Raeburn : > My "instincts" have long been to interpret "word" as "identifier or > keyword" in programming modes, to the point of customizing the > syntax tables at startup to make "_" a word component. Not for > regular expressions, but for word-motion commands; I like the fact > that I can skip over one identifier with M-f no matter how many > underscores it contains -- string_to_widget, stringToWidget, > string2widget, and stringtowidget are all treated the same. It's > also more useful in constructing keyboard macros that kill-word > identifiers and later yank them from the kill ring; typing in a > regexp search would be much more annoying. Emacs contains convenient commands to do exactly those things regardless of word-syntax: C-M-f (forward-sexp), C-M-k (kill-sexp) etc. Obviously these commands are even _more_ "reliable" in that sense because they work the same in _all_ programming modes, and don't depend on user-customization. So when editing in a programming-mode buffer, one can use whichever unit is most suited for the job: moving over/killing/etc _symbols_ if that's what one wants to do, but allowing convenient editing of words within symbols when _that's_ the goal -- and in my experience, I very often want to the latter, even when programming (which is why lua-mode drives me crazy). One really can have the best of all worlds: convenience, reliability, consistency, flexibility ... but only if modes don't randomly screw around with syntax... For instance, I want to write a new function "mypackage_frob_numnum". I copy an existing function "mypackage_snort_numnum", and change "frob" to "snort" ... but in lua-mode the hardwired-into-my-fingers method of doing this doesn't work, I have to hit C-f a bunch of times (typically only _after_ trying to use M-f and having it do the wrong thing)... > I haven't made the customization yet at my new (well, ~2 years) job > -- but that's because our coding standards use > camelCaseAndNoUnderscores so the word-motion commands already work > on identifiers and not on (English) words. (Though I've been > dealing with Linux code lately, so it may be time to make the > change.) If I often wanted to deal with the individual English > words making up an identifier, the handling of underscore wouldn't > be enough to make Emacs work correctly. [There are actually modes which make word-commands respect "STuDlyCapS" though...] > I realize I'm much closer to the power-user end of the spectrum than > most typical users, but among those heavily using programming modes, > is this such a strange mind-set? Wellllllll.... it does seem like a "power-user," and especially a programmer, would be most likely to know about and use Emacs' programming-specialized movement commands ..... :] -miles --=20 Cat is power. =A0Cat is peace.