From 01d78d2d5e16fca2dbd4cc160120bdbe6bba7771 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Wed, 8 Sep 2021 13:05:55 +0100 Subject: Adding more changes to emacs --- doom/.DS_Store | Bin 0 -> 6148 bytes doom/config.el | 97 +++++++++++++++++++++++----------------------------- doom/custom.el | 50 +++++++++++++++++++++++++++ doom/init.el | 6 ++-- doom/packages.el | 7 ++-- doom/references.org | 30 ++++++++++++++++ doom/signel.org | 0 7 files changed, 131 insertions(+), 59 deletions(-) create mode 100644 doom/.DS_Store create mode 100644 doom/custom.el create mode 100644 doom/references.org create mode 100644 doom/signel.org (limited to 'doom') diff --git a/doom/.DS_Store b/doom/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/doom/.DS_Store differ diff --git a/doom/config.el b/doom/config.el index 6dbe26b..18b6d6c 100644 --- a/doom/config.el +++ b/doom/config.el @@ -45,7 +45,7 @@ (global-set-key (kbd "C-c z") #'quick-calc) (global-set-key (kbd "") #'revert-buffer) (global-set-key (kbd "C-.") #'other-window) -(global-set-key (kbd "C-,") #'(lambda () (interactive) (other-window -1))) +(global-set-key (kbd "C-,") (lambda () (interactive) (other-window -1))) (global-set-key (kbd "C-c l") #'org-store-link) (global-set-key (kbd "C-c a") #'org-agenda) (global-set-key (kbd "C-c /") #'avy-goto-word-1) @@ -87,10 +87,13 @@ (define-prefix-command 'y-map) (global-set-key (kbd "C-c y") 'y-map) -(define-key y-map (kbd "p") 'password-store-copy) -(define-key y-map (kbd "i") 'password-store-insert) -(define-key y-map (kbd "g") 'password-store-generate) -(define-key y-map (kbd "r") 'toggle-rot13-mode) +(define-key y-map (kbd "p") #'password-store-copy) +(define-key y-map (kbd "i") #'password-store-insert) +(define-key y-map (kbd "g") #'password-store-generate) +(define-key y-map (kbd "r") #'toggle-rot13-mode) +(define-key y-map (kbd "c") #'calendar) +(define-key y-map (kbd "C-r") #'ymhg/reload-keywords) +(define-key y-map (kbd "d") #'y/insert-date) (electric-indent-mode -1) @@ -107,8 +110,6 @@ (interactive) (insert (format-time-string "%c" (current-time)))) -(define-key y-map (kbd "d") 'y/insert-date) - ;; Set backup directories into the tmp folder (defvar --backup-directory (concat user-emacs-directory "backups")) (if (not (file-exists-p --backup-directory)) @@ -148,7 +149,7 @@ (funcall original) (auto-save-mode -1))) - (advice-add 'tramp-set-auto-save :around #'tramp-set-auto-save--check) + (advice-add #'tramp-set-auto-save :around #'tramp-set-auto-save--check) ;; Use my ~/.ssh/config control master settings according to https://puppet.com/blog/speed-up-ssh-by-reusing-connections (setq tramp-ssh-controlmaster-options ""))) @@ -362,6 +363,8 @@ (setq diary-mail-days 2) (setq diary-abbreviated-year-flag nil) + (add-hook 'diary-sort-entries #'diary-list-entries-hook) + (add-hook 'calendar-today-visible-hook #'calendar-mark-today) (add-hook 'diary-list-entries-hook 'diary-sort-entries t) @@ -459,7 +462,7 @@ (use-package! org-superstar :hook (org-mode . org-superstar-mode) :config - (setq org-superstar-headline-bullets-list '("♚" "♛" "♜" "♝" "♞" "♟" "♔" "♕" "♖" "♗" "♘" "♙") + (setq org-superstar-headline-bullets-list '("♚" "♛" "♜" "♝" "♞" "♔" "♕" "♖" "♗" "♘" "♙") org-superstar-special-todo-items t)) (use-package! org-id @@ -488,16 +491,17 @@ (setq ebib-preload-bib-files '("~/Dropbox/bibliography/references.bib") ebib-notes-directory "~/Dropbox/bibliography/notes/" ebib-notes-template "#+TITLE: Notes on: %T\n\n>|<" - ebib-keywords-file "~/Dropbox/bibliography/keywords.txt" - ebib-reading-list-file "~/Dropbox/bibliography/reading_list.org") + ebib-keywords (expand-file-name "~/Dropbox/bibliography/keywords.txt") + ebib-reading-list-file "~/Dropbox/bibliography/reading_list.org" + ebib-notes-storage 'multiple-notes-per-file) :config (add-to-list 'ebib-file-search-dirs "~/Dropbox/bibliography/papers") (add-to-list 'ebib-file-associations '("pdf" . "open")) (add-to-list 'ebib-citation-commands '(org-mode (("ref" "cite:%(%K%,)")))) (advice-add 'bibtex-generate-autokey :around - #'(lambda (orig-func &rest args) - (replace-regexp-in-string ":" "" (apply orig-func args)))) + (lambda (orig-func &rest args) + (replace-regexp-in-string ":" "" (apply orig-func args)))) (remove-hook 'ebib-notes-new-note-hook #'org-narrow-to-subtree)) ;; Set up dictionaries @@ -739,6 +743,8 @@ :custom (alert-default-style 'osx-notifier)) +(use-package ledger-mode) + ;; Bug fixes ;; Projectile compilation buffer not there anymore for some reason @@ -757,10 +763,13 @@ ;; smtpmail-smtp-service 587 ;; 25 is default -- uncomment and edit if needed ;; smtpmail-stream-type 'starttls) +(require 'smtpmail) + (setq user-mail-address "ymh15@ic.ac.uk" smtpmail-smtp-server "smtp.office365.com" smtpmail-smtp-service 587 - smtpmail-stream-type 'starttls) + smtpmail-stream-type 'starttls + message-send-mail-function 'message-smtpmail-send-it) (setq message-signature "Yann Herklotz Imperial College London @@ -770,48 +779,28 @@ https://yannherklotz.com") (setq auth-sources '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")) +(use-package! modus-operandi-theme + :config + (custom-theme-set-faces! 'modus-operandi + '(proof-locked-face ((t (:extend t :background "gray90")))))) + +(use-package! modus-vivendi-theme + :config + (custom-theme-set-faces! 'modus-vivendi + '(proof-locked-face ((t (:extend t :background "gray20")))))) + +(use-package! notmuch + :config + (setq notmuch-saved-searches + '((:name "inbox" :query "tag:inbox not tag:trash" :key "n") + (:name "flagged" :query "tag:flagged" :key "f") + (:name "sent" :query "tag:sent" :key "s") + (:name "drafts" :query "tag:draft" :key "d") + (:name "mailbox" :query "tag:mailbox not tag:trash" :key "m") + (:name "imperial" :query "tag:imperial not tag:trash" :key "i")))) + ;;(use-package! ox-ssh ;; :after org ;; :config ;; (when (eq system-type 'darwin) ;; (setq org-ssh-header "XAuthLocation /opt/X11/bin/xauth"))) - -;; Here are some additional functions/macros that could help you configure Doom: -;; -;; - `load!' for loading external *.el files relative to this one -;; - `use-package' for configuring packages -;; - `after!' for running code after a package has loaded -;; - `add-load-path!' for adding directories to the `load-path', relative to -;; this file. Emacs searches the `load-path' when you load packages with -;; `require' or `use-package'. -;; - `map!' for binding new keys -;; -;; To get information about any of these functions/macros, move the cursor over -;; the highlighted symbol at press 'K' (non-evil users must press 'C-c g k'). -;; This will open documentation for it, including demos of how they are used. -;; -;; You can also try 'gd' (or 'C-c g d') to jump to their definition and see how -;; they are implemented. -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(org-blank-before-new-entry (quote ((heading) (plain-list-item)))) - '(package-selected-packages (quote (org-plus-contrib))) - '(safe-local-variable-values - (quote - ((eval add-to-list - (quote auto-mode-alist) - (quote - ("\\.v\\'" . verilog-mode))) - (eval setq org-ref-pdf-directory - (concat - (projectile-project-root) - "papers/")))))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) diff --git a/doom/custom.el b/doom/custom.el new file mode 100644 index 0000000..71864a9 --- /dev/null +++ b/doom/custom.el @@ -0,0 +1,50 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(beacon-color "#ff9da4") + '(fci-rule-color "#B8A2CE") + '(flycheck-color-mode-line-face-to-color 'mode-line-buffer-id) + '(frame-background-mode 'dark) + '(jdee-db-active-breakpoint-face-colors (cons "#464258" "#C5A3FF")) + '(jdee-db-requested-breakpoint-face-colors (cons "#464258" "#C2FFDF")) + '(jdee-db-spec-breakpoint-face-colors (cons "#464258" "#656565")) + '(ledger-reports + '(("equity" "ledger equit") + ("bal" "%(binary) -f %(ledger-file) bal") + ("reg" "%(binary) -f %(ledger-file) reg") + ("payee" "%(binary) -f %(ledger-file) reg @%(payee)") + ("account" "%(binary) -f %(ledger-file) reg %(account)"))) + '(notmuch-saved-searches + '((:name "inbox" :query "tag:inbox not tag:trash" :key "i") + (:name "flagged" :query "tag:flagged" :key "f") + (:name "sent" :query "tag:sent" :key "s") + (:name "drafts" :query "tag:draft" :key "d") + (:name "imperial" :query "tag:imperial") + (:name "mailbox" :query "tag:mailbox"))) + '(objed-cursor-color "#CC6666") + '(org-agenda-files + '("~/Dropbox/zk/computing.org" "/Users/yannherklotz/Dropbox/org/inbox.org" "/Users/yannherklotz/Dropbox/org/main.org" "/Users/yannherklotz/Dropbox/org/tickler.org" "/Users/yannherklotz/Dropbox/org/projects.org" "/Users/yannherklotz/Dropbox/bibliography/reading_list.org")) + '(org-blank-before-new-entry '((heading) (plain-list-item))) + '(package-selected-packages '(zettelkasten org-zettelkasten org-plus-contrib)) + '(pdf-view-midnight-colors (cons "#F8F8F0" "#5a5475")) + '(rustic-ansi-faces + ["#5a5475" "#CC6666" "#C2FFDF" "#FFEA00" "#55b3cc" "#FFB8D1" "#96CBFE" "#F8F8F0"]) + '(safe-local-variable-values + '((TeX-command-extra-options . "-shell-escape") + (eval add-to-list 'auto-mode-alist + '("\\.v\\'" . verilog-mode)) + (eval setq org-ref-pdf-directory + (concat + (projectile-project-root) + "papers/")))) + '(window-divider-mode nil) + '(znc-servers nil)) +(put 'narrow-to-region 'disabled nil) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/doom/init.el b/doom/init.el index 4e8cff9..dbf03cf 100644 --- a/doom/init.el +++ b/doom/init.el @@ -45,7 +45,7 @@ ;;vc-gutter ; vcs diff in the fringe ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB ;;window-select ; visually switch windows - ;;workspaces ; tab emulation, persistence & separate workspaces + workspaces ; tab emulation, persistence & separate workspaces zen ; distraction-free coding or writing :editor @@ -129,8 +129,8 @@ latex ; writing papers in Emacs has never been so fun ;;lean ;;factor - ;;ledger ; an accounting system in Emacs - ;;lua ; one-based indices? one-based indices + ledger ; an accounting system in Emacs + lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c nix ; I hereby declare "nix geht mehr!" diff --git a/doom/packages.el b/doom/packages.el index b59fd0a..8bf72b3 100644 --- a/doom/packages.el +++ b/doom/packages.el @@ -88,7 +88,10 @@ :recipe (:host github :repo "ymherklotz/emacs-zettelkasten")) (package! pinentry) +(package! package-lint) + ;; Themes (package! color-theme-sanityinc-tomorrow) -(package! modus-operandi-theme) -(package! modus-vivendi-theme) +(package! modus-themes) +;;(package! modus-operandi-theme) +;;(package! modus-vivendi-theme) diff --git a/doom/references.org b/doom/references.org new file mode 100644 index 0000000..b83b177 --- /dev/null +++ b/doom/references.org @@ -0,0 +1,30 @@ +#+title: Reference Management + +* Set up databases + +#+begin_src emacs-lisp +(defvar ymhg/bib-db nil + "A string containing the location of my bibtex database.") + +(defvar ymhg/pdf-dir nil + "The path to the directory containing the PDF files. The file + for the entry with key is stored as .pdf.") + +(defvar ymhg/notes-dir nil + "The path to the directory containing my notes for the + references. The note for the item with key is stored in + this folder as .org") + +(defvar ymhg/pdf-download-dir nil + "The path to the temporary directory to which we download PDF + files.") +#+end_src + +#+begin_src emacs-lisp +(setq ymhg/bib-db (expand-file-name "~/Dropbox/bibliography/references.bib") + ymhg/pdf-dir (expand-file-name "~/Dropbox/bibliography/papers/") + ymhg/notes-dir (expand-file-name "~/Dropbox/bibliography/notes/") + ymhg/pdf-download-dir (expand-file-name "~/Downloads/")) +#+end_src + +* Configure Ebib diff --git a/doom/signel.org b/doom/signel.org new file mode 100644 index 0000000..e69de29 -- cgit