Questions tagged [case-folding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
15
votes
1answer
5k views

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 ?
5
votes
2answers
1k views

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) ...
5
votes
2answers
89 views

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 ...
5
votes
1answer
641 views

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. ...
4
votes
1answer
697 views

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 ...
4
votes
1answer
227 views

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 ...
4
votes
1answer
1k views

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 ...
2
votes
1answer
30 views

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 ...
2
votes
1answer
100 views

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 ...
1
vote
3answers
173 views

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 ...
1
vote
1answer
164 views

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-...
1
vote
1answer
67 views

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 ...
0
votes
1answer
34 views

case-fold-search apparently not taking effect in re-search-forward

I wrote the following command to do a regexp replacement in a region. (defun camel-case-to-underscore (a b &optional use-dash) (interactive "r") (save-excursion (let ((sep (if use-dash "-...
0
votes
1answer
38 views

Why after search-toggle-case-fold text is select?

windows 10, emacs 26.1 I want to set I-search case sensitive mode. Before: M-x isearch-toggle-case-fold after: Now it's search in case sensitive mode. Nice. But why it select text? P.S. If I ...
-1
votes
1answer
39 views

I-search - case sensitive

windows 10, emacs 26.1 When I use I-search, then Emacs ignore case sensitive. but I need case sensitive I-search