[emacs] include non-ASCII counterparts in search results
[~bandali/configs] / init.org
index 88295bb..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
@@ -731,7 +744,14 @@ customizing it.
   (unbind-key "C-a" evil-insert-state-map)
   (unbind-key "C-e" evil-insert-state-map)
   (unbind-key "C-p" evil-insert-state-map)
   (unbind-key "C-a" evil-insert-state-map)
   (unbind-key "C-e" evil-insert-state-map)
   (unbind-key "C-p" evil-insert-state-map)
-  (unbind-key "C-n" evil-insert-state-map))
+  (unbind-key "C-n" evil-insert-state-map)
+  (unbind-key "C-k" evil-insert-state-map)
+  (bind-keys
+    :map evil-insert-state-map
+    ("C-k"   . kill-line)
+    ("C-S-k" . evil-insert-digraph)
+    :map evil-motion-state-map
+    ([down-mouse-1] . nil)))
 #+end_src
 
 #+begin_src emacs-lisp
 #+end_src
 
 #+begin_src emacs-lisp
@@ -807,6 +827,12 @@ customizing it.
 
   "w"   '(:ignore t :wk "window")
   "w o" 'other-window
 
   "w"   '(:ignore t :wk "window")
   "w o" 'other-window
+  "w 0" 'delete-window
+  "w 1" 'delete-other-windows
+  "w 2" 'split-window-below
+  "w 3" 'split-window-right
+  "w u" 'winner-undo
+  "w r" 'winner-redo
 
   "q"   '(:ignore t :wk "quit")
   "q q" 'save-buffers-kill-terminal)
 
   "q"   '(:ignore t :wk "quit")
   "q q" 'save-buffers-kill-terminal)
@@ -967,6 +993,7 @@ Not just how I do git, but /the/ way to do git.
   (setq
    magit-repository-directories '(("~/.emacs.d/" . 0)
                                   ("~/src/git/" . 1)))
   (setq
    magit-repository-directories '(("~/.emacs.d/" . 0)
                                   ("~/src/git/" . 1)))
+  (push (cons [unpushed status] 'show) magit-section-initial-visibility-alist)
   :custom-face (magit-diff-file-heading ((t (:weight normal)))))
 #+end_src
 
   :custom-face (magit-diff-file-heading ((t (:weight normal)))))
 #+end_src
 
@@ -1898,6 +1925,9 @@ Hopefully temporary.
    :subscribed-channels '(general)
    :full-and-display-names t)
   (add-to-list 'swiper-font-lock-exclude 'slack-message-buffer-mode t)
    :subscribed-channels '(general)
    :full-and-display-names t)
   (add-to-list 'swiper-font-lock-exclude 'slack-message-buffer-mode t)
+  (setq lui-time-stamp-format "[%Y-%m-%d %H:%M:%S]"
+        lui-time-stamp-only-when-changed-p t
+        lui-time-stamp-position 'right)
   :bind
   (("C-c s s" . slack-start)
    ("C-c s u" . slack-select-unread-rooms)
   :bind
   (("C-c s s" . slack-start)
    ("C-c s u" . slack-select-unread-rooms)
@@ -2127,7 +2157,17 @@ For when I /have to/ use GH.
 #+begin_src emacs-lisp
 (use-package message
   :config
 #+begin_src emacs-lisp
 (use-package message
   :config
-  (setq message-kill-buffer-on-exit t
+  (defconst message-cite-style-bandali
+    '((message-cite-function  'message-cite-original)
+      (message-citation-line-function  'message-insert-formatted-citation-line)
+      (message-cite-reply-position 'traditional)
+      (message-yank-prefix  "> ")
+      (message-yank-cited-prefix  ">")
+      (message-yank-empty-prefix  ">")
+      (message-citation-line-format "Hi %F,\n\nOn %Y-%m-%d %l:%M %p, %N wrote:"))
+    "Citation style based on Mozilla Thunderbird's. Use with message-cite-style.")
+  (setq message-cite-style 'message-cite-style-bandali
+        message-kill-buffer-on-exit t
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
         message-dont-reply-to-names
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
         message-dont-reply-to-names
@@ -2171,7 +2211,7 @@ Convenient footnotes in =message-mode=.
         footnote-style     'unicode))
 #+end_src
 
         footnote-style     'unicode))
 #+end_src
 
-** supercite
+** COMMENT supercite
 
 #+begin_src emacs-lisp
 (use-package supercite
 
 #+begin_src emacs-lisp
 (use-package supercite