Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I do a case-sensitive search in Emacs?

Is there a shortcut? Ctrl + S gives I-search:, and that is case-insensitive.

like image 978
Chirag Avatar asked Jul 22 '12 17:07

Chirag


People also ask

How do you do a case-sensitive search?

The Find bar (Ctrl + F) in Firefox offers a “Match Case” option to help you perform case-sensitive searches on a web page. If you type “RAM” in the find box, the browser will only highlight the phrase “RAM” on that page and not Ram or ram.

Is the search feature case-sensitive?

By default, searches are case-insensitive. You can make your search case-sensitive by using the case filter. For example, the following search returns only results that match the term HelloWorld . It excludes results where the case doesn't match, such as helloWorld or helloworld .

How do you make a search case-insensitive?

Case insensitive SQL SELECT: Use upper or lower functions select * from users where lower(first_name) = 'fred'; As you can see, the pattern is to make the field you're searching into uppercase or lowercase, and then make your search string also be uppercase or lowercase to match the SQL function you've used.

How do you use case-sensitive?

If a written word such as a password is case-sensitive, it must be written in a particular form, for example using all capital letters or all small letters, in order for the computer to recognize it.


2 Answers

You press M-c after you run search.

This will set the case-sensitive flag.

More generally, you can do: C-s C-h b to see all keybindings active during search, in isearch-mode-map.

like image 146
alinsoar Avatar answered Oct 06 '22 00:10

alinsoar


In addition to M-c mentioned by alinsoar, entering a capital letter as part of your search string will cause the search to be case-sensitive.

like image 40
Tyler Avatar answered Oct 06 '22 00:10

Tyler