diff options
author | Marc Coquand <marc@coquand.email> | 2025-01-07 17:52:53 +0100 |
---|---|---|
committer | Marc Coquand <marc@coquand.email> | 2025-01-07 17:52:53 +0100 |
commit | d5ac7d2ef562c276225f6f9019be7b9a00d399a2 (patch) | |
tree | ffed2b816f238b98e785cb64d2f87d9ac4397a1a /home/dots/.emacs | |
parent | 34f3845769670dc5799d60d5201ed8ca637968a5 (diff) | |
download | guix-d5ac7d2ef562c276225f6f9019be7b9a00d399a2.tar.gz guix-d5ac7d2ef562c276225f6f9019be7b9a00d399a2.tar.bz2 guix-d5ac7d2ef562c276225f6f9019be7b9a00d399a2.zip |
.
Diffstat (limited to 'home/dots/.emacs')
-rw-r--r-- | home/dots/.emacs | 114 |
1 files changed, 85 insertions, 29 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index 0fadb4e..80b6796 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -26,6 +26,8 @@ magit markdown-mode mastodon + org-present + visual-fill-column nix-mode notmuch @@ -371,20 +373,23 @@ :bind (("C-c m" . notmuch-jump-search)) :custom - ((notmuch-show-logo nil))) + (notmuch-address-use-company nil) + (notmuch-always-prompt-for-sender 't) + (notmuch-mua-user-agent-function 'notmuch) + (notmuch-show-logo nil)) (use-package pass :defer t :ensure t) -(defun elfeed-refresh () - (interactive) - (cl-loop for entry in (elfeed-search-selected) - do (elfeed-untag-1 entry 'unread)) - (elfeed-protocol-fever-reinit "https://freshrss@rss.mccd.space")) - (use-package elfeed :ensure t + :init + (defun elfeed-refresh () + (interactive) + (cl-loop for entry in (elfeed-search-selected) + do (elfeed-untag-1 entry 'unread)) + (elfeed-protocol-fever-reinit "https://freshrss@rss.mccd.space")) :bind (:map elfeed-search-mode-map ("G" . elfeed-refresh))) @@ -648,6 +653,9 @@ Index includes links and headings." :hook ((server-after-make-frame . exwm-mff-mode))) +(use-package hide-mode-line + :load-path "elisp") + (use-package isearch :defer t :bind @@ -826,6 +834,50 @@ Index includes links and headings." (eldoc-documentation-strategy 'eldoc-documentation-compose-eagerly) (eldoc-echo-area-use-multiline-p 'truncate-sym-name-if-fit)) +(use-package visual-fill-column + :custom + (visual-fill-column-width 110) + (visual-fill-column-center-text t)) + +(use-package org-present + :after visual-fill-column hide-mode-line + :init + (defun my/org-present-start () + ;; Center the presentation and wrap lines + (visual-fill-column-mode 1) + (hide-mode-line-mode 1) + (setq-local header-line-format " ") + (setq-local image-auto-resize 'fit-width) + (setq-local face-remapping-alist + '((variable-pitch (:height 1.5 :family "Liberation Serif") variable-pitch) + (header-line (:height 4.0) variable-pitch) + (org-document-title (:height 1.75) org-document-title) + (org-level-1 (:weight bold) org-level-1) + (org-code (:height 1.55) org-code) + (org-verbatim (:height 1.55) org-verbatim) + (org-block (:height 1.25) org-block) + (org-block-begin-line (:height 0.7) org-block))) + (variable-pitch-mode 1) + (flyspell-mode 0) + (tab-bar-mode 0) + (org-display-inline-images) + (visual-line-mode 1)) + + (defun my/org-present-end () + ;; Stop centering the document + (visual-fill-column-mode 0) + (setq-local header-line-format nil) + (hide-mode-line-mode 0) + (flyspell-mode 1) + (setq-local image-auto-resize nil) + (setq-local face-remapping-alist '((default variable-pitch default))) + (tab-bar-mode 1) + (visual-line-mode 0)) + + :hook + (org-present-mode . my/org-present-start) + (org-present-mode-quit . my/org-present-end)) + (use-package markdown-mode :defer t :ensure t @@ -980,12 +1032,14 @@ Index includes links and headings." (interactive) (async-shell-command "org-sync")) :custom - (org-complete-tags-always-offer-all-agenda-tags nil) + (org-complete-tags-always-offer-all-agenda-tags 't) (org-use-fast-tag-selection (quote auto)) + (org-goto-interface 'outline-path-completionp) + (org-outline-path-complete-in-steps nil) (org-refile-targets '((nil :maxlevel . 4) - (org-agenda-files :maxlevel . 4))) - (org-default-notes-file "~/personal-db/notes/lore.org") + (org-agenda-text-search-extra-files :maxlevel . 4))) + (org-default-notes-file "~/personal-db/notes/inbox.org") (org-hide-emphasis-markers t) (org-link-keep-stored-after-insertion t) (org-startup-folded t) @@ -1001,15 +1055,6 @@ Index includes links and headings." '((sequence "TODO(t)" "|" "DONE(d)") (sequence "UNREAD(u)" "READING(e)" "|" "READ(r)") (sequence "|" "CANCELED(c)"))) - (org-agenda-custom-commands - '(("t" "Regular" todo "TODO") - ("b" "Books" todo "UNREAD") - ("n" "Agenda and all TODOs" - ((agenda "today") - (todo "TODO"))) - ("p" "Pivå and Agenda" - ((tags-todo "+piva") - (agenda ""))))) (org-priority-lowest ?E) (org-priority-faces '((?A . (:weight bold :inherit org-priority)) (?D . (:foreground "gray50" :inherit org-priority)) @@ -1032,8 +1077,8 @@ Index includes links and headings." (set-face-attribute 'org-meta-line nil :inherit 'fixed-pitch) :hook ((org-mode . org-indent-mode) - (org-capture-after-finalize . sync-org) (org-mode . flyspell-mode) + (org-mode . org-display-inline-images) (org-mode . (lambda () (auto-revert-mode 1))) (org-mode . visual-line-mode) @@ -1097,7 +1142,7 @@ Index includes links and headings." :follow (lambda (kmacro) (kmacro-call-macro nil t nil (kbd kmacro)))) (org-link-set-parameters "goto" - :follow (lambda (keyword) (lgrep keyword "*.org" "~/personal-db/notes" nil))) + :follow (lambda (keyword) (kmacro-call-macro nil t nil (kbd (string-join '("M-x org-agenda <RET> s " keyword " <RET>")))))) :bind (("C-c l" . org-store-link))) @@ -1162,16 +1207,29 @@ Index includes links and headings." (use-package org-agenda :defer t :custom + (org-agenda-custom-commands + '(("t" "Regular" todo "TODO") + ("b" "Books" todo "UNREAD") + ("k" "Knowledge" + search "" ((org-agenda-files '("")) + (org-agenda-overriding-header "Lore"))) + ("n" "Agenda and all TODOs" + ((agenda "today") + (todo "TODO"))) + ("p" "Pivå and Agenda" + ((tags-todo "+piva") + (agenda ""))))) (org-agenda-files '("/home/mccd/personal-db/notes/cal-ios.org" - "/home/mccd/dev/sustainably/README.org" - "/home/mccd/dev/sustainably/exploration.org" - "/home/mccd/system/guix.org" "/home/mccd/personal-db/notes/agenda.org" "/home/mccd/personal-db/notes/log.org" - "/home/mccd/personal-db/notes/log.old.org" + "/home/mccd/personal-db/notes/log.old.org")) + (org-agenda-text-search-extra-files + '("/home/mccd/personal-db/notes/lore.org" + "/home/mccd/dev/sustainably/exploration.org" + "/home/mccd/dev/sustainably/README.org" "/home/mccd/personal-db/notes/inbox.org" - "/home/mccd/personal-db/notes/lore.org")) + "/home/mccd/system/guix.org")) (org-agenda-remove-tags t) (org-agenda-inhibit-startup nil) :config @@ -1404,7 +1462,7 @@ Index includes links and headings." (message-send-mail-function 'message-send-mail-with-sendmail) (message-sendmail-envelope-from 'header) (message-mail-user-agent t) - (mail-user-agent 'message-user-agent) + (mail-user-agent 'notmuch-user-agent) (message-kill-buffer-on-exit t)) (use-package sendmail @@ -1426,8 +1484,6 @@ Index includes links and headings." (mastodon-active-user "marcc") (mastodon-instance-url "https://fosstodon.org")) - - (use-package eww :custom (browse-url-browser-function 'eww-browse-url) ; Use eww as the default browser |