all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* symbols verses words
@ 2011-03-03  0:20 Perry Smith
  2011-03-03  7:52 ` Andreas Röhler
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Perry Smith @ 2011-03-03  0:20 UTC (permalink / raw)
  To: GNU Emacs List

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




^ permalink raw reply	[flat|nested] 11+ messages in thread
[parent not found: <mailman.10.1299111607.15358.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2011-03-05  4:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-03  0:20 symbols verses words Perry Smith
2011-03-03  7:52 ` Andreas Röhler
2011-03-03 10:19 ` Tassilo Horn
2011-03-03 14:14   ` Perry Smith
2011-03-03 14:48     ` Tassilo Horn
2011-03-03 19:25       ` Perry Smith
     [not found]     ` <mailman.9.1299163745.10269.help-gnu-emacs@gnu.org>
2011-03-03 15:34       ` rusi
2011-03-04  9:06   ` Andreas Röhler
2011-03-03 14:26 ` MBR
2011-03-03 14:33   ` Perry Smith
     [not found] <mailman.10.1299111607.15358.help-gnu-emacs@gnu.org>
2011-03-05  4:36 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.