help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: symbols verses words


From: MBR
Subject: Re: symbols verses words
Date: Thu, 03 Mar 2011 09:26:58 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

Verses are made up of words and words are made up of symbols.  So the order should be "symbols words verses", not "symbols verses words".

Oh, you meant "versus" not "verses".  OK.  I'll shut up now.

    Mark

On 3/2/2011 7:20 PM, Perry Smith wrote:
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 \<foo\> but really it seems that I should be doing \_<foo\_> ... 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 \_<this\_> I hit the first and third this -- which is exactly what I want.  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]