(setq package-selected-packages
'(academic-phrases avy ace-window alert
all-the-icons all-the-icons-completion anzu
- auctex-latexmk benchmark-init browse-at-remote
+ auctex-latexmk bbdb benchmark-init browse-at-remote
browse-kill-ring cape corfu command-log-mode dabbrev define-word
diff-hl diminish disable-mouse dockerfile-mode elfeed
embark-consult erlang exec-path-from-shell
(require 'which-key)
(require 'whitespace-cleanup-mode)
(setq show-paren-context-when-offscreen t)
- (add-to-list 'lin-mode-hooks 'package-menu-mode-hook)
(add-to-list 'lin-mode-hooks 'gnus-summary-mode-hook)
(add-to-list 'lin-mode-hooks 'gnus-group-mode-hook)
(add-to-list 'lin-mode-hooks 'gnus-server-mode-hook)
:END:
#+begin_src emacs-lisp
- (defconst esy/inbox-path "~/inbox.org"
+ (defconst esy/inbox-path (expand-file-name "inbox.org" "~/org")
"Path to my Org mode inbox file.")
+ (defconst esy/journal-path (expand-file-name "journal.org" "~/org")
+ "Path to my Org mode journal file.")
+
(with-eval-after-load 'org
(require 'ob)
(require 'ob-prolog)
- (setq org-agenda-files `(,esy/inbox-path)
+ (setq org-agenda-files `(,esy/inbox-path ,esy/journal-path)
org-default-notes-file esy/inbox-path
org-agenda-start-on-weekday 0
org-ellipsis "…"
(keymap-unset org-mode-map "C-," t))
#+end_src
+*** Always open files with =C-c C-o= inside Emacs
+:PROPERTIES:
+:CUSTOM_ID: org-file-apps-t-emacs
+:CreatedAt: <2022-06-10 Fri>
+:CapturedAt:
+:CapturedAs: Emacs configuration fragment
+:END:
+
+#+begin_src emacs-lisp
+ (setq org-file-apps '((t . emacs)))
+#+end_src
+
** Refile targets
:PROPERTIES:
:CUSTOM_ID: org-refile-targets
#+begin_src emacs-lisp
(with-eval-after-load 'org-refile
- (setq org-refile-targets '((nil . (:maxlevel . 3)))
+ (setq org-refile-targets '((org-agenda-files . (:maxlevel . 5))
+ (nil . (:maxlevel . 3)))
+ org-archive-location "~/org/journal.org::datetree/* Finished Tasks :ARCHIVE"
org-refile-use-outline-path t))
#+end_src
(setq org-capture-templates '(("t" "Todo [inbox]" entry
(file+headline esy/inbox-path "Tasks")
"** TODO %^{Task} %^g
- :PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CapturedAs: Inbox Task
- :END:
- "
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CapturedAs: Inbox Task
+ :END:"
:prepend t
:empty-lines 1
:immediate-finish t)
(file+headline esy/source-path
"Misc. settings")
"** %^{Fragment} %^g
- :PROPERTIES:
- :CUSTOM_ID: %^{CUSTOM_ID}
- :CreatedAt: %t
- :CapturedAt: %a
- :CapturedAs: Emacs configuration fragment
- :END:\n\n#+begin_src emacs-lisp\n %i\n#+end_src
- "
+ :PROPERTIES:
+ :CUSTOM_ID: %^{CUSTOM_ID}
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CapturedAs: Emacs configuration fragment
+ :END:\n\n#+begin_src emacs-lisp\n %i\n#+end_src"
:empty-lines 1)
("n" "New Project" entry
(file+headline esy/inbox-path "Projects")
"** %^{Name} %^g
- :PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CapturedAs: New Project
- :SCM: file:%(project-prompt-project-dir)
- :END:
- "
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CapturedAs: New Project
+ :SCM: file:%(project-prompt-project-dir)
+ :END:"
:prepend t
:empty-lines 1
:immediate-finish t)
("c" "New Calendar Event" entry
(file+headline esy/inbox-path "Calendar")
"** %^{Title} %^g
- :PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CapturedAs: Calendar Event
- :END:
- %(format-time-string \"<%Y-%m-%d %H:%M\" (org-read-date t t))-%(format-time-string \"%H:%M>\" (org-read-date t t))
- %i
- "
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CapturedAs: Calendar Event
+ :END:
+ %(format-time-string \"<%Y-%m-%d %H:%M\" (org-read-date t t))-%(format-time-string \"%H:%M>\" (org-read-date t t))
+ %i"
:prepend t
:empty-lines 1
:immediate-finish t)
esy/org-capture-to-project-heading)
"*** TODO %?
:PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CapturedAs: Project Task
- :END:
- %i
- "
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CapturedAs: Project Task
+ :END:
+ %i"
:prepend t
:empty-lines 1)
("Q" "Quick Project Task" entry
(file+function esy/inbox-path
esy/org-capture-to-project-heading)
"*** TODO %^{Task}
- :PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CaptuerdAs: Quick Project Task
- :END:
- %i
- "
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CaptuerdAs: Quick Project Task
+ :END:
+ %i"
:prepend t
:empty-lines 1
:immediate-finish t)
(file+function esy/inbox-path
esy/org-capture-to-current-project)
"*** TODO %^{Task}
- :PROPERTIES:
- :CreatedAt: %t
- :CapturedAt: %a
- :CaptuerdAs: Current Project Task
- :END:
- %i
- "
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CaptuerdAs: Current Project Task
+ :END:
+ %i"
:prepend t
:empty-lines 1
- :immediate-finish t)))
+ :immediate-finish t)
+ ("j" "Journal" entry
+ (file+datetree esy/journal-path)
+ "* %?
+ :PROPERTIES:
+ :CreatedAt: %t
+ :CapturedAt: %a
+ :CaptuerdAs: Journal entry
+ :END:
+ %i"
+ :empty-lines 1)))
(setq org-capture-templates-contexts
'(("P" (list project-current))))
"Configure Gnus specific customizations."
(require 'gnus)
(require 'gnus-icalendar)
- (setq
+ (setq
gnus-article-treat-types '("text/plain"
"text/x-verbatim"
"text/x-patch"
(pulse-momentary-highlight-one-line))
#+end_src
-
** Misc. keybindings
:PROPERTIES:
:CUSTOM_ID: misc-keybindings
(global-set-key (kbd "C-.") #'embark-act)
(global-set-key (kbd "C-;") #'avy-goto-char-timer)
(global-set-key (kbd "C-s-f") #'toggle-frame-fullscreen)
- (global-set-key (kbd "C-s-l") #'esy/pulse-line)
- (global-set-key [remap just-one-space] #'cycle-spacing))
+ (global-set-key (kbd "C-s-l") #'esy/pulse-line))
(add-hook 'after-init-hook #'esy/customize-global-keymap)
#+end_src
(add-hook 'proced-mode-hook #'esy/setup-proced)
#+end_src
+** BBDB
+:PROPERTIES:
+:CUSTOM_ID: bbdb-phone-style-nil
+:END:
+
+#+begin_src emacs-lisp
+ (with-eval-after-load 'bbdb
+ (setq bbdb-phone-style nil))
+#+end_src
+
* Display weekly agenda on startup
:PROPERTIES:
:CUSTOM_ID: agenda-on-startup
(require 'mb-depth)
(setq enable-recursive-minibuffers t)
(minibuffer-depth-indicate-mode))
-
+
(add-hook 'after-init-hook #'esy/setup-recursive-minibuffers)
#+end_src
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t)
(add-hook 'TeX-after-compilation-finished-functions
- #'TeX-revert-document-buffer))
+ #'TeX-revert-document-buffer)
+ (add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode)))
+#+end_src
+
+* =vc= customizations
+:PROPERTIES:
+:CUSTOM_ID: vc-follow-symlinks-t
+:END:
+
+By default, Emacs asks for confirmation when visiting a path that
+points to symlink to a file committed to version control. I often
+visit this file with =C-x C-f ~/.emacs.d/esy.org=, which is a symlink
+to the actual source of this file which is managed by git and Stow, so
+in this cases I prefer Emacs to trust me that I know what I'm doing
+without asking each time.
+
+#+begin_src emacs-lisp
+ (setq vc-follow-symlinks t)
#+end_src
* Project switch commands
auto-revert-verbose nil)
(global-auto-revert-mode)
(which-key-mode)
- (global-whitespace-cleanup-mode))
+ (global-whitespace-cleanup-mode 1))
(add-hook 'after-init-hook #'esy/setup-misc)
#+end_src
(add-to-list 'zoneinfo-style-world-list '("Europe/Amsterdam" "Amsterdam")))
#+end_src
+** =shell= customizations
+:PROPERTIES:
+:CUSTOM_ID: shell
+:CreatedAt: <2022-06-10 Fri>
+:CapturedAt: [[file:~/inbox.org::*Followup on this mail from Adam][Followup on this mail from Adam]]
+:CapturedAs: Emacs configuration fragment
+:END:
+
+Kill =M-x shell= buffers automatically when the shell process
+terminates, e.g. when pressing =C-d=.
+
+#+begin_src emacs-lisp
+ (setq shell-kill-buffer-on-exit t)
+#+end_src
+
+** Open files (with =C-c C-o=) in Emacs
+ :PROPERTIES:
+ :CUSTOM_ID: org-file-apps-t-emacs
+ :CreatedAt: <2022-06-10 Fri>
+ :CapturedAt:
+ :CapturedAs: Emacs configuration fragment
+ :END:
+
+#+begin_src emacs-lisp
+ (setq org-file-apps '((t . emacs)))
+#+end_src
+
* Elisp Footer
:PROPERTIES:
:CUSTOM_ID: footer