|
@ -74,7 +74,80 @@ https://blog.d46.us/advanced-emacs-startup/ |
|
|
|
|
|
|
|
|
;(setq gc-cons-threshold (* 50 1000 1000)) |
|
|
;(setq gc-cons-threshold (* 50 1000 1000)) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
* Package Management |
|
|
|
|
|
** Elpaca |
|
|
|
|
|
Boilerplate for Elpaca |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(defvar elpaca-installer-version 0.6) |
|
|
|
|
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) |
|
|
|
|
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) |
|
|
|
|
|
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory)) |
|
|
|
|
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git" |
|
|
|
|
|
:ref nil |
|
|
|
|
|
:files (:defaults "elpaca-test.el" (:exclude "extensions")) |
|
|
|
|
|
:build (:not elpaca--activate-package))) |
|
|
|
|
|
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory)) |
|
|
|
|
|
(build (expand-file-name "elpaca/" elpaca-builds-directory)) |
|
|
|
|
|
(order (cdr elpaca-order)) |
|
|
|
|
|
(default-directory repo)) |
|
|
|
|
|
(add-to-list 'load-path (if (file-exists-p build) build repo)) |
|
|
|
|
|
(unless (file-exists-p repo) |
|
|
|
|
|
(make-directory repo t) |
|
|
|
|
|
(when (< emacs-major-version 28) (require 'subr-x)) |
|
|
|
|
|
(condition-case-unless-debug err |
|
|
|
|
|
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) |
|
|
|
|
|
((zerop (call-process "git" nil buffer t "clone" |
|
|
|
|
|
(plist-get order :repo) repo))) |
|
|
|
|
|
((zerop (call-process "git" nil buffer t "checkout" |
|
|
|
|
|
(or (plist-get order :ref) "--")))) |
|
|
|
|
|
(emacs (concat invocation-directory invocation-name)) |
|
|
|
|
|
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch" |
|
|
|
|
|
"--eval" "(byte-recompile-directory \".\" 0 'force)"))) |
|
|
|
|
|
((require 'elpaca)) |
|
|
|
|
|
((elpaca-generate-autoloads "elpaca" repo))) |
|
|
|
|
|
(progn (message "%s" (buffer-string)) (kill-buffer buffer)) |
|
|
|
|
|
(error "%s" (with-current-buffer buffer (buffer-string)))) |
|
|
|
|
|
((error) (warn "%s" err) (delete-directory repo 'recursive)))) |
|
|
|
|
|
(unless (require 'elpaca-autoloads nil t) |
|
|
|
|
|
(require 'elpaca) |
|
|
|
|
|
(elpaca-generate-autoloads "elpaca" repo) |
|
|
|
|
|
(load "./elpaca-autoloads"))) |
|
|
|
|
|
(add-hook 'after-init-hook #'elpaca-process-queues) |
|
|
|
|
|
(elpaca `(,@elpaca-order)) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
For Windows it might be necessary to disable symlink creations |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
;;(elpaca-no-symlink-mode) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
use-package integration |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(elpaca elpaca-use-package |
|
|
|
|
|
;; enable :elpaca use-package keyword |
|
|
|
|
|
(elpaca-use-package-mode) |
|
|
|
|
|
;; assume :elpaca t unless otherwise specified |
|
|
|
|
|
(setq elpaca-use-package-by-default t)) |
|
|
|
|
|
|
|
|
|
|
|
;; block until current queue processed. |
|
|
|
|
|
(elpaca-wait) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(defun +elpaca-unload-seq (e) |
|
|
|
|
|
(and (featurep 'seq) (unload-feature 'seq t)) |
|
|
|
|
|
(elpaca--continue-build e)) |
|
|
|
|
|
|
|
|
|
|
|
;; You could embed this code directly in the reicpe, I just abstracted it into a function. |
|
|
|
|
|
(defun +elpaca-seq-build-steps () |
|
|
|
|
|
(append (butlast (if (file-exists-p (expand-file-name "seq" elpaca-builds-directory)) |
|
|
|
|
|
elpaca--pre-built-steps elpaca-build-steps)) |
|
|
|
|
|
(list '+elpaca-unload-seq 'elpaca--activate-package))) |
|
|
|
|
|
|
|
|
|
|
|
;;(elpaca `(seq :build ,(+elpaca-seq-build-steps))) |
|
|
|
|
|
(use-package seq :elpaca `(seq :build ,(+elpaca-seq-build-steps))) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
** COMMENT Rest of the stuff |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(require 'package) |
|
|
(require 'package) |
|
|
|
|
|
|
|
@ -112,6 +185,19 @@ Maybe turn it on again at some point before the next major emacs upgrade |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(setq byte-compile-warnings '(cl-functions)) |
|
|
(setq byte-compile-warnings '(cl-functions)) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
* use-package keywords general / diminish |
|
|
|
|
|
Needs to be loaded before any other package which uses the :general keyword |
|
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(use-package general |
|
|
|
|
|
:ensure t |
|
|
|
|
|
:demand t) |
|
|
|
|
|
(use-package diminish |
|
|
|
|
|
:ensure t |
|
|
|
|
|
:demand t) |
|
|
|
|
|
|
|
|
|
|
|
(elpaca-wait) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
* Performance Optimization |
|
|
* Performance Optimization |
|
|
** Garbage Collection |
|
|
** Garbage Collection |
|
@ -227,6 +313,7 @@ Restore it to reasonable value after init. Also stop garbage collection during m |
|
|
(setq sentence-end-double-space nil) ;; don't coun two spaces after a period as the end of a sentence. |
|
|
(setq sentence-end-double-space nil) ;; don't coun two spaces after a period as the end of a sentence. |
|
|
(delete-selection-mode t) ;; delete selected region when typing |
|
|
(delete-selection-mode t) ;; delete selected region when typing |
|
|
(use-package saveplace |
|
|
(use-package saveplace |
|
|
|
|
|
:elpaca nil |
|
|
:config |
|
|
:config |
|
|
(save-place-mode 1) ;; saves position in file when it's closed |
|
|
(save-place-mode 1) ;; saves position in file when it's closed |
|
|
:custom |
|
|
:custom |
|
@ -314,7 +401,7 @@ Windows Theme: |
|
|
** line wrappings |
|
|
** line wrappings |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(global-visual-line-mode) |
|
|
(global-visual-line-mode) |
|
|
(diminish 'visual-line-mode) |
|
|
|
|
|
|
|
|
;(diminish 'visual-line-mode) |
|
|
(use-package adaptive-wrap |
|
|
(use-package adaptive-wrap |
|
|
:ensure t |
|
|
:ensure t |
|
|
:hook |
|
|
:hook |
|
@ -330,6 +417,7 @@ Windows Theme: |
|
|
** line numbers |
|
|
** line numbers |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(use-package display-line-numbers |
|
|
(use-package display-line-numbers |
|
|
|
|
|
:elpaca nil |
|
|
:init |
|
|
:init |
|
|
:hook |
|
|
:hook |
|
|
((prog-mode |
|
|
((prog-mode |
|
@ -364,13 +452,6 @@ e.g. python-mode with just "π ". |
|
|
(prog-mode . rainbow-delimiters-mode)) |
|
|
(prog-mode . rainbow-delimiters-mode)) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
* General (key mapper) |
|
|
|
|
|
Needs to be loaded before any other package which uses the :general keyword |
|
|
|
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(use-package general |
|
|
|
|
|
:ensure t) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
* Bookmarks |
|
|
* Bookmarks |
|
|
Usage: |
|
|
Usage: |
|
@ -386,6 +467,7 @@ Edit bookmarks (while in bookmark file): |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package bookmark |
|
|
(use-package bookmark |
|
|
|
|
|
:elpaca nil |
|
|
:custom |
|
|
:custom |
|
|
(bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks"))) |
|
|
(bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks"))) |
|
|
#+end_src |
|
|
#+end_src |
|
@ -410,6 +492,7 @@ Some windows specific stuff |
|
|
Exclude some dirs from spamming recentf |
|
|
Exclude some dirs from spamming recentf |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package recentf |
|
|
(use-package recentf |
|
|
|
|
|
:elpaca nil |
|
|
; :defer 1 |
|
|
; :defer 1 |
|
|
:config |
|
|
:config |
|
|
(recentf-mode) |
|
|
(recentf-mode) |
|
@ -425,6 +508,7 @@ Exclude some dirs from spamming recentf |
|
|
* savehist |
|
|
* savehist |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package savehist |
|
|
(use-package savehist |
|
|
|
|
|
:elpaca nil |
|
|
:config |
|
|
:config |
|
|
(savehist-mode) |
|
|
(savehist-mode) |
|
|
:custom |
|
|
:custom |
|
@ -470,6 +554,7 @@ Exclude some dirs from spamming recentf |
|
|
* abbrev |
|
|
* abbrev |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package abbrev |
|
|
(use-package abbrev |
|
|
|
|
|
:elpaca nil |
|
|
:diminish abbrev-mode |
|
|
:diminish abbrev-mode |
|
|
:hook |
|
|
:hook |
|
|
((text-mode org-mode) . abbrev-mode) |
|
|
((text-mode org-mode) . abbrev-mode) |
|
@ -526,6 +611,20 @@ in case evil is messing something up. |
|
|
;; (evil-set-initial-state 'dired-mode 'emacs) |
|
|
;; (evil-set-initial-state 'dired-mode 'emacs) |
|
|
(evil-mode 1)) |
|
|
(evil-mode 1)) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
* Eldoc |
|
|
|
|
|
use builtin version |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(use-package eldoc |
|
|
|
|
|
:elpaca nil |
|
|
|
|
|
:diminish eldoc-mode |
|
|
|
|
|
:defer t) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
* COMMENT Eldoc Box |
|
|
|
|
|
Currently corfu-popupinfo displays eldoc in highlighted completion candidate. Maybe that's good enough. |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(use-package eldoc-box |
|
|
|
|
|
:ensure t) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
* Meow |
|
|
* Meow |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
@ -691,6 +790,7 @@ Completion ui, replaces company. |
|
|
;; "C-d" 'corfu-info-documentation) |
|
|
;; "C-d" 'corfu-info-documentation) |
|
|
|
|
|
|
|
|
(use-package emacs |
|
|
(use-package emacs |
|
|
|
|
|
:elpaca nil |
|
|
:init |
|
|
:init |
|
|
;; hide commands in M-x which do not apply to current mode |
|
|
;; hide commands in M-x which do not apply to current mode |
|
|
(setq read-extended-command-predicate #'command-completion-default-include-p) |
|
|
(setq read-extended-command-predicate #'command-completion-default-include-p) |
|
@ -933,16 +1033,14 @@ End Sub |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(use-package org |
|
|
|
|
|
:config |
|
|
|
|
|
(org-add-link-type "outlook" 'my--org-outlook-open)) |
|
|
|
|
|
|
|
|
;(org-add-link-type "outlook" 'my--org-outlook-open) |
|
|
|
|
|
|
|
|
(defun my--org-outlook-open (id) |
|
|
|
|
|
(w32-shell-execute "open" "outlook" (concat " /select outlook:" id))) |
|
|
|
|
|
|
|
|
(defun my--org-outlook-open (id) |
|
|
|
|
|
(w32-shell-execute "open" "outlook" (concat " /select outlook:" id))) |
|
|
|
|
|
|
|
|
(defun my/org-outlook-open-test () |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(w32-shell-execute "open" "outlook" " /select outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000"))' |
|
|
|
|
|
|
|
|
(defun my/org-outlook-open-test () |
|
|
|
|
|
(interactive) |
|
|
|
|
|
(w32-shell-execute "open" "outlook" " /select outlook:000000008A209C397CEF2C4FBA9E54AEB5B1F97F0700846D043B407C5B43A0C05AFC46DC5C630587BE5E020900006E48FF8F6027694BA6593777F542C19E0002A6434D000000"))' |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
* misc |
|
|
* misc |
|
@ -1043,8 +1141,8 @@ This seems necessary to prevent 'org is already installed' error |
|
|
https://github.com/jwiegley/use-package/issues/319 |
|
|
https://github.com/jwiegley/use-package/issues/319 |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(assq-delete-all 'org package--builtins)' |
|
|
|
|
|
(assq-delete-all 'org package--builtin-versions) |
|
|
|
|
|
|
|
|
;(assq-delete-all 'org package--builtins)' |
|
|
|
|
|
;(assq-delete-all 'org package--builtin-versions) |
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
@ -1060,19 +1158,19 @@ If the property is already set, replace its value." |
|
|
(while (and (not (eobp)) |
|
|
(while (and (not (eobp)) |
|
|
(looking-at "^[#:]")) |
|
|
(looking-at "^[#:]")) |
|
|
(if (save-excursion (end-of-line) (eobp)) |
|
|
(if (save-excursion (end-of-line) (eobp)) |
|
|
(progn |
|
|
|
|
|
(end-of-line) |
|
|
|
|
|
(insert "\n")) |
|
|
|
|
|
(forward-line) |
|
|
|
|
|
(beginning-of-line))) |
|
|
|
|
|
(insert "#+" name ": " value "\n"))))) |
|
|
|
|
|
|
|
|
|
|
|
(defun my--buffer-prop-remove (name) |
|
|
|
|
|
"Remove a buffer property called NAME." |
|
|
|
|
|
(org-with-point-at 1 |
|
|
|
|
|
(when (re-search-forward (concat "\\(^#\\+" name ":.*\n?\\)") |
|
|
|
|
|
(point-max) t) |
|
|
|
|
|
(replace-match "")))) |
|
|
|
|
|
|
|
|
(progn |
|
|
|
|
|
(end-of-line) |
|
|
|
|
|
(insert "\n")) |
|
|
|
|
|
(forward-line) |
|
|
|
|
|
(beginning-of-line))) |
|
|
|
|
|
(insert "#+" name ": " value "\n"))))) |
|
|
|
|
|
|
|
|
|
|
|
(defun my--buffer-prop-remove (name) |
|
|
|
|
|
"Remove a buffer property called NAME." |
|
|
|
|
|
(org-with-point-at 1 |
|
|
|
|
|
(when (re-search-forward (concat "\\(^#\\+" name ":.*\n?\\)") |
|
|
|
|
|
(point-max) t) |
|
|
|
|
|
(replace-match "")))) |
|
|
|
|
|
|
|
|
(use-package org |
|
|
(use-package org |
|
|
:ensure t |
|
|
:ensure t |
|
@ -1087,25 +1185,36 @@ If the property is already set, replace its value." |
|
|
("C-c c" . org-capture) |
|
|
("C-c c" . org-capture) |
|
|
("C-c a" . org-agenda) |
|
|
("C-c a" . org-agenda) |
|
|
:map org-mode-map ("S-<right>" . org-shiftright) |
|
|
:map org-mode-map ("S-<right>" . org-shiftright) |
|
|
("S-<left>" . org-shiftleft)) |
|
|
|
|
|
|
|
|
("S-<left>" . org-shiftleft)) |
|
|
:init |
|
|
:init |
|
|
(defun my--org-company () |
|
|
|
|
|
(set (make-local-variable 'company-backends) |
|
|
|
|
|
'(company-capf company-files)) |
|
|
|
|
|
(add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)) |
|
|
|
|
|
|
|
|
|
|
|
(defun my--org-agenda-files-set () |
|
|
(defun my--org-agenda-files-set () |
|
|
"Sets default agenda files. |
|
|
"Sets default agenda files. |
|
|
Necessary when updating roam agenda todos." |
|
|
Necessary when updating roam agenda todos." |
|
|
(setq org-agenda-files (list (concat MY--PATH_ORG_FILES "notes.org") |
|
|
(setq org-agenda-files (list (concat MY--PATH_ORG_FILES "notes.org") |
|
|
(concat MY--PATH_ORG_FILES "projects.org") |
|
|
|
|
|
(concat MY--PATH_ORG_FILES "tasks.org"))) |
|
|
|
|
|
|
|
|
(concat MY--PATH_ORG_FILES "projects.org") |
|
|
|
|
|
(concat MY--PATH_ORG_FILES "tasks.org"))) |
|
|
(when *sys/linux* |
|
|
(when *sys/linux* |
|
|
(nconc org-agenda-files |
|
|
(nconc org-agenda-files |
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) |
|
|
|
|
|
|
|
|
(directory-files-recursively MY--PATH_ORG_FILES_MOBILE "\\.org$")))) |
|
|
(my--org-agenda-files-set) |
|
|
(my--org-agenda-files-set) |
|
|
|
|
|
|
|
|
|
|
|
(defun my--org-skip-subtree-if-priority (priority) |
|
|
|
|
|
"Skip an agenda subtree if it has a priority of PRIORITY. |
|
|
|
|
|
|
|
|
|
|
|
PRIORITY may be one of the characters ?A, ?B, or ?C." |
|
|
|
|
|
(let ((subtree-end (save-excursion (org-end-of-subtree t))) |
|
|
|
|
|
(pri-value (* 1000 (- org-lowest-priority priority))) |
|
|
|
|
|
(pri-current (org-get-priority (thing-at-point 'line t)))) |
|
|
|
|
|
(if (= pri-value pri-current) |
|
|
|
|
|
subtree-end |
|
|
|
|
|
nil))) |
|
|
:config |
|
|
:config |
|
|
|
|
|
(when *work_remote* |
|
|
|
|
|
(org-add-link-type "outlook" 'my--org-outlook-open)) |
|
|
:custom |
|
|
:custom |
|
|
|
|
|
(when *work_remote* |
|
|
|
|
|
(org-todo-keywords |
|
|
|
|
|
'((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE" "CANCELLED")))) |
|
|
(when *sys/linux* |
|
|
(when *sys/linux* |
|
|
(org-pretty-entities t)) |
|
|
(org-pretty-entities t)) |
|
|
(org-startup-truncated t) |
|
|
(org-startup-truncated t) |
|
@ -1114,152 +1223,54 @@ Necessary when updating roam agenda todos." |
|
|
(org-src-preserve-indentation t) ;; no extra indentation |
|
|
(org-src-preserve-indentation t) ;; no extra indentation |
|
|
(org-src-window-setup 'current-window) ;; C-c ' opens in current window |
|
|
(org-src-window-setup 'current-window) ;; C-c ' opens in current window |
|
|
(org-modules (quote (org-id |
|
|
(org-modules (quote (org-id |
|
|
org-habit |
|
|
|
|
|
org-tempo))) ;; easy templates |
|
|
|
|
|
|
|
|
org-habit |
|
|
|
|
|
org-tempo))) ;; easy templates |
|
|
(org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")) |
|
|
(org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org")) |
|
|
(org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations")) |
|
|
(org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations")) |
|
|
(org-log-into-drawer "LOGBOOK") |
|
|
(org-log-into-drawer "LOGBOOK") |
|
|
(org-log-done 'time) ;; create timestamp when task is done |
|
|
(org-log-done 'time) ;; create timestamp when task is done |
|
|
(org-blank-before-new-entry '((heading) (plain-list-item))) ;; prevent new line before new item |
|
|
(org-blank-before-new-entry '((heading) (plain-list-item))) ;; prevent new line before new item |
|
|
(org-src-tab-acts-natively t)) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
Custom keywords, depending on environment |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(use-package org |
|
|
|
|
|
:if *work_remote* |
|
|
|
|
|
:custom |
|
|
|
|
|
(org-todo-keywords |
|
|
|
|
|
'((sequence "OPEN" "TODO" "UNCLEAR" "|" "DONE" "IMPOSSIBLE" "CANCELLED")))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** org-agenda |
|
|
|
|
|
Sort agenda by deadline and priority |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(use-package org |
|
|
|
|
|
:ensure t |
|
|
|
|
|
:custom |
|
|
|
|
|
(org-agenda-sorting-strategy |
|
|
|
|
|
(quote |
|
|
|
|
|
((agenda deadline-up priority-down) |
|
|
|
|
|
(todo priority-down category-keep) |
|
|
|
|
|
(tags priority-down category-keep) |
|
|
|
|
|
(search category-keep))))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
Customize the org agenda |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
(defun my--org-skip-subtree-if-priority (priority) |
|
|
|
|
|
"Skip an agenda subtree if it has a priority of PRIORITY. |
|
|
|
|
|
|
|
|
|
|
|
PRIORITY may be one of the characters ?A, ?B, or ?C." |
|
|
|
|
|
(let ((subtree-end (save-excursion (org-end-of-subtree t))) |
|
|
|
|
|
(pri-value (* 1000 (- org-lowest-priority priority))) |
|
|
|
|
|
(pri-current (org-get-priority (thing-at-point 'line t)))) |
|
|
|
|
|
(if (= pri-value pri-current) |
|
|
|
|
|
subtree-end |
|
|
|
|
|
nil))) |
|
|
|
|
|
(use-package org |
|
|
|
|
|
:ensure t |
|
|
|
|
|
:custom |
|
|
|
|
|
|
|
|
(org-src-tab-acts-natively t) |
|
|
|
|
|
;;Sort agenda by deadline and priority |
|
|
|
|
|
(org-agenda-sorting-strategy |
|
|
|
|
|
(quote |
|
|
|
|
|
((agenda deadline-up priority-down) |
|
|
|
|
|
(todo priority-down category-keep) |
|
|
|
|
|
(tags priority-down category-keep) |
|
|
|
|
|
(search category-keep)))) |
|
|
(org-agenda-custom-commands |
|
|
(org-agenda-custom-commands |
|
|
'(("c" "Simple agenda view" |
|
|
'(("c" "Simple agenda view" |
|
|
((tags "PRIORITY=\"A\"" |
|
|
((tags "PRIORITY=\"A\"" |
|
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) |
|
|
|
|
|
(org-agenda-overriding-header "Hohe Priorität:"))) |
|
|
|
|
|
|
|
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) |
|
|
|
|
|
(org-agenda-overriding-header "Hohe Priorität:"))) |
|
|
(agenda "" |
|
|
(agenda "" |
|
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) |
|
|
|
|
|
(org-agenda-span 7) |
|
|
|
|
|
(org-agenda-start-on-weekday nil) |
|
|
|
|
|
(org-agenda-overriding-header "Nächste 7 Tage:"))) |
|
|
|
|
|
|
|
|
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)) |
|
|
|
|
|
(org-agenda-span 7) |
|
|
|
|
|
(org-agenda-start-on-weekday nil) |
|
|
|
|
|
(org-agenda-overriding-header "Nächste 7 Tage:"))) |
|
|
(alltodo "" |
|
|
(alltodo "" |
|
|
((org-agenda-skip-function '(or (my--org-skip-subtree-if-priority ?A) |
|
|
|
|
|
(org-agenda-skip-if nil '(scheduled deadline)))) |
|
|
|
|
|
(org-agenda-overriding-header "Sonstige Aufgaben:")))))))) |
|
|
|
|
|
|
|
|
((org-agenda-skip-function '(or (my--org-skip-subtree-if-priority ?A) |
|
|
|
|
|
(org-agenda-skip-if nil '(scheduled deadline)))) |
|
|
|
|
|
(org-agenda-overriding-header "Sonstige Aufgaben:")))))))) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
** languages |
|
|
|
|
|
|
|
|
** COMMENT languages |
|
|
Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
|
|
|
|
|
|
|
|
|
Elpaca cant find it, though it's built in org |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package ob-org |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:org |
|
|
|
|
|
org-babel-expand-body:org)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-python |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands (org-babel-execute:python)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-js |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands (org-babel-execute:js)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-shell |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:sh |
|
|
|
|
|
org-babel-expand-body:sh |
|
|
|
|
|
|
|
|
|
|
|
org-babel-execute:bash |
|
|
|
|
|
org-babel-expand-body:bash)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-emacs-lisp |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:emacs-lisp |
|
|
|
|
|
org-babel-expand-body:emacs-lisp)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-lisp |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:lisp |
|
|
|
|
|
org-babel-expand-body:lisp)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-gnuplot |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:gnuplot |
|
|
|
|
|
org-babel-expand-body:gnuplot)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-sqlite |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:sqlite |
|
|
|
|
|
org-babel-expand-body:sqlite)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-latex |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:latex |
|
|
|
|
|
org-babel-expand-body:latex)) |
|
|
|
|
|
|
|
|
|
|
|
(use-package ob-R |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:R |
|
|
|
|
|
org-babel-expand-body:R)) |
|
|
|
|
|
|
|
|
(use-package ob-python |
|
|
|
|
|
; :elpaca nil |
|
|
|
|
|
:defer t |
|
|
|
|
|
:after org |
|
|
|
|
|
; :ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:python)) |
|
|
|
|
|
|
|
|
(use-package ob-scheme |
|
|
|
|
|
:defer t |
|
|
|
|
|
:ensure org-contrib |
|
|
|
|
|
:commands |
|
|
|
|
|
(org-babel-execute:scheme |
|
|
|
|
|
org-babel-expand-body:scheme)) |
|
|
|
|
|
#+end_src |
|
|
#+end_src |
|
|
|
|
|
|
|
|
** habits |
|
|
|
|
|
|
|
|
** COMMENT habits |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(require 'org-habit) ;;TODO Lösung ohne require finden, scheint mir nicht ideal zu sein, nur um ein org-modul zu aktivieren |
|
|
(require 'org-habit) ;;TODO Lösung ohne require finden, scheint mir nicht ideal zu sein, nur um ein org-modul zu aktivieren |
|
|
;; (add-to-list 'org-modules "org-habit") |
|
|
;; (add-to-list 'org-modules "org-habit") |
|
@ -1272,19 +1283,7 @@ Set some languages and disable confirmation for evaluating code blocks C-c C-c |
|
|
** *TODO* |
|
|
** *TODO* |
|
|
[[https://github.com/nobiot/org-transclusion][org-transclusion]]? |
|
|
[[https://github.com/nobiot/org-transclusion][org-transclusion]]? |
|
|
|
|
|
|
|
|
** org-caldav |
|
|
|
|
|
Vorerst deaktiviert, Nutzen evtl. nicht vorhanden |
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
|
;;(use-package org-caldav |
|
|
|
|
|
;; :ensure t |
|
|
|
|
|
;; :config |
|
|
|
|
|
;; (setq org-caldav-url "https://nextcloud.cloudsphere.duckdns.org/remote.php/dav/calendars/marc" |
|
|
|
|
|
;; org-caldav-calendar-id "orgmode" |
|
|
|
|
|
;; org-caldav-inbox (expand-file-name "~/Archiv/Organisieren/caldav-inbox") |
|
|
|
|
|
;; org-caldav-files (concat MY--PATH_ORG_FILES "tasks"))) |
|
|
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** journal |
|
|
|
|
|
|
|
|
** COMMENT journal |
|
|
[[https://github.com/bastibe/org-journal][Source]] |
|
|
[[https://github.com/bastibe/org-journal][Source]] |
|
|
|
|
|
|
|
|
Ggf. durch org-roam-journal ersetzen |
|
|
Ggf. durch org-roam-journal ersetzen |
|
@ -1301,7 +1300,7 @@ Ggf. durch org-roam-journal ersetzen |
|
|
org-journal-enable-agenda-integration t))) |
|
|
org-journal-enable-agenda-integration t))) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
** org-roam |
|
|
|
|
|
|
|
|
** org-roam |
|
|
[[https://github.com/org-roam/org-roam][Github]] |
|
|
[[https://github.com/org-roam/org-roam][Github]] |
|
|
Um Headings innerhalb einer Datei zu verlinken: |
|
|
Um Headings innerhalb einer Datei zu verlinken: |
|
|
- org-id-get-create im Heading, |
|
|
- org-id-get-create im Heading, |
|
@ -1532,12 +1531,6 @@ If nil it defaults to `split-string-default-separators', normally |
|
|
|
|
|
|
|
|
*** TODO Verzeichnis außerhalb roam zum Archivieren (u.a. für erledigte Monatsmeldungen etc.) |
|
|
*** TODO Verzeichnis außerhalb roam zum Archivieren (u.a. für erledigte Monatsmeldungen etc.) |
|
|
* Programming |
|
|
* Programming |
|
|
** misc |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(use-package eldoc |
|
|
|
|
|
:diminish eldoc-mode |
|
|
|
|
|
:defer t) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
|
|
** Magit / Git |
|
|
** Magit / Git |
|
|
Little crash course in magit: |
|
|
Little crash course in magit: |
|
@ -1624,12 +1617,6 @@ TODO: if ruff active, sideline stops working |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(setq python-flymake-command '("ruff" "--quiet" "--stdin-filename=stdin" "-")) |
|
|
(setq python-flymake-command '("ruff" "--quiet" "--stdin-filename=stdin" "-")) |
|
|
#+end_src |
|
|
#+end_src |
|
|
** Eldoc Box |
|
|
|
|
|
Currently corfu-popupinfo displays eldoc in highlighted completion candidate. Maybe that's good enough. |
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
|
(use-package eldoc-box |
|
|
|
|
|
:ensure t) |
|
|
|
|
|
#+end_src |
|
|
|
|
|
** sideline |
|
|
** sideline |
|
|
show flymake errors on the right of code window |
|
|
show flymake errors on the right of code window |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
@ -1668,6 +1655,7 @@ For useful snippet either install yasnippet-snippets or get them from here |
|
|
With hippie expand I am able to use yasnippet and emmet at the same time with the same key. |
|
|
With hippie expand I am able to use yasnippet and emmet at the same time with the same key. |
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package hippie-exp |
|
|
(use-package hippie-exp |
|
|
|
|
|
:elpaca nil |
|
|
:defer t |
|
|
:defer t |
|
|
:bind |
|
|
:bind |
|
|
("C-<return>" . hippie-expand) |
|
|
("C-<return>" . hippie-expand) |
|
@ -1721,6 +1709,7 @@ With hippie expand I am able to use yasnippet and emmet at the same time with th |
|
|
** lisp |
|
|
** lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
#+BEGIN_SRC emacs-lisp |
|
|
(use-package elisp-mode |
|
|
(use-package elisp-mode |
|
|
|
|
|
:elpaca nil |
|
|
:defer t) |
|
|
:defer t) |
|
|
#+END_SRC |
|
|
#+END_SRC |
|
|
|
|
|
|
|
@ -1907,6 +1896,7 @@ deactivate |
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
#+begin_src emacs-lisp |
|
|
(use-package beancount |
|
|
(use-package beancount |
|
|
|
|
|
:elpaca nil |
|
|
:if *sys/linux* |
|
|
:if *sys/linux* |
|
|
:load-path "user-global/elisp/" |
|
|
:load-path "user-global/elisp/" |
|
|
; :ensure t |
|
|
; :ensure t |
|
|