Archived
1
0
Fork 0

disable flyspell (for now) due to performance issues ; re-work agendas to be more meaningful

This commit is contained in:
KemoNine 2022-08-25 18:52:29 -04:00
parent 3289b8a202
commit 579d0be5c5
3 changed files with 136 additions and 126 deletions

View file

@ -395,40 +395,40 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; flyspell ; flyspell
(require 'flyspell) ;(require 'flyspell)
(setenv "LANG" "en_US") ;(setenv "LANG" "en_US")
;(setenv "DICPATH" "~/.emacs.d.profiles/common/dictionaries") ; https://github.com/wooorm/dictionaries ;(setenv "DICPATH" "~/.emacs.d.profiles/common/dictionaries") ; https://github.com/wooorm/dictionaries
(setq ispell-program-name "hunspell") ;(setq ispell-program-name "hunspell")
(setq ispell-dictionary "en_US") ;(setq ispell-dictionary "en_US")
;
(global-set-key (kbd "C-c y") 'flyspell-toggle ) ;(global-set-key (kbd "C-c y") 'flyspell-toggle )
;
(defun flyspell-on-for-buffer-type () ;(defun flyspell-on-for-buffer-type ()
"Enable Flyspell appropriately for the major mode of the current buffer. Uses `flyspell-prog-mode' for modes derived from `prog-mode', so only strings and comments get checked. All other buffers get `flyspell-mode' to check all text. If flyspell is already enabled, does nothing." ; "Enable Flyspell appropriately for the major mode of the current buffer. Uses `flyspell-prog-mode' for modes derived from `prog-mode', so only strings and comments get checked. All other buffers get `flyspell-mode' to check all text. If flyspell is already enabled, does nothing."
(interactive) ; (interactive)
(if (not (symbol-value flyspell-mode)) ; if not already on ; (if (not (symbol-value flyspell-mode)) ; if not already on
(progn ; (progn
(if (derived-mode-p 'prog-mode) ; (if (derived-mode-p 'prog-mode)
(progn ; (progn
(message "Flyspell on (code)") ; (message "Flyspell on (code)")
(flyspell-prog-mode)) ; (flyspell-prog-mode))
;; else ; ;; else
(progn ; (progn
(message "Flyspell on (text)") ; (message "Flyspell on (text)")
(flyspell-mode 1))) ; (flyspell-mode 1)))
;; I tried putting (flyspell-buffer) here but it didn't seem to work ; ;; I tried putting (flyspell-buffer) here but it didn't seem to work
))) ; )))
;
(defun flyspell-toggle () ; (defun flyspell-toggle ()
"Turn Flyspell on if it is off, or off if it is on. When turning on, it uses `flyspell-on-for-buffer-type' so code-vs-text is handled appropriately." ; "Turn Flyspell on if it is off, or off if it is on. When turning on, it uses `flyspell-on-for-buffer-type' so code-vs-text is handled appropriately."
(interactive) ; (interactive)
(if (symbol-value flyspell-mode) ; (if (symbol-value flyspell-mode)
(progn ; flyspell is on, turn it off ; (progn ; flyspell is on, turn it off
(message "Flyspell off") ; (message "Flyspell off")
(flyspell-mode -1)) ; (flyspell-mode -1))
; else - flyspell is off, turn it on ; ; else - flyspell is off, turn it on
(flyspell-on-for-buffer-type))) ; (flyspell-on-for-buffer-type)))
;
(add-hook 'find-file-hook 'flyspell-on-for-buffer-type) ;(add-hook 'find-file-hook 'flyspell-on-for-buffer-type)
(add-hook 'text-mode-hook 'flyspell-on-for-buffer-type) ;(add-hook 'text-mode-hook 'flyspell-on-for-buffer-type)
(add-hook 'after-change-major-mode-hook 'flyspell-on-for-buffer-type) ;(add-hook 'after-change-major-mode-hook 'flyspell-on-for-buffer-type)

View file

