bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22147: Obsolete search-forward-lax-whitespace


From: Drew Adams
Subject: bug#22147: Obsolete search-forward-lax-whitespace
Date: Tue, 15 Dec 2015 17:47:05 -0800 (PST)

> I mean a char-folding customization that allows a search
> for “ä” match “a”.  Is this already possible?

It sounds like you are asking for symmetric char folding: being
able to use any of the various A's that make up the A-characters
equivalence class as a search pattern and find any of those
characters.

If so, I implemented that (one way, at least), and in emacs-devel
I proposed such behavior as a togglable option.

It is trivial to try it, if you like: character-fold+.el.
http://www.emacswiki.org/emacs/download/character-fold%2b.el

(A toggle command for it, `isearchp-toggle-symmetric-char-fold',
is defined in isearch+.el:
http://www.emacswiki.org/emacs/download/isearch%2b.el.)

> If yes, then it should be easy to customize it in such a way that
> “\n” will match space “\s” to avoid the need to write own
> functions that define an intersection of the existing functions
> char-folding and lax-whitespace. IOW, to customize a char-folding
> option instead of search-default-regexp-mode?

Not sure if it answers the need you just described, but the same
library has an option, `char-fold-ad-hoc', that lets users add
their own equivalence classes.

(Caveat: I think that Artur made some changes to character-fold.el
recently.  It's possible that character-fold+.el is not up-to-date
wrt those changes, in which case it might not work with the most
recent versions of character-fold.el.  Maybe check the dates, if
you are interested.)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]