4

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

3 Answers 3

5

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.

1

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.

0

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.

1
  • But this is only per buffer, need a global setting.
    – WilliamKF
    Nov 23, 2010 at 3:16

You must log in to answer this question.

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