diff options
| author | tslil clingman <> | 2020-04-13 14:40:38 -0700 |
|---|---|---|
| committer | tslil clingman <> | 2020-04-13 14:40:38 -0700 |
| commit | 24648353e3e2e63e4683aa7021deb87539d6d047 (patch) | |
| tree | 6521e557b0b546fc1197386fdac836bf2ab3c2bf | |
| parent | 9f16845044caa0a11f8de97b797bcd753578916f (diff) | |
flyspell->spell-fu and finally fixed exwm last workspace
| -rw-r--r-- | emacs/inits/02-modeline.el | 10 | ||||
| -rw-r--r-- | emacs/inits/23-text-related.el | 48 | ||||
| -rw-r--r-- | emacs/inits/24-latex.el | 10 | ||||
| -rw-r--r-- | emacs/inits/30-irc.el | 4 | ||||
| -rw-r--r-- | emacs/notmuch-config.el | 2 |
5 files changed, 27 insertions, 47 deletions
diff --git a/emacs/inits/02-modeline.el b/emacs/inits/02-modeline.el index f362af1..0d61cb3 100644 --- a/emacs/inits/02-modeline.el +++ b/emacs/inits/02-modeline.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-03-24 10:15:48 (tslil@bison)> +;; Time-stamp: <2020-04-13 14:34:03 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; Battery status and CPU temperature @@ -7,7 +7,7 @@ (defvar sys-status-cpu-temp-threshold "45") (defun linux-sys-status () - (let ((bat-s (string-trim (shell-command-to-string "~/bin/battery"))) + (let ((bat-s (string-trim (shell-command-to-string "~/.local/bin/battery"))) (temp-s (if (not (file-exists-p "/sys/class/thermal/thermal_zone1/temp")) "" (with-temp-buffer (insert-file-contents "/sys/class/thermal/thermal_zone1/temp") @@ -44,6 +44,7 @@ display-time-string (sys-status sys-status) (:eval (mortality)) + (:eval (exwm-workspace-lighter)) " " (:eval (abbreviate-file-name default-directory)))) ;; We redefine this function to centre the text ;; Is there a better way? @@ -53,7 +54,10 @@ (insert (format-mode-line minibuffer-line-format 'minibuffer-line)) (setq fill-column (frame-width)) (center-line))) - (minibuffer-line-mode 1)) + (minibuffer-line-mode 1) + + (when (symbolp exwm-workspace-switch-hook) + (push #'minibuffer-line--update exwm-workspace-switch-hook))) ;; really want to hook buffer changes at all, and focus (add-hook 'minibuffer-exit-hook #'minibuffer-line--update) diff --git a/emacs/inits/23-text-related.el b/emacs/inits/23-text-related.el index 0efdc95..75eb869 100644 --- a/emacs/inits/23-text-related.el +++ b/emacs/inits/23-text-related.el @@ -1,53 +1,24 @@ -;; Time-stamp: <2020-03-04 21:49:11 (tslil@bison)> +;; Time-stamp: <2020-04-13 14:36:53 (tslil@bison)> ;; ----------------------------------------------------------------------------- ;; Spelling -(defun flyspell-correct-selectrum (candidates word) - (let* ((save "[SAVE]") - (accept-session "[ACCEPT (session)]") - (accept-buffer "[ACCEPT (buffer)]") - (skip "[SKIP]") - (selectrucm-should-sort nil) - (result (selectrum-completing-read - (format "Correcting '%s': " word) - (append candidates - (list save accept-session accept-buffer skip))))) - (cond - ((string= result save) - (cons 'save word)) - ((string= result accept-session) - (cons 'session word)) - ((string= result accept-buffer) - (cons 'buffer word)) - ((string= result skip) - (cons 'skip word)) - (t - result)))) - -(use-package flyspell-correct +(use-package spell-fu :ensure t - :defer t :config - (setq flyspell-correct-interface #'flyspell-correct-selectrum)) - -(use-package flyspell - :ensure t - :bind (:map flyspell-mode-map - ("M-$" . flyspell-correct-wrapper) - ("C-," . nil) - ("C-." . nil) - ("C-\"" . nil)) - :init (setq ispell-dictionary "british" - flyspell-default-dictionary "british")) + ispell-personal-dictionary "~/.aspell.en.pws") + + ;; The default was this "\\b\\([[:alpha:]][[:alpha:]']*\\)\\b", but that + ;; didn't play well with ``LaTeX's quoting system''. + (setq-default spell-fu-word-regexp "\\([[:alpha:]]+\\('[[:alpha:]]\\)*\\)")) (setq sentence-end-double-space nil) (add-hook 'mail-mode-hook (lambda () (electric-pair-local-mode 1) (turn-on-auto-fill) - (flyspell-mode 1) + (spell-fu-mode 1) (company-mode 1))) (add-hook 'text-mode-hook (lambda () @@ -56,7 +27,8 @@ (electric-pair-local-mode 1) (turn-on-auto-fill) (siege-mode 1) - (flyspell-mode 1))) + (spell-fu-mode 1) + )) (use-package dictionary :ensure t :defer t) diff --git a/emacs/inits/24-latex.el b/emacs/inits/24-latex.el index aa195fc..9d7d730 100644 --- a/emacs/inits/24-latex.el +++ b/emacs/inits/24-latex.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2020-03-27 15:27:06 (tslil@bison)> +;; Time-stamp: <2020-04-13 13:00:54 (tslil@bison)> (defvar latex-template-dir (expand-file-name "~/academic/typeset/latex-templates")) (defun prompt-latex-file-template () @@ -28,6 +28,8 @@ populated from the directory *latex-template-dir*" (use-package company-auctex :ensure t :defer t) +(use-package unfill :ensure t) + (use-package pdf-tools :demand :ensure t @@ -41,12 +43,12 @@ populated from the directory *latex-template-dir*" :bind (:map LaTeX-mode-map ("'" . better-TeX-insert-single-quote) ("TAB" . LaTeX-indent-line) + ("M-q" . unfill-paragraph) ("C-c C-g" . pdf-sync-forward-search)) :hook (LaTeX-mode . (lambda () (require 'company-auctex) (electric-pair-local-mode -1) - (flyspell-mode) - ;; (turn-on-auto-fill) + (spell-fu-mode) (display-line-numbers-mode) (auto-fill-mode -1) (visual-line-mode) @@ -68,6 +70,8 @@ populated from the directory *latex-template-dir*" TeX-close-quote old-close)))) :config + (setq spell-fu-faces-exclude '(font-latex-math-face)) + (dolist (entry '(("diagram") ("diagram*"))) (push entry LaTeX-indent-environment-list)) (setq TeX-command-list '(("XeLaTeX" "xelatex %t" diff --git a/emacs/inits/30-irc.el b/emacs/inits/30-irc.el index e0262ee..f4e3759 100644 --- a/emacs/inits/30-irc.el +++ b/emacs/inits/30-irc.el @@ -1,11 +1,11 @@ -;; Time-stamp: <2020-04-10 10:57:41 (tslil@bison)> +;; Time-stamp: <2020-04-13 14:37:20 (tslil@bison)> (use-package rcirc :ensure t :defer :hook (rcirc-mode . (lambda () (rcirc-track-minor-mode) - (flyspell-mode-on) + (spell-fu-mode 1) (set (make-local-variable 'scroll-conservatively) 8192))) :config (use-package rcirc-color diff --git a/emacs/notmuch-config.el b/emacs/notmuch-config.el index d916c3d..1960cd9 100644 --- a/emacs/notmuch-config.el +++ b/emacs/notmuch-config.el @@ -233,7 +233,7 @@ running offlineimap (t) or manual (nil).") (add-hook 'message-mode-hook (lambda () (turn-on-auto-fill) - (flyspell-mode) + (spell-fu-mode 1) (company-mode))) (setq notmuch-tree-result-format '(("date" . "%12s | ") |
