No isearch-esque unprettifying while searching
One feature (?) of the default isearch that's extremely convenient is unprettifying prettify-symbols-mode symbols while in search. It seems that ctrlf does not do this while searching, regardless of the setting of prettify-symbols-unprettify-at-point.
For example, with ctrlf-mode disabled:
- Enter e.g.,
emacs-lisp-mode(or any other mode for whichprettify-symbols-modehas some default symbols) - Set
prettify-symbols-unprettify-at-pointto some value that unprettifies things (e.g.,'right-edge) -
M-x prettify-symbols-mode RET - Type
(lambda ()). This should now show up as(λ ()). -
C-r l(that is,isearch-backwardfor "l") now takes you back to the "l" in "lambda", but also unprettifies "λ" to "lambda".
With ctrlf-mode enabled, point 5 above works differently; pressing C-r l also takes you back to the "l" in "lambda", but does not unprettify "λ". This is only done after pressing RET, ending the search.
Some example screenshots:
| no search | isearch |
ctrlf |
|---|---|---|
![]() |
![]() |
![]() |
I would take a stab at this myself, but I have absolutely now idea where to start; any tips?
Ah, I guess rubber-ducking really helps.
The problem, of course, is that ctrlf keeps the point in the minibuffer during those searches. prettify-symbols-mode quite sensibly only unprettifies the symbol at point, like we told it to. If I switch windows after searching with ctrlf, then everything unprettifies correctly (and stays that way when switching back to the minibuffer afterwards). I suppose having the point inside of the minibuffer during the search is one of the main design goals of ctrlf (and let's not switch windows after every keystroke :).
Mmm. It's possible that we could add some integration that would allow for hooks to be added to accomplish tasks like this. It's not ideal, because every package that depends on the location of point for updating search results like this would need to be added, but it might work well enough in practice.


