diff options
| author | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 09:16:34 -0500 |
|---|---|---|
| committer | Craig Jennings <craigmartinjennings@gmail.com> | 2024-04-11 09:16:34 -0500 |
| commit | 84c0963ec2096148932ec4ce8529a029cf930121 (patch) | |
| tree | ffd8ac4fe27e24cf192b3b68d4ccbe190e79b3d7 /modules/user-constants.el | |
| parent | 315f0122ea041d02bb81ad7d4b112a20252cbba8 (diff) | |
removing persistent scratch package; move jump-to=keymap
- persistent scratch throws errors when I don't want them
instead of managing the errors, it's easier to remove the package
- move jump-to key map to where we declare the files - user constants
commit 96e86219094cfe000271dfb1f651abe5b1a42175
Author: Craig Jennings <craigmartinjennings@gmail.com>
Date: Thu Apr 11 04:02:40 2024 -0500
removing unused faith.el
Diffstat (limited to 'modules/user-constants.el')
| -rw-r--r-- | modules/user-constants.el | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/modules/user-constants.el b/modules/user-constants.el index 2702f978..f42389d5 100644 --- a/modules/user-constants.el +++ b/modules/user-constants.el @@ -1,13 +1,15 @@ ;;; user-constants.el --- User Constants -*- lexical-binding: t; -*- ;;; Commentary: -;; user file locations are defined here. -;; if they aren't found, they are created. + +;; User file locations are defined here. A file or directory is created if it +;; doesn't exist. Note the keybindings at the bottom for quick access. ;;; Code: ;; ------------------------ Directory And File Constants ----------------------- +## DIRECTORIES (defconst emacs-init-file (concat user-emacs-directory "init.el") "The location of Emacs's main init file.") @@ -32,7 +34,7 @@ (defconst snippets-dir (concat sync-dir "snippets/") "The location of ya-snippet snippets.") - +### FILES (defvar schedule-file (concat sync-dir "schedule.org") "The location of the org file containing scheduled events.") @@ -80,7 +82,23 @@ article-file article-archive ledger-file - macros-file)) + macros-file)) + +;; ------------------------------ Jump To Commands ----------------------------- +;; quick access for commonly used files + +(defvar jump-to-keymap nil "Jump-to commonly used files/directories/commands.") +(setq jump-to-keymap (make-sparse-keymap)) +(global-set-key (kbd "C-c j") jump-to-keymap) +(define-key jump-to-keymap (kbd "s") #'(lambda () (interactive) (find-file schedule-file))) +(define-key jump-to-keymap (kbd "i") #'(lambda () (interactive) (find-file inbox-file))) +(define-key jump-to-keymap (kbd "c") #'(lambda () (interactive) (find-file contacts-file))) +(define-key jump-to-keymap (kbd "a") #'(lambda () (interactive) (find-file article-file))) +(define-key jump-to-keymap (kbd "A") #'(lambda () (interactive) (find-file article-archive))) +(define-key jump-to-keymap (kbd "$") #'(lambda () (interactive) (find-file ledger-file))) +(define-key jump-to-keymap (kbd "m") #'(lambda () (interactive) (find-file macros-file))) +(define-key jump-to-keymap (kbd "I") #'(lambda () (interactive) (find-file emacs-init-file))) + (provide 'user-constants) ;;; user-constants.el ends here. |
