I recently installed a new major mode for something I'm working on, and suddenly spaces in expressions I'm searching for don't work as expected. Help!
-
3Care to tell us in which way they don't work as expected?– StefanJan 25, 2020 at 20:18
-
1The question is unclear. Please state (1) what behavior you see, that you didn't expect, and (2) what you expected instead. And then say what your question is, given that information. I expected to see a train. I saw a plane instead. My question is ____.– DrewJan 25, 2020 at 20:56
1 Answer
Anything that makes changes to your ~/.emacs
/~/.emacs.d/init.el
initialisation file may, for various reasons, tinker with the emacs variables isearch-regexp-lax-whitespace
and search-whitespace-regexp
. This may lead to behaviour other than what most emacs users are used to, that is, a single space character standing for an arbitrary number of whitespace characters. Thus, the fix would involve restoring these variables to their defaults, by adding the following lines at the end of the initialisation file.
(setq isearch-regexp-lax-whitespace t)
(setq search-whitespace-regexp "\\s-+")