summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2023-01-12 16:39:38 -0600
committerCase Duckworth2023-01-12 16:39:38 -0600
commit22b0a6b56ffe8c423047ee25440dce79a990610c (patch)
treee6aa91334f4d9f74009fcb83f04165fe04468afe /init.el
parentMeh (diff)
downloademacs-22b0a6b56ffe8c423047ee25440dce79a990610c.tar.gz
emacs-22b0a6b56ffe8c423047ee25440dce79a990610c.zip
Make it work for ... $work
Diffstat (limited to 'init.el')
-rw-r--r--init.el91
1 files changed, 90 insertions, 1 deletions
diff --git a/init.el b/init.el index 5ce5cdb..da4b537 100644 --- a/init.el +++ b/init.el
@@ -135,6 +135,26 @@
135 :config 135 :config
136 (fringe-mode '(nil . 0))) 136 (fringe-mode '(nil . 0)))
137 137
138(use-package flyspell
139 :hook org-mode-hook)
140
141(use-package browse-url
142 :preface
143 (defcustom +browse-url-other-safe-browser-functions nil
144 "Other safe browser functions."
145 :type '(repeat function))
146 (defun +browse-url-browser-function-safe-p (f)
147 "Return t if F is a safe browser function."
148 (memq f (append +browse-url-other-safe-browser-functions
149 (mapcar (lambda (i)
150 (plist-get (cdr i) :value))
151 (seq-filter (lambda (i)
152 (eq (car i) 'function-item))
153 (cdr (get 'browse-url-browser-function
154 'custom-type)))))))
155 :config
156 (put 'browse-url-browser-function 'safe-local-variable
157 '+browse-url-browser-function-safe-p))
138 158
139(use-package dired 159(use-package dired
140 :bind (("C-x C-j" . dired-jump) 160 :bind (("C-x C-j" . dired-jump)
@@ -192,7 +212,30 @@
192 212
193(use-package titlecase 213(use-package titlecase
194 :load-path "~/src/emacs/titlecase.el/" 214 :load-path "~/src/emacs/titlecase.el/"
195 :after scule 215 :preface
216 (defun +titlecase-sentence-style-dwim (&optional arg)
217 "Titlecase a sentence.
218With prefix ARG, toggle the value of
219`titlecase-downcase-sentences' before sentence-casing."
220 (interactive "P")
221 (let ((titlecase-downcase-sentences (if arg (not titlecase-downcase-sentences)
222 titlecase-downcase-sentences)))
223 (titlecase-dwim 'sentence)))
224 (defun +titlecase-org-headings ()
225 (interactive)
226 (require 'org)
227 (save-excursion
228 (goto-char (point-min))
229 ;; See also `org-map-tree'. I'm not using that function because I want to
230 ;; skip the first headline. A better solution would be to patch
231 ;; `titlecase-line' to ignore org-mode metadata (TODO cookies, tags, etc).
232 (let ((level (funcall outline-level))
233 (org-special-ctrl-a/e t))
234 (while (and (progn (outline-next-heading)
235 (> (funcall outline-level) level))
236 (not (eobp)))
237 (titlecase-region (progn (org-beginning-of-line) (point))
238 (progn (org-end-of-line) (point)))))))
196 :bind (:map scule-map 239 :bind (:map scule-map
197 ("M-t" . titlecase-dwim))) 240 ("M-t" . titlecase-dwim)))
198 241
@@ -583,3 +626,49 @@
583 (setopt wiki-abbrev-file (etc/ "wiki-abbrevs")) 626 (setopt wiki-abbrev-file (etc/ "wiki-abbrevs"))
584 (wiki-abbrev-insinuate)) 627 (wiki-abbrev-insinuate))
585 628
629(use-package flyspell-correct
630 :ensure t
631 :preface
632 (defun +flyspell-correct-buffer (&optional prefix)
633 "Run `flyspell-correct-wrapper' on all misspelled words in the buffer.
634With PREFIX, prompt to change the current dictionary."
635 (interactive "P")
636 (flyspell-buffer)
637 (when prefix
638 (let ((current-prefix-arg nil))
639 (call-interactively #'ispell-change-dictionary)))
640 (flyspell-correct-move (point-min) :forward :rapid))
641 :after flyspell
642 :bind (:map flyspell-mode-map
643 ("C-;" . flyspell-correct-wrapper)
644 ("<f7>" . +flyspell-correct-buffer))
645 :config
646 (setq flyspell-correct--cr-key ";")
647 (keymap-unset flyspell-mode-map "C-," t)
648 (keymap-unset flyspell-mode-map "C-." t))
649
650(use-package dired-subtree
651 :ensure t
652 :after dired
653 :bind (:map dired-mode-map
654 (("TAB" . dired-subtree-cycle)
655 ("i" . dired-subtree-toggle))))
656
657(use-package dired-hide-dotfiles
658 ;; I could maybe use a more general package for this ... see
659 ;; https://emacs.grym.io/#orgbbda609
660 :ensure t
661 :bind (:map dired-mode-map
662 ("." . dired-hide-dotfiles-mode)))
663
664
665;;; Applications
666
667(use-package acdw-mail
668 :load-path "lisp/")
669
670(use-package acdw-org
671 :load-path "lisp/")
672
673(use-package _work
674 :load-path "~/Sync/emacs/private/")