Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 3 down vote accepted

If you don't want to mess with normal search (with C-s) you probably want to set tags-case-fold-search instead of case-fold-search. You can do what was mentioned:

(set-default 'tags-case-fold-search nil)

or using M-x customize-variable <RET> tags-case-search-nil and then change it to case-sensitive (0) by clicking on Value menu, and then saving it for future sessions (1) by clicking on State.

share|improve this answer

Building on your answer, this is what you need:

(set-default case-fold-search nil)

which sets the default value, which will affect all buffers that haven't set the value locally.

share|improve this answer

If you set the variable case-fold-search to nil, then all letters must match exactly, including case.

Correction to Trey Jackson's answer:

(set-default 'case-fold-search nil)

You need to quote the variable.

share|improve this answer
But this is only per buffer, need a global setting. – WilliamKF Nov 23 '10 at 3:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .