Questions tagged [case-folding]
21 questions
24
votes
1 answer
How to perform case-sensitive query-replace?
When I do M-x query-replace to replace all occurrences of v by w, then it also matches V (uppercase V). How to force emacs to only find lowercase v ?

Name
- 7,689
- 4
- 38
- 84
9
votes
3 answers
how do I do case sensitive searches using evil/spacemacs?
I'm trying to perform a search and replace in spacemacs but I need it to be case sensitive when by default it appears to be case insensitive. So I try to do :set noignorecase but then I have this error message :
State noignore case cannot be set as…

ChiseledAbs
- 449
- 1
- 4
- 12
8
votes
2 answers
How to do case sensitive searches using evil's evil-search?
Unlike isearch, evil-search mode ignores case-fold-search option.
Using evil-search like this for eg:
(setq-default evil-search-module 'evil-search)
Is it possible to make evil-search case sensitive?

ideasman42
- 8,375
- 1
- 28
- 105
5
votes
2 answers
How to turn every ALL CAP word in a buffer into Title case?
I need to fix a large .bib file where all proper names are in ALL CAPITALS (thanks ProQuest!)
Is there an elisp function that searches a buffer/region for words in all capitals and turns all characters except the first one into lowercase…

stefano
- 165
- 3
5
votes
1 answer
Case-insensitive filename completion in `shell-command'
I know I can get case-insensitive filename completion in the minibuffer using read-file-name-completion-ignore-case, but this doesn't seem to apply to all filename completion in the minibuffer. Specifically, it doesn't seem to apply when I'm using…

mgalgs
- 464
- 4
- 12
5
votes
2 answers
in Emacs regex, how to search for uppercase letters only?
I'm trying to build a function but having trouble with the regex. Specifically, I want to match capital letters only.
This function is supposed to capitalize words that are in lowercase (the → The) but not touch words that are already in uppercase…

incandescentman
- 4,111
- 16
- 53
4
votes
1 answer
Search and replace with case preservation and plurals
Is there a way (or package) to search and replace code like:
class Account
def list_accounts
end
end
to
class Company
def list_companies
end
end
Basically I want to replace account(s) with compan(y/ies)
Vim does this with Subvert

Cezar Halmagean
- 145
- 6
2
votes
1 answer
How to ignore case when switching buffers?
I want to open a buffer called Echo.md and switch-buffer (C-x b) does not auto-complete it when I type echo because of the case. But find-file does auto-complete from lower-case to upper-case. The documentation for either function does not mention…

miguelmorin
- 1,751
- 11
- 33
2
votes
3 answers
Highlight regexp case insensitive
Is there a way to use highlight-regexp in a case-insensitive way? I'm parenthesizing an expression in my regexp and refer to it using \1 later and I want to match this regardless of case. I'm trying to find occurrences of repeated words (with…

Alfe
- 121
- 3
2
votes
1 answer
How can i keep the case when I am using select and paste to C-s input field?
I see a word in buffer1. I want to look for it in buffer2. I select the word in buffer1. I select buffer2 as my current buffer, hit C-s, and press mouse-2 (the middle mouse button).
Emacs converts the word to lowercase, and I can't find it... The…

user1134991
- 289
- 1
- 9
1
vote
2 answers
How do I search/replace with case sensitive search?
In emacs I'm using M-% to replace occurrences of b_abcd (of which there are only a few) with B_abcd (of which there are very many). Currently Emacs asks if it's OK to replace at each B_abcd, which takes a lot of time to wade through all B_abcds it…

HarryH
- 121
- 3
1
vote
1 answer
Case-sensitive search and replace in elisp in spacemacs
Running Spacemacs v.0.200.13 on emacs 25.2.2 on Kubuntu 18.04.
Consider the following code:
(defun xx-ll ()
(interactive)
(save-excursion
(goto-char (point-min))
(xx-replace-regexp-and-return
…

deshmukh
- 1,852
- 13
- 29
1
vote
1 answer
Using replace-regexp-in-string without case folding
I'm trying to use replace-regexp-in-string (see function below) and I need to detect the boundary between a lower case and upper case character. Apparently let-binding case-fold-search to nil doesn't work? I'm trying this in the latest pretest
GNU…

Alexis Layton
- 13
- 3
0
votes
0 answers
Case Insensitive Search with helm-projectile-ag (helm-case-fold-search)
I'm unable to search with case insensitivity, using helm-projectile-ag.
I've tried to set helm-case-fold-search to t, but it doesn't seem to use that for this async search.
Any pointers as to how I can do it?;)

Jason Hunter
- 519
- 2
- 9
0
votes
1 answer
How can I use 'transients' in 'magit' to enable case-insensitive search?
I got it working a year ago, then my machine died. I've been unable to figure out the interface to transient.
When I view the levels (green and red, with numbers in them), I hit '-i' but see an error 'wrong type argument: (or eieio-object class),…

jmckitrick
- 21
- 5