summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2023-02-20 16:19:03 -0600
committerCase Duckworth2023-02-20 16:19:03 -0600
commit9df66e96c4fa98c9b74566712116f4373b5d5c64 (patch)
tree69bfc614eb26accafa74e7f40d81a0c9155962f4
parentIgnore tree-sitter/ (diff)
downloademacs-9df66e96c4fa98c9b74566712116f4373b5d5c64.tar.gz
emacs-9df66e96c4fa98c9b74566712116f4373b5d5c64.zip
apsodfiuadsfoiudsfpaoidsufpaosidufposdifuapsodifuapsodifu
-rw-r--r--basics.el30
-rw-r--r--init.el198
-rw-r--r--lisp/acdw-mail.el24
-rw-r--r--lisp/acdw-org.el42
4 files changed, 215 insertions, 79 deletions
diff --git a/basics.el b/basics.el index 68cdc2a..3905003 100644 --- a/basics.el +++ b/basics.el
@@ -17,7 +17,7 @@
17 "Where various Emacs files are placed." 17 "Where various Emacs files are placed."
18 :makedir) 18 :makedir)
19 19
20(defdir sync/ "~/Sync/" 20(defdir sync/ "~/sync/"
21 "My Syncthing directory." 21 "My Syncthing directory."
22 :makedir) 22 :makedir)
23 23
@@ -142,7 +142,7 @@
142 142
143;; Text editing 143;; Text editing
144(setq-default fill-column 80 144(setq-default fill-column 80
145 sentence-end-double-space t 145 sentence-end-double-space nil
146 tab-width 8 146 tab-width 8
147 tab-always-indent 'complete) 147 tab-always-indent 'complete)
148(global-so-long-mode) 148(global-so-long-mode)
@@ -295,13 +295,27 @@ N spaces."
295 (interactive "*p") 295 (interactive "*p")
296 (cycle-spacing (- n))) 296 (cycle-spacing (- n)))
297 297
298(defun +comment-dwim (&optional prefix)
299 "Comments or uncomments current line or region.
300When called with PREFIX, start a comment at the end of the
301current line."
302 (interactive "P")
303 (if prefix
304 (comment-indent)
305 (apply #'comment-or-uncomment-region
306 (if (region-active-p)
307 (list (region-beginning)
308 (region-end))
309 (list (line-beginning-position)
310 (line-end-position))))))
311
298(global-set-key [remap eval-expression] #'pp-eval-expression) 312(global-set-key [remap eval-expression] #'pp-eval-expression)
299(global-set-key (kbd "M-o") #'other-window|switch-buffer) 313(global-set-key (kbd "M-o") #'other-window|switch-buffer)
300(global-set-key (kbd "C-x 0") #'delete-window|bury-buffer) 314(global-set-key [remap delete-window] #'delete-window|bury-buffer)
301(global-set-key (kbd "M-SPC") #'+cycle-spacing) 315(global-set-key [remap cycle-spacing] #'+cycle-spacing)
302(global-set-key (kbd "C-x C-k") #'kill-this-buffer) 316(global-set-key (kbd "C-x C-k") #'kill-this-buffer)
303(global-set-key (kbd "C-/") #'undo-only) 317(global-set-key [remap comment-dwim] #'+comment-dwim)
304(global-set-key (kbd "C-?") #'undo-redo) 318(global-set-key [remap undo] #'undo-only)
305 319
306(global-set-key [f10] #'tmm-menubar) 320(global-set-key [f10] #'tmm-menubar)
307(advice-add 'tmm-add-prompt :after 'minibuffer-hide-completions) 321(advice-add 'tmm-add-prompt :after 'minibuffer-hide-completions)
@@ -408,7 +422,7 @@ N spaces."
408(use-package vertico-directory 422(use-package vertico-directory
409 :after vertico 423 :after vertico
410 :bind (:map vertico-map 424 :bind (:map vertico-map
411 ("C-DEL" . vertico-directory-delete-word)) 425 ("C-<backspace>" . vertico-directory-delete-word))
412 :hook (rfn-shadow-update-overlay-hook . vertico-directory-tidy)) 426 :hook (rfn-shadow-update-overlay-hook . vertico-directory-tidy))
413 427
414(use-package vertico-mouse 428(use-package vertico-mouse
@@ -531,7 +545,7 @@ N spaces."
531(use-package orderless 545(use-package orderless
532 :ensure t :demand t 546 :ensure t :demand t
533 :init 547 :init
534 (setopt completion-styles '(substring orderless basic) 548 (setopt completion-styles '(orderless substring basic)
535 completion-category-defaults nil 549 completion-category-defaults nil
536 completion-category-overrides 550 completion-category-overrides
537 '((file (styles basic partial-completion orderless))))) 551 '((file (styles basic partial-completion orderless)))))
diff --git a/init.el b/init.el index 264378c..c8fb4e7 100644 --- a/init.el +++ b/init.el
@@ -21,21 +21,39 @@
21 21
22(use-package emacs ; Misc. config 22(use-package emacs ; Misc. config
23 :config 23 :config
24 (setopt tab-bar-show 1 24 (setopt recenter-positions '(top middle bottom)
25 recenter-positions '(top middle bottom)
26 initial-scratch-message 25 initial-scratch-message
27 (format "%s\n\n" 26 (format "%s\n\n"
28 (mapconcat (lambda (s) (format ";; %s" s)) 27 (mapconcat (lambda (s) (format ";; %s" s))
29 (process-lines "fortune" "-s") 28 (process-lines "fortune" "-s")
30 "\n"))) 29 "\n")))
31 (keymap-global-unset "C-\\") 30 (keymap-global-unset "C-\\")
31 (keymap-global-unset "<f2>")
32 (add-hook 'kill-buffer-query-functions 32 (add-hook 'kill-buffer-query-functions
33 (defun scratch@immortal () 33 (defun scratch@immortal ()
34 (if (equal (buffer-name) "*scratch*") 34 (if (equal (buffer-name) "*scratch*")
35 (progn (bury-buffer) nil) 35 (progn (bury-buffer) nil)
36 t))) 36 t)))
37 (setf (alist-get "\\*Compile-Log\\*" display-buffer-alist nil nil #'equal) 37 (setf (alist-get "\\*Compile-Log\\*" display-buffer-alist nil nil #'equal)
38 '(display-buffer-no-window))) 38 '(display-buffer-no-window))
39 (add-hook 'after-init-hook
40 (defun global-mode-string@setup ()
41 (defvar jabber-activity-mode-string)
42 (defvar org-mode-line-string)
43 (defvar display-time-mode)
44 (defvar display-time-string)
45 (setf global-mode-string
46 '((t jabber-activity-mode-string)
47 org-mode-line-string
48 (display-time-mode display-time-string)))))
49 (keymap-global-set "C-c t"
50 (define-keymap
51 :prefix 'toggle-map
52 "e" #'toggle-debug-on-error
53 "q" #'toggle-debug-on-quit
54 "c" #'column-number-mode
55 "l" #'line-number-mode
56 "L" #'display-line-numbers-mode)))
39 57
40(use-package faces 58(use-package faces
41 :config 59 :config
@@ -123,7 +141,7 @@
123 141
124(use-package ispell 142(use-package ispell
125 :config 143 :config
126 (setopt ispell-program-name (choose-executable "ispell" "aspell")) 144 (setopt ispell-program-name (choose-executable "aspell" "ispell"))
127 (add-hook 'before-save-hook 145 (add-hook 'before-save-hook
128 #'+ispell-move-buffer-words-to-dir-locals-hook) 146 #'+ispell-move-buffer-words-to-dir-locals-hook)
129 (put 'ispell-buffer-session-localwords 'safe-local-variable 147 (put 'ispell-buffer-session-localwords 'safe-local-variable
@@ -227,6 +245,34 @@
227 ("w" . Info-copy-current-node-name-0) 245 ("w" . Info-copy-current-node-name-0)
228 ("c" . Info-copy-current-node-name))) 246 ("c" . Info-copy-current-node-name)))
229 247
248(use-package make-mode
249 :defer t
250 :config
251 (add-hook 'makefile-mode-hook
252 (defun make-mode@setup ()
253 (remove-hook 'write-file-functions
254 #'makefile-warn-suspicious-lines t)
255 (remove-hook 'write-file-functions
256 #'makefile-warn-continuations t))))
257
258(use-package eglot
259 :preface
260 (defun +eglot-eldoc ()
261 ;; https://www.masteringemacs.org/article/seamlessly-merge-multiple-documentation-sources-eldoc
262 (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly))
263 :hook
264 ((bash-ts-mode . eglot))
265 :config
266 (add-hook 'eglot-managed-mode . +eglot-eldoc))
267
268(use-package eldoc
269 :config
270 (setopt eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
271 (setf (alist-get "^\\*eldoc for" display-buffer-alist nil nil #'equal)
272 '(display-buffer-at-bottom
273 (window-height . 4)))
274 (eldoc-add-command-completions "paredit-"))
275
230 276
231;;; Applications 277;;; Applications
232 278
@@ -298,8 +344,8 @@ With prefix ARG, toggle the value of
298 (not (eobp))) 344 (not (eobp)))
299 (titlecase-region (progn (org-beginning-of-line) (point)) 345 (titlecase-region (progn (org-beginning-of-line) (point))
300 (progn (org-end-of-line) (point))))))) 346 (progn (org-end-of-line) (point)))))))
301 :bind (:map scule-map 347 :config
302 ("M-t" . titlecase-dwim))) 348 (keymap-set scule-map "M-t" #'titlecase-dwim))
303 349
304(use-package scule 350(use-package scule
305 :load-path "~/src/emacs/scule/" 351 :load-path "~/src/emacs/scule/"
@@ -367,11 +413,16 @@ With prefix ARG, toggle the value of
367 ("." . jabber-muc-presence-dim)) 413 ("." . jabber-muc-presence-dim))
368 jabber-activity-make-strings #'jabber-activity-make-strings-shorten 414 jabber-activity-make-strings #'jabber-activity-make-strings-shorten
369 jabber-rare-time-format " - - - - - - %H:%M %F" 415 jabber-rare-time-format " - - - - - - %H:%M %F"
416 jabber-muc-header-line-format
417 '(" " (:eval (replace-regexp-in-string "%" "%%"
418 (jabber-jid-displayname
419 jabber-group)))
420 " / " jabber-muc-topic)
370 ;; buffer name formats 421 ;; buffer name formats
371 ;; jabber-chat-buffer-format "%n <xmpp>" 422 jabber-chat-buffer-format "*xmpp* %n"
372 ;; jabber-browse-buffer-format "%n <xmpp-browse>" 423 jabber-browse-buffer-format "*xmpp-browse* %n"
373 ;; jabber-groupchat-buffer-format "%n <xmpp-muc>" 424 jabber-groupchat-buffer-format "*xmpp-muc* %n"
374 ;; jabber-muc-private-buffer-format "%n <xmpp-muc-private>" 425 jabber-muc-private-buffer-format "*xmpp-muc-private* %n"
375 ;; "prompt" (speaker) formats 426 ;; "prompt" (speaker) formats
376 jabber-groupchat-prompt-format (format "%%>%dn | " jabber-prefix-width) 427 jabber-groupchat-prompt-format (format "%%>%dn | " jabber-prefix-width)
377 jabber-chat-local-prompt-format (format "%%>%dn | " jabber-prefix-width) 428 jabber-chat-local-prompt-format (format "%%>%dn | " jabber-prefix-width)
@@ -404,7 +455,8 @@ With prefix ARG, toggle the value of
404 (defun jabber-chat@leave-when-kill () 455 (defun jabber-chat@leave-when-kill ()
405 (add-hook 'kill-buffer-hook 456 (add-hook 'kill-buffer-hook
406 (defun @jabber-leave@kill () 457 (defun @jabber-leave@kill ()
407 (apply #'jabber-muc-leave (jabber-muc-argument-list))) 458 (ignore-errors
459 (apply #'jabber-muc-leave (jabber-muc-argument-list))))
408 nil :local))) 460 nil :local)))
409 (when (fboundp 'jabber-chat-update-focus) 461 (when (fboundp 'jabber-chat-update-focus)
410 (add-hook 'window-configuration-change-hook #'jabber-chat-update-focus)) 462 (add-hook 'window-configuration-change-hook #'jabber-chat-update-focus))
@@ -423,13 +475,17 @@ With prefix ARG, toggle the value of
423 (buffer-list)))))) 475 (buffer-list))))))
424 (add-to-list 'consult-buffer-sources 'jabber-chat-buffer-source :append) 476 (add-to-list 'consult-buffer-sources 'jabber-chat-buffer-source :append)
425 (consult-customize 477 (consult-customize
426 consult-buffer :preview-key (kbd "M-.")))) 478 consult-buffer :preview-key "M-.")))
427 479
428(use-package keepassxc-shim 480(use-package keepassxc-shim
429 :load-path "~/src/emacs/keepassxc-shim/" 481 :load-path "~/src/emacs/keepassxc-shim/"
430 :config 482 :config
431 (keepassxc-shim-activate)) 483 (keepassxc-shim-activate))
432 484
485(use-package hippie-completing-read
486 :load-path "~/src/emacs/hippie-completing-read/"
487 :bind (("M-/" . hippie-completing-read)))
488
433 489
434;;; External packages 490;;; External packages
435 491
@@ -620,9 +676,7 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
620 prefix))))) 676 prefix)))))
621 ;; Add strings to this list to inhibit adding a space 677 ;; Add strings to this list to inhibit adding a space
622 ;; after them. 678 ;; after them.
623 '(",@")))))) 679 '(",@")))))))
624 (with-eval-after-load 'eldoc
625 (eldoc-add-command #'paredit-backward-delete #'paredit-close-round)))
626 680
627(use-package hungry-delete 681(use-package hungry-delete
628 :ensure t 682 :ensure t
@@ -666,9 +720,16 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
666 :preface 720 :preface
667 (setopt inferior-lisp-program (choose-executable "sbcl")) 721 (setopt inferior-lisp-program (choose-executable "sbcl"))
668 :when inferior-lisp-program 722 :when inferior-lisp-program
669 :bind (:map sly-mode-map 723 :init
670 ("C-c C-z" . sly-mrepl)) 724 (defun +sly-start-or-mrepl ()
725 (interactive)
726 (if (ignore-errors (sly-connection))
727 (sly-mrepl (lambda (buf)
728 (display-buffer-pop-up-window buf nil)))
729 (call-interactively #'sly)))
671 :config 730 :config
731 (autoload 'sly-mrepl "sly-mrepl" nil t)
732 (keymap-set sly-mode-map "C-c C-z" #'+sly-start-or-mrepl)
672 (setopt sly-net-coding-system 'utf-8-unix) 733 (setopt sly-net-coding-system 'utf-8-unix)
673 (sly-symbol-completion-mode -1)) 734 (sly-symbol-completion-mode -1))
674 735
@@ -728,6 +789,9 @@ The prefix argument is as in `visual-fill-column-widen' but negated."
728 :ensure t 789 :ensure t
729 :bind ("C-x g" . magit)) 790 :bind ("C-x g" . magit))
730 791
792(use-package git-modes
793 :ensure t)
794
731(use-package eradio 795(use-package eradio
732 :ensure t 796 :ensure t
733 :preface 797 :preface
@@ -800,6 +864,13 @@ With PREFIX, prompt to change the current dictionary."
800 :bind (:map dired-mode-map 864 :bind (:map dired-mode-map
801 ("." . dired-hide-dotfiles-mode))) 865 ("." . dired-hide-dotfiles-mode)))
802 866
867(use-package dired-git-info
868 :ensure t
869 :bind (:map dired-mode-map
870 (")" . dired-git-info-mode))
871 :config
872 (setopt dgi-auto-hide-details-p nil))
873
803(use-package embrace 874(use-package embrace
804 :ensure t 875 :ensure t
805 :preface 876 :preface
@@ -860,45 +931,64 @@ With PREFIX, prompt to change the current dictionary."
860(use-package rec-mode 931(use-package rec-mode
861 :ensure t) 932 :ensure t)
862 933
863(use-package gauche-mode 934;; (use-package gauche-mode
864 :load-path "~/src/emacs/gauche-mode/" 935;; :load-path "~/src/emacs/gauche-mode/"
865 :mode "\\.scm\\'" 936;; :mode "\\.scm\\'"
866 :config 937;; :config
867 (setopt gauche-mode-info-language 'en 938;; (setopt gauche-mode-info-language 'en
868 scheme-program-name "gosh -i" 939;; scheme-program-name "gosh -i"
869 scheme-compile-exp-command "%s") 940;; scheme-compile-exp-command "%s")
870 (add-to-list 'scheme-source-modes 'gauche-mode) 941;; (add-to-list 'scheme-source-modes 'gauche-mode)
871 (setf (alist-get "\\*scheme\\*" display-buffer-alist nil nil #'equal) 942;; (setf (alist-get "\\*scheme\\*" display-buffer-alist nil nil #'equal)
872 '((display-buffer-reuse-window 943;; '((display-buffer-reuse-window
873 display-buffer-pop-up-window) 944;; display-buffer-pop-up-window)
874 (inhibit-same-window . t))) 945;; (inhibit-same-window . t)))
875 (add-hook 'gauche-mode-hook #'enable-gauche-paredit-mode) 946;; (add-hook 'gauche-mode-hook #'enable-gauche-paredit-mode)
876 (add-hook 'inferior-scheme-mode-hook #'enable-gauche-paredit-mode) 947;; (add-hook 'inferior-scheme-mode-hook #'enable-gauche-paredit-mode)
877 ;; Extras 948;; ;; Extras
878 (define-key gauche-mode-map (kbd "C-c C-k") 949;; (define-key gauche-mode-map (kbd "C-c C-k")
879 (defun +gauche-mode-send-buffer () 950;; (defun +gauche-mode-send-buffer ()
880 (interactive) 951;; (interactive)
881 (save-mark-and-excursion 952;; (save-mark-and-excursion
882 (let ((start (point-min)) 953;; (let ((start (point-min))
883 (end (point-max))) 954;; (end (point-max)))
884 (goto-char start) 955;; (goto-char start)
885 (while (or (looking-at "#!") ; Shebang 956;; (while (or (looking-at "#!") ; Shebang
886 (looking-at ":;") ; "shell trampoline" 957;; (looking-at ":;") ; "shell trampoline"
887 ) 958;; )
888 (forward-line 1) 959;; (forward-line 1)
889 (beginning-of-line) 960;; (beginning-of-line)
890 (setq start (point))) 961;; (setq start (point)))
891 (scheme-send-region-and-go start end)))))) 962;; (scheme-send-region-and-go start end))))))
963
964(use-package geiser-guile ; Let's try using guile instead
965 :ensure t
966 :config
967 (keymap-unset scheme-mode-map "M-o" t))
892 968
893(use-package treesit-auto 969(use-package treesit-auto
894 ;; XXX: I don't really get the utility of this package, but I spent a ton of 970 ;; XXX: I don't really get the utility of this package, but I spent a ton of
895 ;; time figuring out how to properly build it ... so here it is. 971 ;; time figuring out how to properly build it ... so here it is.
972 :ensure t
896 :when (treesit-available-p) 973 :when (treesit-available-p)
897 :vc (:url "https://github.com/renzmann/treesit-auto") 974 :config
898 :config 975 ;; (setopt treesit-extra-load-path
899 (setopt treesit-extra-load-path 976 ;; ;; https://github.com/casouri/tree-sitter-module/
900 ;; https://github.com/casouri/tree-sitter-module/ 977 ;; `(,(expand-file-name "~/misc/tree-sitter-module/dist/")))
901 `(,(expand-file-name "~/misc/tree-sitter-module/dist/"))) 978 (setopt treesit-auto-install nil) ; javascript keeps failing
902 (treesit-auto-apply-remap) 979 (global-treesit-auto-mode))
903 (define-advice treesit-install-language-grammar (:after (&rest _) apply-remap) 980
904 (treesit-auto-apply-remap))) 981(use-package elpher
982 :ensure t)
983
984(use-package detached
985 :when (executable-find "dtach")
986 :ensure t
987 :init (detached-init)
988 :bind (([remap async-shell-command] . detached-shell-command)
989 ([remap compile] . detached-compile)
990 ([remap recompile] . detached-compile-recompile))
991 :config
992 (setf detached-terminal-data-command system-type)
993 (with-eval-after-load 'consult
994 (global-set-key [remap detached-open-session] #'detached-consult-session)))
diff --git a/lisp/acdw-mail.el b/lisp/acdw-mail.el index ae78fa0..2a7d128 100644 --- a/lisp/acdw-mail.el +++ b/lisp/acdw-mail.el
@@ -15,7 +15,7 @@
15 :key-type (symbol :tag "Variable") 15 :key-type (symbol :tag "Variable")
16 :value-type (sexp :tag "Value")))) 16 :value-type (sexp :tag "Value"))))
17 17
18(defcustom +notmuch-spam-tags '("+spam") 18(defcustom +notmuch-spam-tags '("+spam -inbox -unread")
19 "List of tag changes to apply when marking a thread as spam." 19 "List of tag changes to apply when marking a thread as spam."
20 :group 'notmuch 20 :group 'notmuch
21 :type '(repeat string)) 21 :type '(repeat string))
@@ -133,15 +133,17 @@ the saved search as well."
133 (interactive) 133 (interactive)
134 (if (require 'async nil t) 134 (if (require 'async nil t)
135 (progn 135 (progn
136 (message "Polling mail async...") 136 (message "Polling mail (async)...")
137 (async-start 137 (async-start
138 (lambda () 138 (lambda ()
139 (push "~/usr/share/emacs/site-lisp/" load-path) 139 (ignore-errors
140 (require 'notmuch-lib) 140 (push "~/usr/share/emacs/site-lisp/" load-path)
141 (notmuch-poll)) 141 (require 'notmuch-lib)
142 (lambda (result) 142 (notmuch-poll)))
143 (message "%s" result)))) 143 (lambda (_)
144 (user-error "Feature `async' not found!"))) 144 (message "Polling mail (async)...done"))))
145 ;;(user-error "Feature `async' not found!")
146 (notmuch-poll)))
145 147
146 148
147;;; Packages 149;;; Packages
@@ -180,7 +182,7 @@ the saved search as well."
180 notmuch-search-oldest-first nil 182 notmuch-search-oldest-first nil
181 notmuch-archive-tags '("-inbox" "-unread") 183 notmuch-archive-tags '("-inbox" "-unread")
182 notmuch-draft-tags '("+draft" "-inbox" "-unread") 184 notmuch-draft-tags '("+draft" "-inbox" "-unread")
183 +notmuch-spam-tags '("+spam" "+Spam") 185 +notmuch-spam-tags '("+spam")
184 mail-user-agent 'notmuch-user-agent 186 mail-user-agent 'notmuch-user-agent
185 message-mail-user-agent t 187 message-mail-user-agent t
186 notmuch-show-indent-content nil 188 notmuch-show-indent-content nil
@@ -253,5 +255,9 @@ This version doesn't add any initial-input."
253 ;; Load init file 255 ;; Load init file
254 (load notmuch-init-file :noerror)) 256 (load notmuch-init-file :noerror))
255 257
258(use-package notmuch-tags
259 :load-path "~/src/emacs/notmuch-tags.el/"
260 :commands (notmuch-tags-mode))
261
256(provide 'acdw-mail) 262(provide 'acdw-mail)
257;;; acdw-mail.el ends here 263;;; acdw-mail.el ends here
diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index 5255a50..566deed 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el
@@ -241,6 +241,7 @@ If LIST is non-nil, return the result as a list instead of a string."
241 (org-property-value ((t :inherit fixed-pitch))) 241 (org-property-value ((t :inherit fixed-pitch)))
242 (org-special-keyword ((t :inherit fixed-pitch))) 242 (org-special-keyword ((t :inherit fixed-pitch)))
243 (org-indent ((t :inherit fixed-pitch))) 243 (org-indent ((t :inherit fixed-pitch)))
244 (org-table ((t :inherit fixed-pitch)))
244 :config 245 :config
245 ;; Options 246 ;; Options
246 (setopt org-adapt-indentation nil 247 (setopt org-adapt-indentation nil
@@ -305,14 +306,15 @@ If LIST is non-nil, return the result as a list instead of a string."
305 (keymap-set org-mode-map "RET" #'+org-return-dwim) 306 (keymap-set org-mode-map "RET" #'+org-return-dwim)
306 (keymap-set org-mode-map "S-<return>" #'+org-table-copy-down|+org-return-dwim) 307 (keymap-set org-mode-map "S-<return>" #'+org-table-copy-down|+org-return-dwim)
307 ;; Hooks 308 ;; Hooks
308 (add-hook 'org-mode-hook #'variable-pitch-mode)
309 (autoload 'visual-fill-column-mode "visual-fill-column" nil t)
310 (add-hook 'org-mode-hook #'visual-fill-column-mode)
311 (add-hook 'org-mode-hook #'turn-off-auto-fill)
312 (add-hook 'org-mode-hook #'org-indent-mode)
313 (add-hook 'org-mode-hook #'abbrev-mode)
314 (add-hook 'org-mode-hook 309 (add-hook 'org-mode-hook
315 (defun before-save@org-mode () 310 (defun org-mode@setup ()
311 (when (require 'visual-fill-column nil t)
312 (setq-local visual-fill-column-extra-text-width '(8 . 8))
313 (visual-fill-column-mode))
314 (variable-pitch-mode)
315 (turn-off-auto-fill)
316 (org-indent-mode)
317 (abbrev-mode)
316 (add-hook 'before-save-hook 318 (add-hook 'before-save-hook
317 (defun before-save@org-mode@before-save () 319 (defun before-save@org-mode@before-save ()
318 (org-align-tags 'all) 320 (org-align-tags 'all)
@@ -331,6 +333,21 @@ If LIST is non-nil, return the result as a list instead of a string."
331 "\\(?:[ ]+\\|$\\)\\)?") 333 "\\(?:[ ]+\\|$\\)\\)?")
332 0 'org-indent)))) 334 0 'org-indent))))
333 335
336(use-package org-clock
337 :bind (("M-<f9>" . org-clock-out)
338 :map org-mode-map
339 ("<f8>" . org-clock-in)
340 ("<f9>" . org-clock-out))
341 :config
342 (setopt org-clock-clocked-in-display 'mode-line
343 global-mode-string
344 '((t jabber-activity-mode-string)
345 (:eval (when (org-clocking-p) org-mode-line-string))
346 (display-time-mode display-time-string)))
347 (add-hook 'org-clock-in-hook (defun org-clock@remove-from-global-mode-string ()
348 (setq global-mode-string
349 (delq 'org-mode-line-string global-mode-string)))))
350
334(use-package org-agenda 351(use-package org-agenda
335 :bind (("C-c a" . org-agenda)) 352 :bind (("C-c a" . org-agenda))
336 :config 353 :config
@@ -359,6 +376,7 @@ If LIST is non-nil, return the result as a list instead of a string."
359 (add-hook 'org-agenda-mode-hook #'truncate-lines-local-mode) 376 (add-hook 'org-agenda-mode-hook #'truncate-lines-local-mode)
360 (add-hook 'org-agenda-mode-hook #'hl-line-mode) 377 (add-hook 'org-agenda-mode-hook #'hl-line-mode)
361 (add-hook 'org-agenda-after-show-hook #'org-narrow-to-subtree) 378 (add-hook 'org-agenda-after-show-hook #'org-narrow-to-subtree)
379 (add-hook 'org-agenda-after-show-hook #'+org-hide-drawers-except-point)
362 (define-advice org-agenda-files (:filter-return (files) skip-regexp) 380 (define-advice org-agenda-files (:filter-return (files) skip-regexp)
363 "Filter some files from `org-agenda'." 381 "Filter some files from `org-agenda'."
364 (when org-agenda-skip-file-regexp 382 (when org-agenda-skip-file-regexp
@@ -424,11 +442,19 @@ effect for exporting link types)."
424 :height 1.0))) 442 :height 1.0)))
425 :config 443 :config
426 (setopt org-modern-star nil 444 (setopt org-modern-star nil
445 org-modern-list '((43 . "◦")
446 (45 . "•")
447 (42 . "‣"))
427 org-hide-leading-stars nil 448 org-hide-leading-stars nil
428 org-modern-hide-stars nil 449 org-modern-hide-stars nil
429 org-tags-column 0 450 org-tags-column 0
430 org-modern-keyword nil) 451 org-modern-keyword nil
452 org-modern-table nil)
431 (global-org-modern-mode)) 453 (global-org-modern-mode))
432 454
455(use-package org-taskwise
456 :after org
457 :load-path "~/src/emacs/org-taskwise/")
458
433(provide 'acdw-org) 459(provide 'acdw-org)
434;;; acdw-org.el ends here 460;;; acdw-org.el ends here