summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/auth-config.el6
-rw-r--r--modules/custom-ordering.el6
-rw-r--r--modules/modeline-config.el5
-rw-r--r--modules/org-agenda-config.el2
-rw-r--r--modules/org-config.el24
-rw-r--r--modules/org-gcal-config.el2
-rw-r--r--modules/ui-config.el3
-rw-r--r--modules/weather-config.el4
8 files changed, 43 insertions, 9 deletions
diff --git a/modules/auth-config.el b/modules/auth-config.el
index 2b52087e..c3000f7f 100644
--- a/modules/auth-config.el
+++ b/modules/auth-config.el
@@ -40,7 +40,11 @@
:config
(epa-file-enable)
;; (setq epa-pinentry-mode 'loopback) ;; emacs request passwords in minibuffer
- (setq epg-gpg-program "gpg2")) ;; force use gpg2 (not gpg v.1)
+ (setq epg-gpg-program "gpg2") ;; force use gpg2 (not gpg v.1)
+
+ ;; Update gpg-agent with current DISPLAY environment
+ ;; This ensures pinentry can open GUI windows when Emacs starts
+ (call-process "gpg-connect-agent" nil nil nil "updatestartuptty" "/bye"))
;; ---------------------------------- Plstore ----------------------------------
;; Encrypted storage used by oauth2-auto for Google Calendar tokens.
diff --git a/modules/custom-ordering.el b/modules/custom-ordering.el
index 7d906e75..f6972910 100644
--- a/modules/custom-ordering.el
+++ b/modules/custom-ordering.el
@@ -249,7 +249,8 @@ Returns the transformed string without modifying the buffer."
"r" #'cj/reverse-lines
"n" #'cj/number-lines
"A" #'cj/alphabetize-region
- "L" #'cj/comma-separated-text-to-lines)
+ "L" #'cj/comma-separated-text-to-lines
+ "o" #'cj/org-sort-by-todo-and-priority)
(keymap-set cj/custom-keymap "o" cj/ordering-map)
(with-eval-after-load 'which-key
@@ -262,7 +263,8 @@ Returns the transformed string without modifying the buffer."
"C-; o r" "reverse lines"
"C-; o n" "number lines"
"C-; o A" "alphabetize"
- "C-; o L" "comma to lines"))
+ "C-; o L" "comma to lines"
+ "C-; o o" "org: sort by TODO+priority"))
(provide 'custom-ordering)
;;; custom-ordering.el ends here.
diff --git a/modules/modeline-config.el b/modules/modeline-config.el
index b1403539..a1c85caa 100644
--- a/modules/modeline-config.el
+++ b/modules/modeline-config.el
@@ -78,8 +78,9 @@ Green = writeable, Red = read-only, Gold = overwrite.
Truncates in narrow windows. Click to switch buffers.")
(defvar-local cj/modeline-position
- '(:eval (format "L:%d C:%d" (line-number-at-pos) (current-column)))
- "Line and column position as L:line C:col.")
+ '("L:" (:eval (format-mode-line "%l")) " C:" (:eval (format-mode-line "%c")))
+ "Line and column position as L:line C:col.
+Uses built-in cached values for performance.")
(defvar cj/modeline-vc-faces
'((added . vc-locally-added-state)
diff --git a/modules/org-agenda-config.el b/modules/org-agenda-config.el
index 61e542f6..70ca9d4a 100644
--- a/modules/org-agenda-config.el
+++ b/modules/org-agenda-config.el
@@ -264,7 +264,7 @@ This allows a line to show in an agenda without being scheduled or a deadline."
:load-path "~/code/chime.el"
:init
;; Debug mode (keep set to nil, but available for troubleshooting)
- (setq chime-debug nil)
+ ;; (setq chime-debug nil)
:bind
("C-c A" . chime-check)
:config
diff --git a/modules/org-config.el b/modules/org-config.el
index 75d4c7db..5cae1d0e 100644
--- a/modules/org-config.el
+++ b/modules/org-config.el
@@ -225,6 +225,7 @@
(use-package org-appear
:hook (org-mode . org-appear-mode)
+ :disabled t
:custom
(org-appear-autoemphasis t) ;; Show * / _ when cursor is on them
(org-appear-autolinks t) ;; Also works for links
@@ -274,6 +275,29 @@ the current buffer's cache. Useful when encountering parsing errors like
(message "Cleared org-element cache for current buffer"))
(user-error "Current buffer is not in org-mode"))))
+;; ----------------------- Org Multi-Level Sorting -----------------------------
+
+(defun cj/org-sort-by-todo-and-priority ()
+ "Sort org entries by TODO status (TODO before DONE) and priority (A to D).
+Sorts the current level's entries. Within each TODO state group, entries are
+sorted by priority. Uses stable sorting: sort by priority first, then by TODO
+status to preserve priority ordering within TODO groups."
+ (interactive)
+ (unless (derived-mode-p 'org-mode)
+ (user-error "Current buffer is not in org-mode"))
+ (save-excursion
+ ;; First sort by priority (A, B, C, D, then no priority)
+ ;; Ignore "Nothing to sort" errors for empty sections
+ (condition-case nil
+ (org-sort-entries nil ?p)
+ (user-error nil))
+ ;; Then sort by TODO status (TODO before DONE)
+ ;; This preserves the priority ordering within each TODO group
+ (condition-case nil
+ (org-sort-entries nil ?o)
+ (user-error nil)))
+ (message "Sorted entries by TODO status and priority"))
+
;; which-key labels for org-table-map
(with-eval-after-load 'which-key
(which-key-add-key-based-replacements
diff --git a/modules/org-gcal-config.el b/modules/org-gcal-config.el
index 97e8446a..4eca5e7e 100644
--- a/modules/org-gcal-config.el
+++ b/modules/org-gcal-config.el
@@ -190,7 +190,7 @@ Useful after changing `cj/org-gcal-sync-interval-minutes'."
;; Start automatic sync timer based on user configuration
;; Set cj/org-gcal-sync-interval-minutes to nil to disable
-(cj/org-gcal-start-auto-sync)
+;; (cj/org-gcal-start-auto-sync)
;; Google Calendar keymap and keybindings
(defvar-keymap cj/gcal-map
diff --git a/modules/ui-config.el b/modules/ui-config.el
index 837d2169..3922ce2a 100644
--- a/modules/ui-config.el
+++ b/modules/ui-config.el
@@ -50,7 +50,8 @@
(setq use-file-dialog nil) ;; no file dialog
(setq use-dialog-box nil) ;; no dialog boxes either
-(column-number-mode 1) ;; show column number in the modeline
+(line-number-mode 1) ;; show line number in the modeline (cached)
+(column-number-mode 1) ;; show column number in the modeline (cached)
(setq switch-to-buffer-obey-display-actions t) ;; manual buffer switching obeys display action rules
;; -------------------------------- Transparency -------------------------------
diff --git a/modules/weather-config.el b/modules/weather-config.el
index 3a30aa17..82589af0 100644
--- a/modules/weather-config.el
+++ b/modules/weather-config.el
@@ -14,7 +14,8 @@
(add-to-list 'load-path "/home/cjennings/code/wttrin")
;; Set debug flag BEFORE loading wttrin (checked at load time)
-(setq wttrin-debug nil)
+;; Change this to t to enable debug logging
+(setq wttrin-debug t)
(use-package wttrin
;; Uncomment the next line to use vc-install instead of local directory:
@@ -27,6 +28,7 @@
:bind
("M-W" . wttrin)
:custom
+ ;; wttrin-debug must be set BEFORE loading (see line 17 above)
(wttrin-unit-system "u")
(wttrin-mode-line-favorite-location "New Orleans, LA")
(wttrin-mode-line-refresh-interval 900) ; 15 minutes