summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs-init.org130
-rw-r--r--emacs-private.el.gpgbin1043 -> 1085 bytes
2 files changed, 109 insertions, 21 deletions
diff --git a/emacs-init.org b/emacs-init.org
index dfb1aec..bbe46d2 100644
--- a/emacs-init.org
+++ b/emacs-init.org
@@ -5,11 +5,11 @@ This files contains all the elisp code normally placed in the .emacs
file. It and the =init.el= file are then symlinked to my =~/.emacs.d/=
directory. Instead of symlinking the files could also be directly
tangled to =~/.emacs.d/=.
-#+BEGIN_SRC shell :results silent
-ln -sf $(pwd)/emacs-init.org ~/.emacs.d/
-ln -sf $(pwd)/tangle/emacs-init.el ~/.emacs.d/
-ln -sf $(pwd)/emacs-private.el.gpg ~/.emacs.d/
-ln -sf $(pwd)/tangle/init.el ~/.emacs.d/
+#+BEGIN_SRC shell :results silent :tangle tangle/symlink.sh :shebang "#!/bin/bash"
+ln -siv $(pwd)/emacs-init.org ~/.emacs.d/
+ln -siv $(pwd)/tangle/emacs-init.el ~/.emacs.d/
+ln -siv $(pwd)/emacs-private.el.gpg ~/.emacs.d/
+ln -siv $(pwd)/tangle/init.el ~/.emacs.d/
#+END_SRC
An often seen setup is to use ~org-babel-load-file~ in =init.el= to
@@ -291,6 +291,9 @@ The above macro can be used like this.
(shade-white "#efeae9")
(fg-light "#655370")
(dark-cyan "#008b8b")
+ (light-green "#4f774f") ;;#3f773f
+ (dark-green "#1c661c")
+ (dark-green2 "#002000")
(region-dark "#2d2e2e")
(region "#39393d")
(slate "#8FA1B3")
@@ -320,7 +323,8 @@ The above macro can be used like this.
:foreground ,bg-white)
(:family ,sans-mono-font
:background ,bg-white
- :foreground ,bg-dark))
+ :foreground ,bg-dark
+ :height 75))
(variable-pitch
(:family ,sans-font)
(:family ,et-font
@@ -596,16 +600,16 @@ The above macro can be used like this.
nil)
(org-scheduled
(:foreground ,gray)
- nil)
+ (:foreground ,light-green))
(org-upcoming-deadline
(:foreground ,keyword)
nil)
(org-scheduled-today
(:foreground ,fg-white)
- nil)
+ (:foreground ,dark-green))
(org-scheduled-previously
(:foreground ,slate)
- nil)
+ (:foreground ,dark-green2))
(org-agenda-done
(:inherit nil
:foreground ,doc)
@@ -1018,7 +1022,7 @@ are for now mostly copied from [[https://gitlab.com/protesilaos/dotemacs/][Prote
(setq-local max-mini-window-height 1))))
#+END_SRC
-#+BEGIN_SRC emacs-lisp
+#+BEGIN_SRC emacs-lisp :tangle no
(use-package ido-completing-read+
:ensure t
:after ido
@@ -1251,7 +1255,6 @@ of src_shell{getconf "PATH"}. See [[elisp:(describe-variable
#+end_src
** Git
*** Magit
-
#+BEGIN_SRC emacs-lisp
(use-package magit
:ensure t
@@ -1297,6 +1300,18 @@ Add support for [[https://nvie.com/posts/a-successful-git-branching-model/][gitf
:ensure t
:hook (magit-mode . turn-on-magit-gitflow))
#+end_src
+*** git-identity
+Found it in this [[https://www.manueluberti.eu/emacs/2020/03/30/lockdown-beam-git-identity/][blog post]] from Manuel Uberti. An easy way to handle multiple git identities.
+
+#+begin_src emacs-lisp
+(use-package git-identity
+ :ensure t
+ :custom
+ (git-identity-verify t)
+ (git-identity-list private/git-identity-list)
+ :config (git-identity-magit-mode 1)
+ :bind (:map magit-status-mode-map ("I" . git-identity-info)))
+#+end_src
*** diff-hl
Indicates changed lines in the left fringe. The Hydra can be used to
navigate and revert hunks directly from the buffer. Use =g= to open
@@ -1353,7 +1368,6 @@ some safe local variable values.
(add-to-list 'safe-local-variable-values
'(git-auto-commit-mode . t)))
#+end_src
-
** Projectile
#+BEGIN_SRC emacs-lisp
@@ -1487,6 +1501,17 @@ over =windmove=, as it does not interfere with org keybindings.
("C-c <left>" . winner-hydra/winner-undo)
("C-c <right>" . winner-hydra/winner-redo)))
#+end_src
+** File encryption
+=epa= handles en-/decryption with =gnupg=. Setting ~'loopback~ pinentry mode will ask for the key passphrase in the emacs minibuffer. For this the =pinentry= package is needed, as well as setting =allow-emacs-pinentry= in the =gnupg= configuration.
+
+#+begin_src emacs-lisp
+(use-package epa
+ :custom (epa-pinentry-mode 'loopback))
+(use-package pinentry
+ :ensure t
+ :config (pinentry-start)
+ :after epa)
+#+end_src
* Applications and utilities
** Calendar
Some basic calendar options for date format und location to provide
@@ -1629,7 +1654,9 @@ Hansen's]] configs.
- Refile Targets :: Use the full outline path so I can distinguish
headlines with the same name & disable step-wise completion as I
think from the refile target backwards, not from top-level
- downwards.
+ downwards. Also include the current file's headings as a refile
+ targets up to a deep level, all agenda files up to a small level and
+ all open org files up to an even smaller level.
- Drawer for Notes :: Notes go into the =NOTES= drawer. Clocking
times should stay separate in the =LOGBOOK= drawer.
- Track state changes :: Notes when an entry is switched to done when
@@ -1685,6 +1712,9 @@ Hansen's]] configs.
("omap" . "http://nominatim.openstreetmap.org/search?q=%s&polygon=1")))
(org-ellipsis " ")
(org-refile-use-outline-path 'file)
+ (org-refile-targets '((nil :maxlevel . 8)
+ (org-agenda-files :maxlevel . 3)
+ (org-buffer-list :maxlevel . 2)))
(org-outline-path-complete-in-steps nil)
(org-log-state-notes-into-drawer "NOTES")
(org-clock-into-drawer "LOGBOOK")
@@ -1850,7 +1880,7 @@ Switch projects and subprojects from NEXT back to TODO"
(use-package org-screenshot)
(use-package org-collector)
(use-package ox)
-(use-package org-notmuch)
+(use-package ol-notmuch)
(use-package org-expiry
:custom
(org-expiry-handler-function 'org-expiry-archive-subtree))
@@ -1882,6 +1912,11 @@ Use imagemagick and standalone class for latex preview.
(use-package org-num
:delight)
#+end_src
+*** Column view
+#+begin_src emacs-lisp
+(setq org-columns-default-format
+ "%50ITEM(Task) %5Effort(Effort){:} %5CLOCKSUM %3PRIORITY %20DEADLINE %20SCHEDULED %20TIMESTAMP %TODO %CATEGORY %TAGS")
+#+end_src
*** org-caldav
#+begin_src emacs-lisp
(use-package org-caldav
@@ -1919,13 +1954,29 @@ Use imagemagick and standalone class for latex preview.
#+begin_src emacs-lisp
(use-package ol-bbdb)
#+end_src
+*** prettify symbols
+Set some prettify symbols for org mode.
+#+begin_src emacs-lisp
+(defun fpi/add-org-prettify-symbols ()
+ "Beautify Org Checkbox Symbol"
+ (setq prettify-symbols-alist
+ (append prettify-symbols-alist
+ '(("#+BEGIN_SRC" . ?»)
+ ("#+END_SRC" . ?«)
+ ("#+begin_src" . ?»)
+ ("#+end_src" . ?«)
+ ("[ ]" . ?☐)
+ ("[X]" . ?☑ )
+ ("[-]" . ?❍ )))))
+(add-hook 'org-mode-hook 'fpi/add-org-prettify-symbols)
+#+end_src
*** org-roam
#+begin_src emacs-lisp
(use-package org-roam
+ :ensure t
:delight
:hook
(after-init . org-roam-mode)
- :load-path "~/git/clone/org-roam"
:custom
(org-roam-directory "~/git/projects/zettel/")
:bind (:map org-roam-mode-map
@@ -1935,6 +1986,14 @@ Use imagemagick and standalone class for latex preview.
:map org-mode-map
(("C-c n i" . org-roam-insert))))
#+end_src
+**** org-roam-bibtex
+#+begin_src emacs-lisp :tangle no
+(use-package org-roam-bibtex
+ :ensure t
+ :hook (org-roam-mode . org-roam-bibtex-mode)
+ :bind (:map org-mode-map
+ (("C-c n a" . orb-note-actions))))
+#+end_src
*** Org-edna
=Org-edna= is a great tool to manage =TODO= dependencies. I mainly use
it to mark tasks as =NEXT= after switching another task to =DONE=. The
@@ -2187,17 +2246,34 @@ A small function to toggle the encryption state of the current entry.
(org-encrypt-entry))))))
(define-key fpi/toggle-map "e" #'fpi/org-toggle-crypt-entry))
#+end_src
-*** org-ref
+*** Reference management
+**** Bibtex
+#+begin_src emacs-lisp
+(use-package bibtex
+ :custom
+ (bibtex-autokey-titlewords 3)
+ (bibtex-autokey-titlewords-stretch 1)
+ (bibtex-autokey-titleword-length 5)
+ :config
+ (bibtex-set-dialect 'BibTeX))
+
+(setq bibtex-completion-bibliography "~/git/projects/zettel/Lit/bib.bib")
+(setq bibtex-completion-notes-path "~/git/projects/zettel/Lit")
+(setq bibtex-completion-notes-extension ".org")
+
+#+end_src
+**** org-ref
#+begin_src emacs-lisp
(use-package org-ref
:ensure t
:custom
- (org-ref-bibliography-notes "~/git/projects/personal/bib.org")
+ (org-ref-bibliography-notes nil)
+ (org-ref-notes-function 'org-ref-notes-function-many-files)
+ (org-ref-notes-directory "~/git/projects/zettel/Lit")
(org-ref-default-bibliography '("~/git/projects/personal/bib.bib"))
- (org-ref-pdf-directory "~/git/projects/personal/Lit/")
- :config
- (bibtex-set-dialect 'BibTeX))
+ (org-ref-pdf-directory "~/git/projects/personal/Lit/"))
#+end_src
+***** Capturing entries
I store my bibtex references in an org file together with my notes. In
addition to saving the meta information in properties using the same
functions as =doi-utils-doi-to-org-bibtex=, I also store them a second
@@ -2999,7 +3075,18 @@ I use =msmtp= to send mail.
(mail-specify-envelope-from t)
(mail-envelope-from 'header))
#+end_src
-
+*** MIME
+#+begin_src emacs-lisp
+(use-package mm-decode
+ :config
+ (use-package spice-mode
+ :ensure t)
+ (defun mm-display-spice-inline (handle)
+ "Show an spice mode text from HANDLE inline."
+ (mm-display-inline-fontify handle 'spice-mode))
+ (add-to-list 'mm-inline-media-tests '("application/x-wine-extension-cir" mm-display-spice-inline identity))
+ (add-to-list 'mm-inlined-types "application/x-wine-extension-cir"))
+#+end_src
*** MUA/Notmuch
After using =mu4e= as my mail user agent for a while I switched to
@@ -3110,6 +3197,7 @@ For now I use this bad code.
(bbdb-initialize 'gnus 'message)
(bbdb-mua-auto-update-init 'gnus 'message)
+(setq bbdb-mua-pop-up 'horiz)
;; size of the bbdb popup
(setq bbdb-pop-up-window-size 0.15)
(setq bbdb-mua-pop-up-window-size 0.15)
diff --git a/emacs-private.el.gpg b/emacs-private.el.gpg
index 4b638e1..a94dda3 100644
--- a/emacs-private.el.gpg
+++ b/emacs-private.el.gpg
Binary files differ