@ -1,88 +1,99 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; helper for building agenda file lists ; helper for building agenda file lists
(defun load-org-agenda-files-recursively (dir) "Find all directories in DIR." (defun load-org-agenda-files-recursively (dir) "Find all directories in DIR."
(unless (file-directory-p dir) (error "Not a directory `%s'" dir)) (unless (file-directory-p dir) (error "Not a directory `%s'" dir))
(unless (equal (directory-files dir nil org-agenda-file-regexp t) nil) (unless (equal (directory-files dir nil org-agenda-file-regexp t) nil)
(add-to-list 'org-agenda-files dir) (add-to-list 'org-agenda-files dir)
) )
(dolist (file (directory-files dir nil nil t)) (dolist (file (directory-files dir nil nil t))
(unless (member file '("." "..")) (unless (member file '("." ".."))
(let ((file (concat dir file "/"))) (let ((file (concat dir file "/")))
(when (file-directory-p file) (when (file-directory-p file)
(load-org-agenda-files-recursively file) (load-org-agenda-files-recursively file)
) )
) )
) )
) )
) )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set some org agendas/dashboards ; org-agenda tuning (view stuff only)
(setq org-agenda-todo-ignore-scheduled 'all) (setq org-agenda-todo-ignore-scheduled 'all)
(setq org-agenda-sorting-strategy ;; Remove completed deadline tasks from the agenda view
'( (setq org-agenda-skip-deadline-if-done t)
(agenda habit-down time-up scheduled-down priority-down category-keep) ;; Remove completed scheduled tasks from the agenda view
(todo habit-up time-down scheduled-down deadline-down todo-state-down priority-down alpha-up) (setq org-agenda-skip-scheduled-if-done t)
(tags priority-down category-keep) ;; Remove completed items from search results
(search category-keep) (setq org-agenda-skip-timestamp-if-done t)
)
) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set some org agendas/dashboards
(setq org-agenda-custom-commands (setq org-agenda-sorting-strategy
'( '(
("P" "Personal" (agenda habit-down time-up scheduled-down priority-down category-keep)
( (todo habit-up time-down scheduled-down deadline-down todo-state-down priority-down alpha-up)
(agenda "" ( (tags priority-down category-keep)
(org-agenda-overriding-header "PERSONAL Agenda") (search category-keep)
(org-agenda-files (list "~/org/_todo.org" )
"~/org/_index.org" )
"~/org/health/_health.org"
"~/org/health/health_houdini.org" (setq org-agenda-files (list "~/org/_todo.org"
"~/org/health/health_mike.org")) "~/org/_index.org"
(load-org-agenda-files-recursively "~/org/culinary") "~/org/health/_health.org"
(load-org-agenda-files-recursively "~/org/gaz") "~/org/health/health_houdini.org"
(load-org-agenda-files-recursively "~/org/photography") "~/org/health/health_mike.org"))
(load-org-agenda-files-recursively "~/org/reading") (load-org-agenda-files-recursively "~/org/reading")
))
(alltodo "*" ( (setq org-agenda-custom-commands
(org-agenda-overriding-header "PERSONAL To Do List") '(
(org-agenda-files (list "~/org/_todo.org" ("r" "Personal"
"~/org/_index.org" (
"~/org/health/_health.org" (agenda "" (
"~/org/health/health_houdini.org" (org-agenda-overriding-header "Personal")
"~/org/health/health_mike.org")) ))
(load-org-agenda-files-recursively "~/org/culinary") (todo "WIP" (
(load-org-agenda-files-recursively "~/org/gaz") (org-agenda-overriding-header "WIP")
(load-org-agenda-files-recursively "~/org/photography") ))
(load-org-agenda-files-recursively "~/org/reading") (todo "READY" (
)) (org-agenda-overriding-header "Ready")
) ))
) (tags-todo "+PRIORITY<\"D\"-STYLE=\"habit\"-TODO=\"WIP\"-TODO=\"READY\"" (
("G" . "Gaming") (org-agenda-overriding-header "To Do")
("Gd" "Destiny" ))
( (tags-todo "+PRIORITY>=\"D\"-STYLE=\"habit\"-TODO=\"WIP\"-TODO=\"READY\"" (
(agenda "" ( (org-agenda-overriding-header "Low Priority")
(org-agenda-start-on-weekday 2) ))
(org-agenda-overriding-header "DESTINY Agenda") )
(org-agenda-files (list "~/org/games_destiny.org")) )
)) ("d" "Destiny"
(tags-todo "-crafting-STYLE=\"habit\"" ( (
(org-agenda-overriding-header "DESTINY To Do List") (agenda "" (
(org-agenda-files (list "~/org/games_destiny.org")) (org-agenda-start-on-weekday 2)
)) (org-agenda-overriding-header "Destiny")
(tags-todo "+crafting+weaponleveling" ( (org-agenda-files (list "~/org/games_destiny.org"))
(org-agenda-overriding-header "DESTINY Weapon Leveling") ))
(org-agenda-files (list "~/org/games_destiny.org")) (todo "WIP" (
)) (org-agenda-overriding-header "WIP")
(tags-todo "+crafting+resonance" ( (org-agenda-files (list "~/org/games_destiny.org"))
(org-agenda-overriding-header "DESTINY Weapon Shaping") ))
(org-agenda-files (list "~/org/games_destiny.org")) (todo "READY" (
)) (org-agenda-overriding-header "Ready")
(tags-todo "+crafting+weaponupgrade" ( (org-agenda-files (list "~/org/games_destiny.org"))
(org-agenda-overriding-header "DESTINY Weapon Upgrades") ))
(org-agenda-files (list "~/org/games_destiny.org")) (tags-todo "+resonance_needed>0-STYLE=\"habit\"-WIP-READY" (
)) (org-agenda-overriding-header "Weapon Shaping")
) (org-agenda-files (list "~/org/games_destiny.org"))
) ))
) (tags-todo "+resonance_needed<=0+level_at_all_perks_or_higher<>\"true\"-STYLE=\"habit\"-TODO=\"WIP\"-TODO=\"READY\"" (
(org-agenda-overriding-header "Weapon Leveling")
(org-agenda-files (list "~/org/games_destiny.org"))
))
(tags-todo "+resonance_needed<=0+level_at_all_perks_or_higher=\"true\"+masterworked<>\"true\"-STYLE=\"habit\"-TODO=\"WIP\"-TODO=\"READY\"" (
(org-agenda-overriding-header "Weapon Upgrades")
(org-agenda-files (list "~/org/games_destiny.org"))
))
)
)
("o" . "Photography")
)
) )

View file

@ -97,12 +97,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; files ; files
(setq org-default-notes-file "~/org/_index.org") (setq org-default-notes-file "~/org/_index.org")
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'")
;; Collect all .org from my Org directory and subdirs
(setq org-agenda-file-regexp "\\`[^.].*\\.org\\'") ; default value
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; agendas ; agendas
(setq org-agenda-sticky t)
(load "~/.emacs.d.profiles/org/config-org-agendas.el") (load "~/.emacs.d.profiles/org/config-org-agendas.el")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;