summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs57
1 files changed, 48 insertions, 9 deletions
diff --git a/emacs b/emacs
index c5e59c4..e34fa0f 100644
--- a/emacs
+++ b/emacs
@@ -3,6 +3,7 @@
(set-face-attribute 'default nil :height 150)
;; Put Emacs auto-save and backup files to /tmp
(defconst emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid)) temporary-file-directory))
+(add-to-list 'load-path "~/.emacs.d/elisp")
(setq
@@ -233,6 +234,35 @@
:init
(ido-mode t))
+
+(defvar marcc/timestamp-format "%H:%M "
+ "Format for H:M timestamp")
+
+(defun marcc/timestamp-hour ()
+ "Insert a timestamp at the current point.
+Uses `marcc/timestamp-format' for formatting the date/time."
+ (interactive)
+ (insert (format-time-string marcc/timestamp-format (current-time)))
+ )
+
+(use-package calendar
+ :defer t
+ :init
+ (add-to-list 'auto-mode-alist '("~/personal-db/log" . diary-mode))
+ :hook
+ ((diary-mode . variable-pitch-mode)
+ (diary-fancy-display-mode . variable-pitch-mode)
+ (diary-mode . flyspell-mode))
+ :config
+ (global-set-key (kbd "C-c d") 'calendar)
+ (calendar-set-date-style 'european)
+ (define-key diary-mode-map (kbd "C-=") 'marcc/timestamp-hour)
+ (set-face-attribute 'diary nil :inherit 'fixed-pitch)
+ (setq diary-file "~/personal-db/log"
+ calendar-mark-diary-entries-flag t
+ calendar-week-start-day 1))
+
+
(use-package nix-mode
:ensure t
:hook
@@ -253,9 +283,18 @@
:ensure t
:hook ((before-save . eglot-format-buffer)))
-(add-to-list 'load-path "~/.emacs.d/elisp")
+(use-package rec-mode
+ :ensure nil
+ :defer t
+ :mode "\\.rec\\'"
+ :hook
+ ((rec-mode . flymake-mode)
+ (rec-mode . eldoc-mode)))
(use-package erc
+ :ensure t
+ :hook
+ ((erc-mode . flyspell-mode))
:config
(setq erc-autojoin-channels-alist
'(("Libera.Chat"
@@ -265,7 +304,7 @@
"#lobsters"
"#netbsd"
"#erc")))
-
+ :init
(global-set-key
"\C-cef"
(lambda ()
@@ -282,7 +321,7 @@
(org-babel-do-load-languages
'org-babel-load-languages
'((shell . t)))
-
+
:config
(setq org-agenda-files '("~/personal-db/notes")
org-refile-targets
@@ -290,6 +329,7 @@
(org-agenda-files :maxlevel . 2))
org-default-notes-file "~/personal-db/todo.org"
org-hide-emphasis-markers t
+ org-agenda-include-diary t
org-agenda-inhibit-startup t
;; Add /New Heading at the end for use
org-refile-allow-creating-parent-nodes 'confirm
@@ -303,9 +343,9 @@
entry (file+headline "~/personal-db/todo.org" "Todo")
"* TODO %?\n%i\n%a\n%T\n "
:empty-lines 1)
- ("l" "Log" entry (file+datetree "~/personal-db/notes/log.org")
- "* %?\n%T\n"
- :empty-lines 1)
+ ("l" "Log" plain (file "~/personal-db/log")
+ "%<%d %b %Y %H:%M> %?"
+ :prepend t)
("n" "Inbox"
entry (file+headline "~/personal-db/notes/inbox.org" "Notes")
"** %?\n%T"
@@ -351,12 +391,11 @@
(setq message-sendmail-extra-arguments (list '"-a" account))))))
(add-hook 'message-send-mail-hook 'marc/set-msmtp-account)
+(add-hook 'message-mode-hook 'flyspell-mode)
(use-package mu4e
:ensure nil
:load-path "/usr/share/emacs/site-lisp/mu4e/"
- :hook
- ((message-mode . flyspell-mode))
:config
;; This is set to 't' to avoid mail syncing issues when using mbsync
@@ -533,7 +572,7 @@
'((:name "Last 7 days" :query "date:7d..now" :hide-unread t :key 119)
(:name "Messages with images" :query "mime:image/*" :key 112)))
'(org-agenda-files
- '("~/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/personal-db/notes/log.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/builds/comma.directory/comma.org" "/home/mccd/personal-db/notes/frugal.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/todo.org"))
+ '("/home/mccd/personal-db/notes/carving-my-own-road.org" "/home/mccd/personal-db/notes/emacs-teaches.org" "/home/mccd/personal-db/notes/agency-and-tech.org" "/home/mccd/builds/sustainably/piva.org" "/home/mccd/builds/comma.directory/comma.org" "/home/mccd/personal-db/notes/frugal.org" "/home/mccd/personal-db/notes/inbox.org" "/home/mccd/personal-db/notes/emacs.org" "/home/mccd/personal-db/todo.org"))
'(org-fold-core-style 'overlays)
'(package-selected-packages
'(web-mode flycheck nix-mode nix-ts-mode avy pdf-tools elfeed-protocol lem yasnippet-snippets elfeed yasnippet smartparens markdown-mode mastodon tldr almost-mono-themes rec-mode magit go-mode expand-region devdocs))