[emacs] include non-ASCII counterparts in search results
authorAmin Bandali <bandali@gnu.org>
Thu, 22 Nov 2018 15:39:11 +0000 (10:39 -0500)
committerAmin Bandali <bandali@gnu.org>
Thu, 22 Nov 2018 15:39:11 +0000 (10:39 -0500)
init.org

index cf19fbf..f8c87b5 100644 (file)
--- a/init.org
+++ b/init.org
@@ -645,6 +645,19 @@ Enable =winner-mode=.
          (cons msg code)))
 #+end_src
 
          (cons msg code)))
 #+end_src
 
+*** Search for non-ASCII characters
+
+I’d like non-ASCII characters such as ‘’“”«»‹›áⓐ𝒶 to be selected when
+I search for their ASCII counterpart.  Shoutout to [[http://endlessparentheses.com/new-in-emacs-25-1-easily-search-non-ascii-characters.html][endlessparentheses]]
+for this.
+
+#+begin_src emacs-lisp
+(setq search-default-mode #'char-fold-to-regexp)
+
+;; uncomment to extend this behaviour to query-replace
+;; (setq replace-char-fold t)
+#+end_src
+
 ** Bindings
 
 #+begin_src emacs-lisp
 ** Bindings
 
 #+begin_src emacs-lisp