How to do case sensitive tags search in Emacs?

3

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

WilliamKF

Posted 2010-11-23T03:13:48.543

Reputation: 6 916

Answers

4

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.

marcot

Posted 2010-11-23T03:13:48.543

Reputation: 156

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.

Trey Jackson

Posted 2010-11-23T03:13:48.543

Reputation: 3 731

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.

WilliamKF

Posted 2010-11-23T03:13:48.543

Reputation: 6 916

But this is only per buffer, need a global setting. – WilliamKF – 2010-11-23T03:16:31.147