summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2023-05-01 18:56:17 +0100
committerYann Herklotz <git@yannherklotz.com>2023-05-01 18:56:40 +0100
commit8cc3bf0f42a00b94454043344c1108e340c698b1 (patch)
treed589f036918e3c96103fff737641ed77d024ebae
parent73365007d44286510a385a3664e7aa139e340d99 (diff)
downloadymh-emacs-8cc3bf0f42a00b94454043344c1108e340c698b1.tar.gz
ymh-emacs-8cc3bf0f42a00b94454043344c1108e340c698b1.zip
Move :init setq into :custom block
-rw-r--r--gnus.el3
-rw-r--r--init.el630
2 files changed, 340 insertions, 293 deletions
diff --git a/gnus.el b/gnus.el
index 4153da7..429c704 100644
--- a/gnus.el
+++ b/gnus.el
@@ -4,8 +4,7 @@
(setq gnus-secondary-select-methods
'((nntp "news.gwene.org")
(nnmaildir "mailbox"
- (directory "~/mail-gnus/mailbox"))
- (nnhackernews "")))
+ (directory "~/mail-gnus/mailbox"))))
(setq mm-text-html-renderer 'gnus-w3m)
(setq gnus-inhibit-images nil)
diff --git a/init.el b/init.el
index 71a4d6d..8d981b5 100644
--- a/init.el
+++ b/init.el
@@ -256,11 +256,11 @@ Should be one of `:white-split', `:modified' or `:default'")
;; Display the time in the mode line
(use-package time
+ :custom
+ (display-time-24hr-format t)
+ (display-time-default-load-average nil)
+ (display-time-day-and-date t)
:init
- (setq display-time-24hr-format t)
- (setq display-time-default-load-average nil)
- (setq display-time-day-and-date t)
- :config
(display-time-mode 1))
(use-package whitespace
@@ -276,18 +276,18 @@ Should be one of `:white-split', `:modified' or `:default'")
:bind (:map company-mode-map
("M-n" . company-complete-common-or-cycle))
:hook scala-mode
- :init
- (setq company-idle-delay nil))
+ :custom
+ (company-idle-delay nil))
(use-package shr
- :init
- (setq shr-use-fonts nil)
- (setq shr-max-image-proportion 0.5))
+ :custom
+ (shr-use-fonts nil)
+ (shr-max-image-proportion 0.5))
(use-package exec-path-from-shell
:ensure t
- :init
- (setq exec-path-from-shell-arguments '("-l"))
+ :custom
+ (exec-path-from-shell-arguments '("-l"))
:config
(when (memq window-system '(mac ns x))
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG"
@@ -296,32 +296,31 @@ Should be one of `:white-split', `:modified' or `:default'")
(exec-path-from-shell-initialize)))
(use-package browse-url
- :init
- (setq browse-url-handlers
- '(("wikipedia\\.org" . eww-browse-url)
- ("yannherklotz\\.com" . eww-browse-url)
- ("ymhg\\.org" . eww-browse-url)
- ("archlinux\\.org" . eww-browse-url)
- ("sachachua\\.com" . eww-browse-url)
- ("comonad\\.com" . eww-browse-url)
- ("drewdevault\\.com" . eww-browse-url)
- ("wordpress\\.com" . eww-browse-url)
- ("mathbabe\\.org" . eww-browse-url)
- ("ethz\\.ch" . eww-browse-url)
- ("pragmaticemacs\\.com" . eww-browse-url))))
+ :custom
+ (browse-url-handlers
+ '(("wikipedia\\.org" . eww-browse-url)
+ ("yannherklotz\\.com" . eww-browse-url)
+ ("ymhg\\.org" . eww-browse-url)
+ ("archlinux\\.org" . eww-browse-url)
+ ("sachachua\\.com" . eww-browse-url)
+ ("comonad\\.com" . eww-browse-url)
+ ("drewdevault\\.com" . eww-browse-url)
+ ("wordpress\\.com" . eww-browse-url)
+ ("mathbabe\\.org" . eww-browse-url)
+ ("ethz\\.ch" . eww-browse-url)
+ ("pragmaticemacs\\.com" . eww-browse-url))))
(use-package message
- :init
- (setq message-send-mail-function 'message-send-mail-with-sendmail)
- (setq message-fill-column 80)
-
- (setq message-signature "Yann Herklotz
+ :custom
+ (message-send-mail-function 'message-send-mail-with-sendmail)
+ (message-fill-column 80)
+ (message-signature "Yann Herklotz
Imperial College London
https://yannherklotz.com"))
(use-package ispell
- :init
- (setq ispell-dictionary "en_GB"))
+ :custom
+ (ispell-dictionary "en_GB"))
(use-package delight
:ensure t
@@ -330,14 +329,14 @@ https://yannherklotz.com"))
(delight 'eldoc-mode nil "eldoc"))
(use-package project
- :init
- (setq project-switch-commands
- '((project-find-file "Find file")
- (project-find-regexp "Find regexp")
- (project-find-dir "Find directory")
- (project-vc-dir "VC-Dir")
- (magit-project-status "Magit")
- (project-eshell "Eshell")))
+ :custom
+ (project-switch-commands
+ '((project-find-file "Find file")
+ (project-find-regexp "Find regexp")
+ (project-find-dir "Find directory")
+ (project-vc-dir "VC-Dir")
+ (magit-project-status "Magit")
+ (project-eshell "Eshell")))
:config
(define-key project-prefix-map "m" #'magit-project-status))
@@ -346,11 +345,11 @@ https://yannherklotz.com"))
("D" . toggle-frame-tab-bar)
("p" . ymh-tabs-switch-project))
:demand t
+ :custom
+ (tab-bar-show nil)
+ (tab-bar-select-tab-modifiers '(meta))
+ (tab-bar-new-tab-choice "*scratch*")
:init
- (setq tab-bar-show nil)
- (setq tab-bar-select-tab-modifiers '(meta))
- (setq tab-bar-new-tab-choice "*scratch*")
- :config
(tab-bar-mode 1))
(use-package flyspell
@@ -365,18 +364,19 @@ https://yannherklotz.com"))
(add-to-list 'math-tzone-names '("IST" (float -55 -1) 0)))
(use-package calendar
- :config
- (setq calendar-mark-diary-entries-flag t)
- (setq calendar-mark-holidays-flag t)
- (setq calendar-mode-line-format nil)
- (setq calendar-time-display-form
+ :custom
+ (calendar-mark-diary-entries-flag t)
+ (calendar-mark-holidays-flag t)
+ (calendar-mode-line-format nil)
+ (calendar-time-display-form
'(24-hours ":" minutes
(when time-zone
(format "(%s)" time-zone))))
- (setq calendar-week-start-day 1) ; Monday
- (setq calendar-date-style 'iso)
- (setq calendar-date-display-form calendar-iso-date-display-form)
- (setq calendar-time-zone-style 'numeric) ; Emacs 28.1
+ (calendar-week-start-day 1) ; Monday
+ (calendar-date-style 'iso)
+ (calendar-date-display-form calendar-iso-date-display-form)
+ (calendar-time-zone-style 'numeric) ; Emacs 28.1
+ :config
(add-hook 'calendar-today-visible-hook #'calendar-mark-today)
(remove-hook 'calendar-mode-hook #'org--setup-calendar-bindings)
(let ((map calendar-mode-map))
@@ -393,38 +393,39 @@ https://yannherklotz.com"))
(define-key map (kbd "M-p") #'calendar-backward-month)))
(use-package cal-dst
- :config
- (setq calendar-standard-time-zone-name "+0000")
- (setq calendar-daylight-time-zone-name "+0100"))
+ :custom
+ (calendar-standard-time-zone-name "+0000")
+ (calendar-daylight-time-zone-name "+0100"))
(use-package diary-lib
- :config
- (setq diary-file (ymh/expand-org-file "diary"))
- (setq diary-date-forms diary-iso-date-forms)
- (setq diary-comment-start ";;")
- (setq diary-comment-end "")
- (setq diary-nonmarking-symbol "!")
- (setq diary-show-holidays-flag t)
- (setq diary-display-function #'diary-fancy-display)
- (setq diary-header-line-format nil)
- (setq diary-list-include-blanks nil)
- (setq diary-number-of-entries 2)
- (setq diary-mail-days 2)
- (setq diary-abbreviated-year-flag nil)
+ :custom
+ (diary-file (ymh/expand-org-file "diary"))
+ (diary-date-forms diary-iso-date-forms)
+ (diary-comment-start ";;")
+ (diary-comment-end "")
+ (diary-nonmarking-symbol "!")
+ (diary-show-holidays-flag t)
+ (diary-display-function #'diary-fancy-display)
+ (diary-header-line-format nil)
+ (diary-list-include-blanks nil)
+ (diary-number-of-entries 2)
+ (diary-mail-days 2)
+ (diary-abbreviated-year-flag nil)
;;(add-hook 'diary-list-entries-hook #'diary-fix-timezone t)
+ :config
(add-hook 'diary-list-entries-hook #'diary-sort-entries t)
(add-hook 'diary-list-entries-hook 'diary-include-other-diary-files)
(add-hook 'diary-mark-entries-hook 'diary-mark-included-diary-files))
(use-package appt
- :init
- (setq appt-display-diary nil)
- (setq appt-disp-window-function #'appt-disp-window)
- (setq appt-display-mode-line t)
- (setq appt-display-interval 5)
- (setq appt-audible nil)
- (setq appt-warning-time-regexp "appt \\([0-9]+\\)")
- (setq appt-message-warning-time 15)
+ :custom
+ (appt-display-diary nil)
+ (appt-disp-window-function #'appt-disp-window)
+ (appt-display-mode-line t)
+ (appt-display-interval 5)
+ (appt-audible nil)
+ (appt-warning-time-regexp "appt \\([0-9]+\\)")
+ (appt-message-warning-time 15)
:config
(run-at-time 10 nil #'appt-activate 1))
@@ -442,17 +443,17 @@ https://yannherklotz.com"))
:ensure t
:bind (("<f6>" . modus-themes-toggle))
:demand t
- :init
- (setq modus-themes-common-palette-overrides
- '((bg-mode-line-active bg-green-subtle)
- (border-mode-line-active bg-green-subtle)
- (bg-mode-line-inactive bg-green-nuanced)
- (border-mode-line-inactive bg-green-nuanced)
- (fg-region unspecified)
- (bg-region bg-green-subtle)))
- (setq modus-themes-to-toggle
- '(modus-operandi-tinted modus-vivendi-tinted))
- (setq modus-themes-italic-constructs t)
+ :custom
+ (modus-themes-common-palette-overrides
+ '((bg-mode-line-active bg-green-subtle)
+ (border-mode-line-active bg-green-subtle)
+ (bg-mode-line-inactive bg-green-nuanced)
+ (border-mode-line-inactive bg-green-nuanced)
+ (fg-region unspecified)
+ (bg-region bg-green-subtle)))
+ (modus-themes-to-toggle
+ '(modus-operandi-tinted modus-vivendi-tinted))
+ (modus-themes-italic-constructs t)
:config
(add-hook
'modus-themes-after-load-theme-hook
@@ -480,135 +481,135 @@ https://yannherklotz.com"))
(use-package magit
:ensure t
- :init
- (setq magit-diff-refine-hunk t))
+ :custom
+ (magit-diff-refine-hunk t))
(use-package org
- :init
- (setq org-adapt-indentation nil)
- (setq org-attach-auto-tag "attach")
- (setq org-confirm-babel-evaluate nil)
- (setq org-cycle-separator-lines 2)
- (setq org-export-with-broken-links t)
- (setq org-fast-tag-selection-single-key 'expert)
- (setq org-hide-emphasis-markers nil)
-
- (setq org-html-container-element "section")
- (setq org-html-doctype "html5")
- (setq org-html-head-include-default-style nil)
- (setq org-html-head-include-scripts nil)
- (setq org-html-html5-fancy t)
- (setq org-html-postamble t)
- (setq org-html-postamble-format '(("en" "")))
-
- (setq org-icalendar-include-bbdb-anniversaries t)
- (setq org-icalendar-include-todo t)
-
- (setq org-log-done 'time)
- (setq org-log-into-drawer t)
-
- (setq org-return-follows-link t)
- (setq org-reverse-note-order t)
- (setq org-src-window-setup 'current-window)
-
- (setq org-startup-folded 'content)
- (setq org-startup-indented nil)
-
- (setq org-use-speed-commands t)
- (setq org-html-divs '((preamble "header" "header")
- (content "article" "content")
- (postamble "footer" "postamble")))
-
- (setq org-structure-template-alist '(("a" . "export ascii")
- ("c" . "center")
- ("C" . "comment")
- ("e" . "example")
- ("E" . "export")
- ("h" . "export html")
- ("l" . "export latex")
- ("q" . "quote")
- ("s" . "src")
- ("v" . "verse")
- ("el" . "src emacs-lisp")
- ("d" . "definition")
- ("t" . "theorem")))
-
- (setq org-refile-targets `((,(ymh/expand-org-file "main.org") :level . 1)
- (,(ymh/expand-org-file "someday.org") :level . 1)
- (,(ymh/expand-org-file "projects.org")
- :maxlevel . 2)
- (,(ymh/expand-org-file
- (format-time-string "%Y-%m.org"))
- :level . 1)))
-
- (setq org-todo-keywords
- '((sequence
- "TODO(t)"
- "PROJ(p)"
- "STRT(s)"
- "WAIT(w)"
- "HOLD(h)"
- "DELG(l)"
- "SMDY(m)"
- "|"
- "DONE(d!)"
- "KILL(k)")
- (sequence
- "[ ](T)"
- "[-](S)"
- "[?](W)"
- "|"
- "[X](D)")))
-
- (setq org-todo-keyword-faces '(("[-]" . "yellow")
- ("STRT" . (:background "aquamarine"))
- ("[?]" . (:weight bold))
- ("WAIT" . "yellow")
- ("HOLD" . "yellow")
- ("DELG" . "goldenrod")
- ("SMDY" . "cadet blue")
- ("PROJ" . (:background "sea green" :weight bold))
- ("NO" . (:background "dark salmon"))
- ("KILL" . "pale green")))
-
- (setq org-export-allow-bind-keywords t)
-
- (setq org-cite-global-bibliography
- (list (ymh/expand-bib-file "references.bib")))
+ :custom
+ (org-adapt-indentation nil)
+ (org-attach-auto-tag "attach")
+ (org-confirm-babel-evaluate nil)
+ (org-cycle-separator-lines 2)
+ (org-export-with-broken-links t)
+ (org-fast-tag-selection-single-key 'expert)
+ (org-hide-emphasis-markers nil)
+
+ (org-html-container-element "section")
+ (org-html-doctype "html5")
+ (org-html-head-include-default-style nil)
+ (org-html-head-include-scripts nil)
+ (org-html-html5-fancy t)
+ (org-html-postamble t)
+ (org-html-postamble-format '(("en" "")))
+
+ (org-icalendar-include-bbdb-anniversaries t)
+ (org-icalendar-include-todo t)
+
+ (org-log-done 'time)
+ (org-log-into-drawer t)
+
+ (org-return-follows-link t)
+ (org-reverse-note-order t)
+ (org-src-window-setup 'current-window)
+
+ (org-startup-folded 'content)
+ (org-startup-indented nil)
+
+ (org-use-speed-commands t)
+ (org-html-divs '((preamble "header" "header")
+ (content "article" "content")
+ (postamble "footer" "postamble")))
+
+ (org-structure-template-alist '(("a" . "export ascii")
+ ("c" . "center")
+ ("C" . "comment")
+ ("e" . "example")
+ ("E" . "export")
+ ("h" . "export html")
+ ("l" . "export latex")
+ ("q" . "quote")
+ ("s" . "src")
+ ("v" . "verse")
+ ("el" . "src emacs-lisp")
+ ("d" . "definition")
+ ("t" . "theorem")))
+
+ (org-refile-targets `((,(ymh/expand-org-file "main.org") :level . 1)
+ (,(ymh/expand-org-file "someday.org") :level . 1)
+ (,(ymh/expand-org-file "projects.org")
+ :maxlevel . 2)
+ (,(ymh/expand-org-file
+ (format-time-string "%Y-%m.org"))
+ :level . 1)))
+
+ (org-todo-keywords
+ '((sequence
+ "TODO(t)"
+ "PROJ(p)"
+ "STRT(s)"
+ "WAIT(w)"
+ "HOLD(h)"
+ "DELG(l)"
+ "SMDY(m)"
+ "|"
+ "DONE(d!)"
+ "KILL(k)")
+ (sequence
+ "[ ](T)"
+ "[-](S)"
+ "[?](W)"
+ "|"
+ "[X](D)")))
+
+ (org-todo-keyword-faces '(("[-]" . "yellow")
+ ("STRT" . (:background "aquamarine"))
+ ("[?]" . (:weight bold))
+ ("WAIT" . "yellow")
+ ("HOLD" . "yellow")
+ ("DELG" . "goldenrod")
+ ("SMDY" . "cadet blue")
+ ("PROJ" . (:background "sea green" :weight bold))
+ ("NO" . (:background "dark salmon"))
+ ("KILL" . "pale green")))
+
+ (org-export-allow-bind-keywords t)
+
+ (org-cite-global-bibliography
+ (list (ymh/expand-bib-file "references.bib")))
:config
(unbind-key "C-," org-mode-map))
(use-package org-agenda
:bind ("C-c a" . org-agenda)
- :init
- (setq org-agenda-files (cons (ymh/expand-bib-file "reading_list.org")
- (mapcar #'ymh/expand-org-file
- (list "inbox.org"
- "main.org"
- "tickler.org"
- "projects.org"
- (format-time-string "%Y-%m.org")))))
- (setq org-agenda-custom-commands
- '(("w" "At work" tags-todo "@work"
- ((org-agenda-overriding-header "Work")))
- ("h" "At home" tags-todo "@home"
- ((org-agenda-overriding-header "Home")))
- ("u" "At uni" tags-todo "@uni"
- ((org-agenda-overriding-header "University")))))
-
- (setq org-agenda-include-diary t)
- (setq org-agenda-show-all-dates t))
- (setq org-agenda-skip-deadline-if-done t)
- (setq org-agenda-skip-scheduled-if-done t)
- (setq org-agenda-span 'week)
- (setq org-agenda-start-day ".")
- (setq org-agenda-start-on-weekday nil)
- (setq org-agenda-tag-filter '("-backed"))
+ :custom
+ (org-agenda-files (cons (ymh/expand-bib-file "reading_list.org")
+ (mapcar #'ymh/expand-org-file
+ (list "inbox.org"
+ "main.org"
+ "tickler.org"
+ "projects.org"
+ (format-time-string "%Y-%m.org")))))
+ (org-agenda-custom-commands
+ '(("w" "At work" tags-todo "@work"
+ ((org-agenda-overriding-header "Work")))
+ ("h" "At home" tags-todo "@home"
+ ((org-agenda-overriding-header "Home")))
+ ("u" "At uni" tags-todo "@uni"
+ ((org-agenda-overriding-header "University")))))
+
+ (org-agenda-include-diary t)
+ (org-agenda-show-all-dates t)
+ (org-agenda-skip-deadline-if-done t)
+ (org-agenda-skip-scheduled-if-done t)
+ (org-agenda-span 'week)
+ (org-agenda-start-day ".")
+ (org-agenda-start-on-weekday nil)
+ (org-agenda-tag-filter '("-backed")))
(use-package org-capture
:bind ("C-c c" . org-capture)
- :init
- (setq org-capture-templates
+ :custom
+ (org-capture-templates
`(("t" "Todo" entry (file ,(ymh/expand-org-file "inbox.org"))
"* TODO %?
:PROPERTIES:
@@ -638,16 +639,17 @@ https://yannherklotz.com"))
(use-package org-crypt
:after org
+ :custom
+ (org-tags-exclude-from-inheritance '("crypt"))
+ (org-crypt-key "8CEF4104683551E8")
:config
- (org-crypt-use-before-save-magic)
- (setq org-tags-exclude-from-inheritance '("crypt"))
- (setq org-crypt-key "8CEF4104683551E8"))
+ (org-crypt-use-before-save-magic))
(use-package org-id
:after org
- :config
- (setq org-id-link-to-org-use-id 'use-existing)
- (setq org-id-track-globally t))
+ :custom
+ (org-id-link-to-org-use-id 'use-existing)
+ (org-id-track-globally t))
(use-package org-transclusion
:ensure t
@@ -658,8 +660,8 @@ https://yannherklotz.com"))
("C-c t R" . org-transclusion-remove-all)
("C-c t <tab>" . org-transclusion-refresh)
("C-c t m" . org-transclusion-mode))
- :config
- (setq org-transclusion-exclude-elements nil))
+ :custom
+ (org-transclusion-exclude-elements nil))
(use-package org-zettelkasten
:after org
@@ -670,7 +672,8 @@ https://yannherklotz.com"))
'(org-zettelkasten
. (:url "https://git.sr.ht/~ymherklotz/org-zettelkasten")))
(package-install 'org-zettelkasten)))
- (setq org-zettelkasten-directory "~/Dropbox/zk")
+ :custom
+ (org-zettelkasten-directory "~/Dropbox/zk")
:config
(org-zettelkasten-setup))
@@ -688,10 +691,10 @@ https://yannherklotz.com"))
(use-package boogie-friends
:ensure t
- :init
+ :custom
;; (setq flycheck-inferior-dafny-executable "/Users/ymh/.local/dafny-4.0/DafnyServer")
- (setq dafny-verification-backend nil)
- (setq boogie-friends-symbols-alist nil)
+ (dafny-verification-backend nil)
+ (boogie-friends-symbols-alist nil)
:config
(add-hook 'dafny-mode-hook
(lambda () (prettify-symbols-mode -1)))
@@ -703,22 +706,23 @@ https://yannherklotz.com"))
(use-package direnv
:if (executable-find "direnv")
:ensure t
- :config
- (direnv-mode))
+ :init
+ (direnv-mode 1))
(use-package orderless
:ensure t
- :init
- (setq completion-styles '(substring orderless basic)))
+ :custom
+ (completion-styles '(substring orderless basic)))
(use-package vertico
:ensure t
+ :custom
+ (read-file-name-completion-ignore-case t)
+ (read-buffer-completion-ignore-case t)
+ (completion-ignore-case t)
+ (completion-category-defaults nil)
:init
- (setq read-file-name-completion-ignore-case t)
- (setq read-buffer-completion-ignore-case t)
- (setq completion-ignore-case t)
- (setq completion-category-defaults nil)
- (vertico-mode))
+ (vertico-mode 1))
(use-package corfu
:ensure t
@@ -743,10 +747,10 @@ https://yannherklotz.com"))
(use-package sendmail
:ensure t
- :init
- (setq mail-specify-envelope-from t)
- (setq message-sendmail-envelope-from 'header)
- (setq mail-envelope-from 'header)
+ :custom
+ (mail-specify-envelope-from t)
+ (message-sendmail-envelope-from 'header)
+ (mail-envelope-from 'header)
:config
(if ymh/macos-p
(setq sendmail-program "/usr/local/bin/msmtp")
@@ -783,7 +787,6 @@ https://yannherklotz.com"))
(notmuch-show-tag (list "+deleted" "-unread") beg end)
(notmuch-show-next-thread))))
- (setq notmuch-archive-tags '("-inbox" "-unread" "+archive"))
(setq-default notmuch-search-oldest-first nil)
(define-key notmuch-show-mode-map (kbd "d") #'ymh/notmuch-show-delete-mail)
@@ -794,6 +797,7 @@ https://yannherklotz.com"))
(defun ymh/and-search (&rest rest)
(apply #'concat (-interpose " and " rest)))
+ (setq notmuch-archive-tags '("-inbox" "-unread" "+archive"))
(setq notmuch-saved-searches
`((:name "inbox" :key "n"
:query ,(ymh/and-search "date:last_month..this_month"
@@ -851,15 +855,15 @@ https://yannherklotz.com"))
:ensure t
:bind (("C-c y b" . ebib)
("C-c [" . ebib-insert-citation))
- :init
- (defun ymh/ebib-create-identifier (key _) key)
- (setq ebib-preload-bib-files (list (ymh/expand-bib-file "references.bib")))
- (setq ebib-notes-default-file (ymh/expand-bib-file "notes.org"))
- (setq ebib-notes-template "* %T\n:PROPERTIES:\n%K\n:NOTER_DOCUMENT: papers/%k.pdf\n:END:\n%%?\n")
- (setq ebib-keywords (ymh/expand-bib-file "keywords.txt"))
- (setq ebib-reading-list-file (ymh/expand-bib-file "reading_list.org"))
- (setq ebib-notes-storage 'multiple-notes-per-file)
+ :custom
+ (ebib-preload-bib-files (list (ymh/expand-bib-file "references.bib")))
+ (ebib-notes-default-file (ymh/expand-bib-file "notes.org"))
+ (ebib-notes-template "* %T\n:PROPERTIES:\n%K\n:NOTER_DOCUMENT: papers/%k.pdf\n:END:\n%%?\n")
+ (ebib-keywords (ymh/expand-bib-file "keywords.txt"))
+ (ebib-reading-list-file (ymh/expand-bib-file "reading_list.org"))
+ (ebib-notes-storage 'multiple-notes-per-file)
:config
+ (defun ymh/ebib-create-identifier (key _) key)
(add-to-list 'ebib-notes-template-specifiers '(?k . ymh/ebib-create-identifier))
(add-to-list 'ebib-file-search-dirs (ymh/expand-bib-file "papers"))
(if ymh/macos-p
@@ -905,8 +909,8 @@ https://yannherklotz.com"))
(use-package geiser-chicken
:ensure t
- :config
- (setq geiser-chicken-binary "chicken-csi"))
+ :custom
+ (geiser-chicken-binary "chicken-csi"))
(use-package haskell-mode
:ensure t)
@@ -917,36 +921,35 @@ https://yannherklotz.com"))
(use-package proof-general
:ensure t
:mode ("\\.v\\'" . coq-mode)
- :init
- (setq proof-splash-enable nil)
- (setq proof-auto-action-when-deactivating-scripting 'retract)
- (setq proof-delete-empty-windows nil)
- (setq proof-multiple-frames-enable nil)
- (setq proof-three-window-enable nil)
- (setq proof-auto-raise-buffers nil)
- (setq coq-compile-before-require nil)
- (setq coq-compile-vos t)
- (setq coq-compile-parallel-in-background t)
- (setq coq-compile-keep-going nil)
- (setq coq-compile-quick 'no-quick)
- (setq coq-max-background-compilation-jobs 4)
- (setq coq-indent-modulestart 0)
+ :custom
+ (proof-splash-enable nil)
+ (proof-auto-action-when-deactivating-scripting 'retract)
+ (proof-delete-empty-windows nil)
+ (proof-multiple-frames-enable nil)
+ (proof-three-window-enable nil)
+ (proof-auto-raise-buffers nil)
+ (coq-compile-before-require nil)
+ (coq-compile-vos t)
+ (coq-compile-parallel-in-background t)
+ (coq-compile-keep-going nil)
+ (coq-compile-quick 'no-quick)
+ (coq-max-background-compilation-jobs 4)
+ (coq-indent-modulestart 0)
:config
(defun ymh--reset-coq-indentation ()
"Reset slow indentation."
(setq-local indent-line-function #'indent-relative))
(add-hook 'coq-mode-hook #'ymh--reset-coq-indentation t)
- ;;(define-key coq-mode-map (kbd "C-c TAB") #'smie-indent-line)
- )
+ (define-key coq-mode-map (kbd "C-c TAB") #'smie-indent-line))
(use-package alectryon
:ensure t
- :hook coq-mode
+ :hook (coq-mode . alectryon-mode)
:delight alectryon-mode
:config
(when ymh/macos-p
- (setq alectryon-executable "/nix/store/bvlk3hyrjdgl0sg93rrdr2z71hgza0m9-python3.9-alectryon-1.4.0/bin/alectryon"))
+ (setq alectryon-executable "/nix/store/5a2x3kggn3pdmh468fxdnjkp6dxn3icf-python3.10-alectryon-1.4.0/bin/alectryon"))
(defun ymh/alectryon-preview ()
"Display an HTML preview of the current buffer."
(interactive)
@@ -963,16 +966,17 @@ https://yannherklotz.com"))
:mode (("\\.mkiv\\'" . context-mode)
("\\.mkii\\'" . context-mode)
("\\.mkxl\\'" . context-mode))
+ :custom
+ (TeX-auto-save t)
+ (TeX-parse-self t)
+ (TeX-view-program-selection '((output-pdf "PDF Tools")))
+ (TeX-source-correlate-start-server t)
+ (TeX-source-correlate-mode t)
+ (TeX-source-correlate-method 'synctex)
+ (reftex-plug-into-AUCTeX t)
:init
- (setq TeX-auto-save t)
- (setq TeX-parse-self t)
(setq-default TeX-master nil)
- (setq TeX-view-program-selection '((output-pdf "PDF Tools")))
- (setq TeX-source-correlate-start-server t)
(setq-default TeX-command-extra-options "-shell-escape")
- (setq TeX-source-correlate-mode t)
- (setq TeX-source-correlate-method 'synctex)
- (setq reftex-plug-into-AUCTeX t)
:config
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
@@ -1002,9 +1006,9 @@ https://yannherklotz.com"))
(use-package hungry-delete
:ensure t
+ :custom
+ (hungry-delete-join-reluctantly t)
:init
- (setq hungry-delete-join-reluctantly t)
- :config
(global-hungry-delete-mode))
(use-package scala-mode
@@ -1058,7 +1062,7 @@ https://yannherklotz.com"))
'(haskell-mode . ("haskell-language-server-wrapper" "--lsp")))))
(use-package elec-pair
- :config
+ :init
(electric-pair-mode 1))
(use-package markdown-mode
@@ -1117,8 +1121,8 @@ https://yannherklotz.com"))
(use-package darkroom
:ensure t
:hook (text-mode . darkroom-tentative-mode)
- :init
- (setq darkroom-text-scale-increase 1))
+ :custom
+ (darkroom-text-scale-increase 1))
(use-package org-ql
:ensure t)
@@ -1141,20 +1145,20 @@ https://yannherklotz.com"))
(use-package circe
:ensure t
- :init
- (setq circe-network-options
- `(("Sourcehut Chat"
- :host "chat.sr.ht"
- :port 6697
- :use-tls t
- :user "ymherklotz/irc.libera.chat"
- :nick "ymherklotz"
- :sasl-username "ymherklotz"
- :sasl-password ,(ymh/pass "sr.ht/chat.sr.ht")
- )))
- (setq circe-color-nicks-everywhere t)
- (setq circe-reduce-lurker-spam t)
- (setq circe-active-users-timeout 300)
+ :custom
+ (circe-network-options
+ `(("Sourcehut Chat"
+ :host "chat.sr.ht"
+ :port 6697
+ :use-tls t
+ :user "ymherklotz/irc.libera.chat"
+ :nick "ymherklotz"
+ :sasl-username "ymherklotz"
+ :sasl-password ,(ymh/pass "sr.ht/chat.sr.ht")
+ )))
+ (circe-color-nicks-everywhere t)
+ (circe-reduce-lurker-spam t)
+ (circe-active-users-timeout 300)
:config
(enable-circe-color-nicks))
@@ -1171,21 +1175,65 @@ https://yannherklotz.com"))
:config
(server-start))
-(use-package nnhackernews
- :ensure t)
-
(use-package nix-mode
:ensure t)
(use-package merlin
:ensure t
:hook (tuareg-mode . merlin-mode)
- :init
- (setq merlin-command "ocamlmerlin"))
+ :custom
+ (merlin-command "ocamlmerlin"))
(use-package citeproc
:ensure t)
+(use-package org-super-agenda
+ :ensure t
+ :custom
+ (org-super-agenda-groups
+ '(;; Each group has an implicit boolean OR operator between its selectors.
+ (:name "Today" ; Optionally specify section name
+ :time-grid t ; Items that appear on the time grid
+ :todo "TODAY") ; Items that have this TODO keyword
+ (:name "Important"
+ ;; Single arguments given alone
+ :tag "bills"
+ :priority "A")
+ ;; Set order of multiple groups at once
+ (:order-multi (2 (:name "Shopping in town"
+ ;; Boolean AND group matches items that match all subgroups
+ :and (:tag "shopping" :tag "@town"))
+ (:name "Food-related"
+ ;; Multiple args given in list with implicit OR
+ :tag ("food" "dinner"))
+ (:name "Personal"
+ :habit t
+ :tag "personal")
+ (:name "Space-related (non-moon-or-planet-related)"
+ ;; Regexps match case-insensitively on the entire entry
+ :and (:regexp ("space" "NASA")
+ ;; Boolean NOT also has implicit OR between selectors
+ :not (:regexp "moon" :tag "planet")))))
+ ;; Groups supply their own section names when none are given
+ (:todo "WAITING" :order 8) ; Set order of this section
+ (:todo ("SOMEDAY" "TO-READ" "CHECK" "TO-WATCH" "WATCHING")
+ ;; Show this group at the end of the agenda (since it has the
+ ;; highest number). If you specified this group last, items
+ ;; with these todo keywords that e.g. have priority A would be
+ ;; displayed in that group instead, because items are grouped
+ ;; out in the order the groups are listed.
+ :order 9)
+ (:priority<= "B"
+ ;; Show this section after "Today" and "Important", because
+ ;; their order is unspecified, defaulting to 0. Sections
+ ;; are displayed lowest-number-first.
+ :order 1)
+ ;; After the last group, the agenda will display items that didn't
+ ;; match any of these groups, with the default order position of 99
+ ))
+ :init
+ (org-super-agenda-mode 1))
+
(setq gc-cons-threshold (* 1024 1024 10))
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))