diff --git a/config.el b/config.el index 20ebb5d..9167a7a 100644 --- a/config.el +++ b/config.el @@ -235,12 +235,6 @@ :map indium-interaction-mode-map "I" #'indium-launch)) -;; (use-package! ox-mm -;; :after org) - - - ;; khalel-import-time-delta "30d" - (after! info (map! :map Info-mode-map :n "g n" #'Info-goto-node)) @@ -318,22 +312,69 @@ (setq +org-roam-open-buffer-on-find-file nil) (after! org-roam + (setq org-roam-capture-templates + '(("d" "default" plain + "%?" + :target + (file+head + "${slug}.org" + "#+title: ${note-title}\n") + :unnarrowed t) + ("n" "literature note" plain + "%?" + :target + (file+head + "%(concat + (when citar-org-roam-subdir (concat citar-org-roam-subdir \"/\")) \"${citekey}.org\")" + "#+title: ${title}\n") + :unnarrowed t))) (setq org-roam-dailies-capture-templates '(("d" "default" entry - "* %?" - :target (file+head "%<%Y-%m-%d>.org" - "#+title: %<%Y-%m-%d>\n")))) - ;; ("j" "journal" entry - ;; #'org-roam-capture--get-point - ;; "* %?" - ;; :file-name "daily/%<%Y-%m-%d>" - ;; :head "#+title: %<%Y-%m-%d>\n" - ;; :olp ("Journal")))) + "* %?" + :target (file+head "%<%Y-%m-%d>.org" + "#+title: %<%Y-%m-%d>\n")))) + ;; ("j" "journal" entry + ;; #'org-roam-capture--get-point + ;; "* %?" + ;; :file-name "daily/%<%Y-%m-%d>" + ;; :head "#+title: %<%Y-%m-%d>\n" + ;; :olp ("Journal")))) (map! :leader :desc "Capture today" "n n" #'org-roam-dailies-capture-today) (setq org-roam-directory (concat org-directory "roam/") org-roam-completion-everywhere nil)) +(after! citar + ;; (setq citar-file-parser-functions + ;; '(citar-file--parser-default + ;; citar-file--parser-triplet)) + (setq citar-org-roam-capture-template-key "n") + (setq! citar-library-paths '("~/Zotero" "~/Nextcloud/Calibre") + citar-notes-paths `(,(expand-file-name "reference" org-roam-directory)) + citar-bibliography `(,(expand-file-name "library.bib" org-roam-directory) + ,(expand-file-name "books.bib" org-roam-directory)))) + +(after! citar-org-roam + ;; (citar-register-notes-source + ;; 'orb-citar-source (list :name "Org-Roam Notes" + ;; :category 'org-roam-node + ;; :items #'citar-org-roam--get-candidates + ;; :hasitems #'citar-org-roam-has-notes + ;; :open #'citar-org-roam-open-note + ;; :create #'orb-citar-edit-note + ;; :annotate #'citar-org-roam--annotate)) + ;; (setq citar-notes-source 'orb-citar-source) + (setq citar-org-roam-subdir "reference")) + +(use-package! org-transclusion + :after org + :init + (map! + :map global-map "" #'org-transclusion-add + :leader + :prefix "n" + :desc "Org Transclusion Mode" "t" #'org-transclusion-mode)) + (after! org-noter ;; (map! :map pdf-view-mode-map "i" nil) ;; (map! :map pdf-view-mode-map :gn "i" #'org-noter-insert-note) @@ -363,18 +404,6 @@ 'ivy-bibtex '(("x" max/ivy-bibtex-org-capture "Capture PDF to read")))) -(after! citar - (setq! citar-library-paths '("~/Nextcloud/Papers/") - citar-notes-paths `(,org-roam-directory) - citar-bibliography '("~/Nextcloud/Papers/library.bib"))) - -(use-package! citar-org-roam - :after citar org-roam - :no-require - :config - (setq citar-org-roam-subdir "reference") - (citar-org-roam-mode)) - (use-package! nov :mode ("\\.epub\\'" . nov-mode)) @@ -419,39 +448,31 @@ ;; :unnarrowed t))) (after! projectile - (setq projectile-project-search-path '(("~/Projects" . 1)))) - -(after! typescript-mode - (setq typescript-indent-level 2)) + (setq projectile-project-search-path '(("~/Code" . 2)))) ;; (setq ns-auto-hide-menu-bar t) -;(defun switch-to-agenda () (defun max/org-clock-get-clock-string () - "Form a clock string that will be shown in polybar." + "Form a clock string that will be shown in polybar. +Adapted from `org-clock-get-clock-string'." (require 'org-clock) (when (org-clocking-p) - (let ((currently-clocked-time - (floor (org-time-convert-to-integer - (time-since org-clock-start-time)) - 60)) - (clocked-time (org-clock-get-clocked-time))) + (let* ((currently-clocked-time + (floor (org-time-convert-to-integer + (time-since org-clock-start-time)) + 60)) + (clocked-time (org-clock-get-clocked-time)) + (current-work-done-str (org-duration-from-minutes currently-clocked-time))) (if org-clock-effort (let* ((effort-in-minutes (org-duration-to-minutes org-clock-effort)) - (current-work-done-str (org-duration-from-minutes currently-clocked-time)) (work-done-str (org-duration-from-minutes clocked-time)) (effort-str (org-duration-from-minutes effort-in-minutes))) (format "%s (%s/%s) %s" current-work-done-str work-done-str effort-str org-clock-heading)) (format "%s %s" + current-work-done-str (org-duration-from-minutes clocked-time) org-clock-heading))))) - ;; (when (org-clocking-p) - ;; (org-no-properties (org-clock-get-clock-string)))) - ;; (when (org-clocking-p) - ;; (let* ((clocked-time (org-clock-get-clocked-time)) - ;; (work-done-str (org-duration-from-minutes clocked-time))) - ;; (make-symbol work-done-str)))) ;; (defun my/toggle-org-agenda () ;; "Toggle my custom org agenda view" @@ -529,6 +550,16 @@ :desc "Move workspace left" ">" #'+workspace/swap-right :desc "Move workspace left" "<" #'+workspace/swap-left)) +;; Don't create a new workspace on a new emacsclient session +;; https://github.com/doomemacs/doomemacs/issues/1949 +(after! persp-mode + (setq persp-emacsclient-init-frame-behaviour-override "main")) + +(map! :after org + :map org-mode-map + :localleader + "Y" #'ox-clip-image-to-clipboard) + (after! evil-snipe (setq evil-snipe-spillover-scope 'visible)) @@ -544,9 +575,6 @@ (after! yasnippet (setq yas-triggers-in-field t)) -(use-package! moinmoin-mode - :mode ("\\.wiki" . moinmoin-mode)) - (use-package! centered-cursor-mode :config (setq ccm-recenter-at-end-of-file t) @@ -556,6 +584,11 @@ (doom-themes-neotree-config) (setq doom-themes-neotree-enable-variable-pitch nil)) +(use-package! emacs-codeql + :init + (setq codeql-transient-binding "C-c q") + (setq codeql-configure-eglot-lsp t)) + ;; (server-start) ;; (use-package! mac-pseudo-daemon diff --git a/email.el b/email.el index d7783fa..2396571 100644 --- a/email.el +++ b/email.el @@ -150,6 +150,11 @@ (when IS-MAC (mu4e-alert-set-default-style 'notifier))) +;; Fix opening attachments with mu 1.10 +;; https://github.com/doomemacs/doomemacs/issues/7196 +(after! mu4e + (defalias 'mu4e~view-gather-mime-parts 'mu4e--view-gather-mime-parts)) + ;; Taken from http://pragmaticemacs.com/emacs/email-templates-in-mu4e-with-yasnippet/ (defun bjm/mu4e-get-names-for-yasnippet () "Return comma separated string of names for an email" diff --git a/gtd.el b/gtd.el index f67ec57..9c3a0f8 100644 --- a/gtd.el +++ b/gtd.el @@ -47,7 +47,7 @@ (map! :after mu4e :map (mu4e-headers-mode-map mu4e-view-mode-map) - :vne "C-c i" #'gtd-capture-email) + :vne "C-c p" #'gtd-capture-email) ;; Insert CREATED property timestamps for non-captured headlines (use-package! org-expiry diff --git a/init.el b/init.el index b3da911..e7a4bd9 100644 --- a/init.el +++ b/init.el @@ -41,7 +41,7 @@ ;; nav-flash ; blink the current line after jumping neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on - (popup +defaults +all) ; tame sudden yet inevitable temporary windows + (popup +defaults) ; tame sudden yet inevitable temporary windows ;;tabs ; an tab bar for Emacs ;;treemacs ; a project drawer, like neotree but cooler ;;unicode ; extended unicode support for various languages @@ -55,7 +55,7 @@ (evil +everywhere); come to the dark side, we have cookies file-templates ; auto-snippets for empty files fold ; (nigh) universal code folding - (format +onsave) ; automated prettiness + format ; automated prettiness ;;god ; run Emacs commands without modifier keys ;;lispy ; vim for lisp, for people who don't like vim multiple-cursors ; editing in many places at once @@ -138,7 +138,7 @@ ;;hy ; readability of scheme w/ speed of python ;;idris ; json ; At least it ain't XML - (java +meghanada) ; the poster child for carpal tunnel syndrome + ;; (java +meghanada) ; the poster child for carpal tunnel syndrome (javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) @@ -154,7 +154,7 @@ ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional - (python +lsp +poetry) ; beautiful is better than ugly + (python +lsp +pyright +poetry) ; beautiful is better than ugly ;;qt ; the 'cutest' gui framework ever ;;racket ; a DSL for DSLs ;;raku ; the artist formerly known as perl6 @@ -179,10 +179,10 @@ ;;(wanderlust +gmail) :app - calendar + ;;calendar ;;emms everywhere ; *leave* Emacs!? You must be joking - irc ; how neckbeards socialize + ;;irc ; how neckbeards socialize ;;(rss +org) ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought diff --git a/packages.el b/packages.el index 6a3dd57..2b4da4f 100644 --- a/packages.el +++ b/packages.el @@ -50,10 +50,26 @@ ;; our package manager can't deal with; see raxod502/straight.el#279) ;(package! builtin-package :recipe (:branch "develop")) +;;; GTD +;; + +(package! org-edna) +(package! khalel) (package! org-inline-pdf) (package! org-clock-convenience) -;; (package! org-roam-bibtex :pin "3ac2445f431bc39aa0ca5abfc80e28c0c06f0738") (package! org-super-agenda) +(package! org-transclusion) + +;; org-roam-ui keeps up with the latest features in org-roam +(unpin! org-roam) +(package! org-roam-ui) + +;;; Email +;; + +(package! jl-encrypt + :recipe (:host gitlab :repo "lechten/defaultencrypt")) + ;; (package! mu4e-alert) ;; (package! clip2org) (package! centered-cursor-mode) @@ -65,17 +81,17 @@ ;; (package! mac-pseudo-daemon) ;; (package! nix-docbook-mode) (package! base16-theme) -(package! citar-org-roam) -;; (package! citar-org-roam -;; :recipe (:host github :repo "emacs-citar/citar-org-roam")) (package! pdf-tools :built-in 'prefer) (package! nov) ;; (package! org-gtd) -(package! khalel) -(package! jl-encrypt - :recipe (:host gitlab :repo "lechten/defaultencrypt")) ;; (package! weblorg) -;; org-roam-ui keeps up with the latest features in org-roam -(unpin! org-roam) -(package! org-roam-ui) +(package! emacs-codeql + :recipe (:host github + :repo "anticomputer/emacs-codeql" + :branch "main" + :files (:defaults "bin"))) + +;; https://github.com/doomemacs/doomemacs/issues/7196 +(unpin! evil-collection) +(package! evil-collection :recipe (:repo "emacs-evil/evil-collection" :branch "master")) diff --git a/snippets/mu4e-compose-mode/fsfe-upa-registration b/snippets/mu4e-compose-mode/fsfe-upa-registration new file mode 100644 index 0000000..0e42cd8 --- /dev/null +++ b/snippets/mu4e-compose-mode/fsfe-upa-registration @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: FSFE UpA Registration Reply +# -- +Hallo ${1:`(bjm/mu4e-get-names-for-yasnippet)`}, + +vielen Dank für dein Interesse an unserem Upcycling Android Workshop. Wir haben dich auf die Teilnehmerliste gesetzt für unseren Workshop am 21. November um 16 Uhr im Ausstellungsraum des Umweltbundesamts, Wörlitzer Platz 1, 06844 Dessau-Roßlau. + +https://wiki.fsfe.org/Activities/Android/UpcyclingWorkshops#A21._November_2022_-_Umweltbundesamt.2C_Dessau.2C_Deutschland + +$0 + +Viele Grüße, +Dein Upcycling Android Team der FSFE diff --git a/snippets/org-mode/org-noter-notes b/snippets/org-mode/org-noter-notes new file mode 100644 index 0000000..e856042 --- /dev/null +++ b/snippets/org-mode/org-noter-notes @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: org-noter notes +# key: notes, +# -- +* Notes +:PROPERTIES: +:NOTER_DOCUMENT: $0 +:NOTER_PAGE: +:END: