From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: symbols verses words Date: Thu, 03 Mar 2011 08:52:27 +0100 Message-ID: <4D6F48BB.7010101@easy-emacs.de> References: <06BF1211-A1CA-4E57-ADF4-8C89EF6ACDE1@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1299138543 32485 80.91.229.12 (3 Mar 2011 07:49:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2011 07:49:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 03 08:48:59 2011 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 1Pv3HO-00075V-Si for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 08:48:59 +0100 Original-Received: from localhost ([127.0.0.1]:44088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv3HO-0006ig-CR for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Mar 2011 02:48:58 -0500 Original-Received: from [140.186.70.92] (port=48526 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pv3Gd-0006hn-Ut for help-gnu-emacs@gnu.org; Thu, 03 Mar 2011 02:48:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pv3Gc-0007X2-9W for help-gnu-emacs@gnu.org; Thu, 03 Mar 2011 02:48:11 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.171]:55888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pv3Gb-0007WZ-Rn for help-gnu-emacs@gnu.org; Thu, 03 Mar 2011 02:48:10 -0500 Original-Received: from [192.168.178.29] (brln-d9ba32bd.pool.mediaWays.net [217.186.50.189]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MVJte-1PVBk12C9m-00YjZb; Thu, 03 Mar 2011 08:48:07 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: <06BF1211-A1CA-4E57-ADF4-8C89EF6ACDE1@gmail.com> X-Provags-ID: V02:K0:n8JcGIg8he+fFl9cmn3l8TmOqQMmh5g0dbzsDJrvCqt ieTMXbky7A9ADTSC3ho9J5e7kDemMCq/kGTh/VrfJMvGjTf2VH 61B9LA4mc09HiWVnIjAjRHHAHLkcAqskUhLSuExyEGIGJupWfo ftt88PoYi0MecTODQg02NUYreusG5B0z5sINO6pfU8hEFBTIHy W11EaYtXmR/hdIFoCxd9/gfbuNF6uFU5KDQrU62i+Y= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.171 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:79733 Archived-At: Am 03.03.2011 01:20, schrieb Perry Smith: > I need some help understanding Emac's design. I use a lot of "word" constructs where I *think* I should be using symbol. For example, if I'm writing C code and I want to find foo but not foo_bar, I usually do \ but really it seems that I should be doing \_ ... fine. I can make that adjustment. But when I do incremental search, I often hit ^w to pull in the next word but what I really want (often but not always) is to pull in the next symbol (into the search string). So if I'm sitting at this_that, I'd ilke to hit ^W (perhaps) and pull in this_that instead of just this. > > So, I started looking at isearch-yank-word-or-char and I was going to concoct isearch-yank-symbol-or-char and got stuck-- at least briefly. Because not only is _ marked as symbol, -, +, /, *, etc are marked as symbol characters too. So now, I'm confused... > > If I have: this this_that this-that > > and search for \_ I hit the first and third this -- which is exactly what I want. Which should not happen IMHO, as `\_>' matches the empty string, but only at the end of a symbol and your third this of this-that is not at the end. BTW can't reproduce this with C-M-s, isearch-repeat-forward it doesn't match this-that, as expected. Looks like a bug, maybe try the last pre-release, which works fine here: ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-23.3-rc1.tar.gz Andreas -- https://code.launchpad.net/~a-roehler/python-mode/python-mode-components https://code.launchpad.net/s-x-emacs-werkstatt/ But how is it doing that since this_that and this-that are the same as far as looking at the syntax table entries? They are both wwww_wwww. > > I'd like to understand how the \_< and \_> constructs work so I can make my isearch-yank-symbol-or-char work in a consistent manner. > > Thanks, > Perry > > >