emacs-evil / emacs-evil/evil

evil-search-forward does not respect new user option search-default-mode, in particular the char-fold-to-regexp setting

Open
#780 2 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Emacs Lisp
Stars
3.9k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

Sorry to pedantically quote straight from the 25.1 news file, but I can't say it better myself.

> 'isearch' and 'query-replace' can now perform character folding in matches.
> This is analogous to case folding, but instead of disregarding case
> variants, it disregards wider classes of distinctions between similar
> characters. (Case folding is a special case of character folding.)
> This means many characters in the search string will match entire
> groups of characters instead of just themselves.

> For instance, the ASCII double quote character " will match all
> variants of double quotes, and the letter 'a' will match all of its
> accented cousins, even those composed of multiple characters, as well
> as many other symbols like U+249C (PARENTHESIZED LATIN SMALL LETTER
> A).

> Character folding is enabled by customizing 'search-default-mode' to
> the value 'char-fold-to-regexp'. You can also toggle character
> folding in the middle of a search by typing 'M-s ''.

I took a look at the implementation of `evil-search-forward` but couldn't figure out where to patch it to respect the new `search-default-mode` variable. Happy to take another swing at it if somebody could point me in the right direction!

Contributor guide

Open the contributing guide

Research direction

Start at the evil-search-forward implementation and trace how it selects search behavior, then compare that with Emacs isearch and query-replace handling of search-default-mode. Done means evil-search-forward respects search-default-mode, including char-fold-to-regexp, while preserving the existing search behavior otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.