From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Drummond Newsgroups: gmane.emacs.help Subject: Re: Understanding Word Boundaries Date: Sat, 26 Jun 2010 11:46:56 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00032557535266e97c0489ec9c3e X-Trace: dough.gmane.org 1277549270 6952 80.91.229.12 (26 Jun 2010 10:47:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 Jun 2010 10:47:50 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Gary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jun 26 12:47:47 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OSSvK-0002LA-3e for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Jun 2010 12:47:46 +0200 Original-Received: from localhost ([127.0.0.1]:52415 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSSvJ-0003rO-CX for geh-help-gnu-emacs@m.gmane.org; Sat, 26 Jun 2010 06:47:45 -0400 Original-Received: from [140.186.70.92] (port=43763 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSSus-0003r2-W7 for help-gnu-emacs@gnu.org; Sat, 26 Jun 2010 06:47:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSSur-0007sL-IA for help-gnu-emacs@gnu.org; Sat, 26 Jun 2010 06:47:18 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:54165) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSSur-0007s6-FB for help-gnu-emacs@gnu.org; Sat, 26 Jun 2010 06:47:17 -0400 Original-Received: by iwn9 with SMTP id 9so1419197iwn.0 for ; Sat, 26 Jun 2010 03:47:16 -0700 (PDT) Original-Received: by 10.231.33.76 with SMTP id g12mr800020ibd.194.1277549236119; Sat, 26 Jun 2010 03:47:16 -0700 (PDT) Original-Received: by 10.231.182.83 with HTTP; Sat, 26 Jun 2010 03:46:56 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:73978 Archived-At: --00032557535266e97c0489ec9c3e Content-Type: text/plain; charset=ISO-8859-1 On 23 June 2010 10:02, Gary wrote: > Paul Drummond writes: > > ** Example 2 > > > > When editing C++ files I often need to delete the "ClassName::" part when > > declaring functions in the header: > > > > void ClassName::function(); > > ^ > > > > With point at the start of ClassName I want to press M-d twice to delete > > ClassName and :: but "::" isn't recognised as a word. In Vim I just > > Twice? Three times, shirley? Class and Name are both words... > Yeah, I agree about CamelCase but I wanted to keep the example simple ;) Because it needs to be defined somewhat differently for natural > languages and different programming languages, at a guess. What a word > is depends entirely on the context you (and I) decide, and they may well > be different (see two versus three key presses above). > But each context I use has a major mode and I would expect each major mode to have sensible default word boundaries but they don't. Paul Drummond. --00032557535266e97c0489ec9c3e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On 23 June 2010 10:02, Gary &l= t;help-gnu-emacs@garydjon= es.name> wrote:
Paul Drummond writes:
> ** Example 2
>
> When editing C++ files I often need to delete the "ClassName::&qu= ot; part when
> declaring functions in the header:
>
> void ClassName::function();
> =A0=A0=A0=A0=A0=A0 ^
>
> With point at the start of ClassName I want to press M-d twice to dele= te
> ClassName and :: but "::" isn't recognised as a word.=A0= In Vim I just

Twice? Three times, shirley? Class and Name are both words...

Yeah, I agree about CamelCase but I wanted to keep the example simple ;)
Because it = needs to be defined somewhat differently for natural
languages and different programming languages, at a guess. What a word
is depends entirely on the context you (and I) decide, and they may well be different (see two versus three key presses above).

But each context I use has a major mode and I would expect each major mode to have sensible default word boundaries but they don't.

Paul Drummond. --00032557535266e97c0489ec9c3e--