Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
keyboard regexp shortcuts
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Perry Smith  
View profile  
 More options Aug 17 2012, 10:20 am
Newsgroups: gnu.emacs.help
From: Perry Smith <pedz...@gmail.com>
Date: Fri, 17 Aug 2012 09:20:20 -0500
Local: Fri, Aug 17 2012 10:20 am
Subject: keyboard regexp shortcuts

Very often, I do a regex search (M-C-s) of \_<foo\_> because I don't want to find bad_foo_dog.

Typing the \ _ < and \ _ > is tedious.  Can someone suggest a way to make that easier?

Thank you,
Perry

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Scott Frazer  
View profile  
 More options Aug 17 2012, 2:04 pm
Newsgroups: gnu.emacs.help
From: Scott Frazer <frazer.sc...@gmail.com>
Date: Fri, 17 Aug 2012 14:04:25 -0400
Local: Fri, Aug 17 2012 2:04 pm
Subject: Re: keyboard regexp shortcuts
On 8/17/12 10:20 AM, Perry Smith wrote:

> Very often, I do a regex search (M-C-s) of \_<foo\_> because I don't want to find bad_foo_dog.

> Typing the \ _ < and \ _ > is tedious.  Can someone suggest a way to make that easier?

> Thank you,
> Perry

Here's what I use:

(defun my-isearch-word ()
   "Surround current input with word/symbol delimiters and turn on regexp matching if necessary."
   (interactive)
   (unless isearch-regexp
     (isearch-toggle-regexp))
   (setq isearch-string (concat "\\_<" isearch-string "\\_>")
         isearch-message (mapconcat 'isearch-text-char-description isearch-string ""))
   (isearch-search-and-update))

(define-key isearch-mode-map (kbd "M-w") 'my-isearch-word)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jambunathan K  
View profile  
 More options Aug 17 2012, 2:54 pm
Newsgroups: gnu.emacs.help
From: Jambunathan K <kjambunat...@gmail.com>
Date: Sat, 18 Aug 2012 00:24:37 +0530
Local: Fri, Aug 17 2012 2:54 pm
Subject: Re: keyboard regexp shortcuts

In development version of Emacs, there is a better way.

,---- NEWS
| * Editing Changes in Emacs 24.3
|
| ** Search changes
|
| *** Global `M-s _' starts a symbol (identifier) incremental search,
| and `M-s _' in Isearch toggles symbol search mode.
| `M-s c' in Isearch toggles search case-sensitivity.
`----


--

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »