Compare commits
4 Commits
400faebf40
...
1625a6d7d4
| Author | SHA1 | Date | |
|---|---|---|---|
| 1625a6d7d4 | |||
| babb0f6f23 | |||
| a7dc559178 | |||
| 989d1017e9 |
83
init.el
83
init.el
@ -863,16 +863,6 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
(emacs-lisp . t)
|
(emacs-lisp . t)
|
||||||
(sql . t)))
|
(sql . t)))
|
||||||
|
|
||||||
;; Link shortcuts (some taken from the documentation)
|
|
||||||
|
|
||||||
(setq org-link-abbrev-alist
|
|
||||||
'(("wpen" . "https://en.wikipedia.org/wiki/")
|
|
||||||
("wpde" . "https://de.wikipedia.org/wiki/")
|
|
||||||
("ddg" . "https://duckduckgo.com/?q=%s")
|
|
||||||
("omap" . "https://nominatim.openstreetmap.org/search?q=%s&polygon=1")
|
|
||||||
("github" . "https://github.com/")
|
|
||||||
("gitlab" . "https://gitlab.com/")))
|
|
||||||
|
|
||||||
;; Show more context when revealing locations, to avoid incompletly revealed items.
|
;; Show more context when revealing locations, to avoid incompletly revealed items.
|
||||||
|
|
||||||
(setopt org-fold-show-context-detail '((default . lineage))))
|
(setopt org-fold-show-context-detail '((default . lineage))))
|
||||||
@ -886,12 +876,6 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
;; Hide drawers by default when cycling items
|
;; Hide drawers by default when cycling items
|
||||||
(add-hook 'org-cycle-hook #'org-cycle-hide-drawers)
|
(add-hook 'org-cycle-hook #'org-cycle-hide-drawers)
|
||||||
|
|
||||||
;; Statically color links indepedently of whether the file exists or
|
|
||||||
;; not (we could add different faces to highlight non-existing
|
|
||||||
;; files, but this turns out to be slow on Windows, and we can use
|
|
||||||
;; `org-lint' to check this when necessary)
|
|
||||||
(org-link-set-parameters "file" :face 'org-link)
|
|
||||||
|
|
||||||
;; File Apps
|
;; File Apps
|
||||||
|
|
||||||
(add-to-list 'org-file-apps '(directory . emacs))
|
(add-to-list 'org-file-apps '(directory . emacs))
|
||||||
@ -903,19 +887,6 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
(when (eq system-type 'cygwin)
|
(when (eq system-type 'cygwin)
|
||||||
(add-to-list 'org-file-apps '(t . "cygstart %s") t))
|
(add-to-list 'org-file-apps '(t . "cygstart %s") t))
|
||||||
|
|
||||||
;; Custom link types
|
|
||||||
(org-link-set-parameters "rfc" :follow #'db/org-rfc-open)
|
|
||||||
(org-link-set-parameters "cve" :follow #'(lambda (number)
|
|
||||||
(browse-url
|
|
||||||
(format "https://www.cve.org/CVERecord?id=CVE-%s"
|
|
||||||
number))))
|
|
||||||
(org-link-set-parameters "bookmark"
|
|
||||||
:follow #'db/org-bookmark-open
|
|
||||||
:store #'db/org-bookmark-store-link)
|
|
||||||
(when (eq system-type 'windows-nt)
|
|
||||||
(org-link-set-parameters "onenote" :follow #'db/org-onenote-open)
|
|
||||||
(org-link-set-parameters "outlook" :follow #'db/org-outlook-open))
|
|
||||||
|
|
||||||
;; Mark some org mode regions to be skipped by ispell
|
;; Mark some org mode regions to be skipped by ispell
|
||||||
(add-hook 'org-mode-hook #'endless/org-ispell)
|
(add-hook 'org-mode-hook #'endless/org-ispell)
|
||||||
|
|
||||||
@ -1012,11 +983,37 @@ split horizontally again, but this extra work should not matter much."
|
|||||||
|
|
||||||
(use-package ol
|
(use-package ol
|
||||||
:init (setopt org-link-keep-stored-after-insertion t
|
:init (setopt org-link-keep-stored-after-insertion t
|
||||||
org-link-search-must-match-exact-headline nil)
|
org-link-search-must-match-exact-headline nil
|
||||||
|
|
||||||
|
;; Link shortcuts (some taken from the documentation)
|
||||||
|
org-link-abbrev-alist '(("wpen" . "https://en.wikipedia.org/wiki/")
|
||||||
|
("wpde" . "https://de.wikipedia.org/wiki/")
|
||||||
|
("ddg" . "https://duckduckgo.com/?q=%s")
|
||||||
|
("omap" . "https://nominatim.openstreetmap.org/search?q=%s&polygon=1")
|
||||||
|
("github" . "https://github.com/")
|
||||||
|
("gitlab" . "https://gitlab.com/")))
|
||||||
:commands (org-store-link)
|
:commands (org-store-link)
|
||||||
:autoload (org-link-set-parameters)
|
:autoload (org-link-set-parameters)
|
||||||
:config (progn
|
:config (progn
|
||||||
|
|
||||||
|
;; Statically color links indepedently of whether the file exists or not (we could add
|
||||||
|
;; different faces to highlight non-existing files, but this turns out to be slow on
|
||||||
|
;; Windows, and we can use `org-lint' to check this when necessary)
|
||||||
|
(org-link-set-parameters "file" :face 'org-link)
|
||||||
|
|
||||||
|
;; Custom link types
|
||||||
|
(org-link-set-parameters "rfc" :follow #'db/org-rfc-open)
|
||||||
|
(org-link-set-parameters "cve" :follow #'(lambda (number)
|
||||||
|
(browse-url
|
||||||
|
(format "https://www.cve.org/CVERecord?id=CVE-%s"
|
||||||
|
number))))
|
||||||
|
(org-link-set-parameters "bookmark"
|
||||||
|
:follow #'db/org-bookmark-open
|
||||||
|
:store #'db/org-bookmark-store-link)
|
||||||
|
(when (eq system-type 'windows-nt)
|
||||||
|
(org-link-set-parameters "onenote" :follow #'db/org-onenote-open)
|
||||||
|
(org-link-set-parameters "outlook" :follow #'db/org-outlook-open))
|
||||||
|
|
||||||
;; Allow additional link targets
|
;; Allow additional link targets
|
||||||
(require 'ol-man) ; manpages
|
(require 'ol-man) ; manpages
|
||||||
(with-demoted-errors "Cannot load package: %s"
|
(with-demoted-errors "Cannot load package: %s"
|
||||||
@ -1628,32 +1625,36 @@ Note that this workaround is incomplete, as explained in this comment."
|
|||||||
:ensure t
|
:ensure t
|
||||||
:commands (magit-status
|
:commands (magit-status
|
||||||
magit-list-repositories)
|
magit-list-repositories)
|
||||||
|
:autoload (magit-repolist-column-ident
|
||||||
|
magit-repolist-column-flag
|
||||||
|
magit-repolist-column-unpulled-from-upstream
|
||||||
|
magit-repolist-column-unpushed-to-upstream
|
||||||
|
magit-repolist-column-version
|
||||||
|
magit-repolist-column-path)
|
||||||
:init (progn
|
:init (progn
|
||||||
(setopt magit-diff-refine-hunk nil
|
(setopt magit-diff-refine-hunk nil
|
||||||
magit-commit-show-diff nil
|
magit-commit-show-diff nil
|
||||||
|
magit-branch-direct-configure nil
|
||||||
|
|
||||||
magit-repository-directories '(("~/" . 0)
|
magit-repository-directories '(("~/" . 0)
|
||||||
("~/.emacs.d" . 0)
|
("~/.emacs.d" . 0)
|
||||||
("~/Documents/" . 3)
|
("~/Documents/" . 3)
|
||||||
("~/.local/share/dotfiles" . 0))
|
("~/.local/share/dotfiles" . 0))
|
||||||
|
|
||||||
magit-repolist-columns '(("Name" 20 magit-repolist-column-ident
|
magit-repolist-columns `(("Name" 20 ,#'magit-repolist-column-ident
|
||||||
())
|
())
|
||||||
("S" 1 magit-repolist-column-flag
|
("S" 1 ,#'magit-repolist-column-flag
|
||||||
())
|
())
|
||||||
("B<U" 3 magit-repolist-column-unpulled-from-upstream
|
("B<U" 3 ,#'magit-repolist-column-unpulled-from-upstream
|
||||||
((:right-align t)
|
((:right-align t)
|
||||||
(:sort <)))
|
(:sort <)))
|
||||||
("B>U" 3 magit-repolist-column-unpushed-to-upstream
|
("B>U" 3 ,#'magit-repolist-column-unpushed-to-upstream
|
||||||
((:right-align t)
|
((:right-align t)
|
||||||
(:sort <)))
|
(:sort <)))
|
||||||
("Version" 35 magit-repolist-column-version
|
("Version" 35 ,#'magit-repolist-column-version
|
||||||
((:sort magit-repolist-version<)))
|
((:sort magit-repolist-version<)))
|
||||||
("Path" 99 magit-repolist-column-path
|
("Path" 99 ,#'magit-repolist-column-path
|
||||||
()))
|
())))
|
||||||
|
|
||||||
magit-branch-direct-configure nil)
|
|
||||||
|
|
||||||
(when on-windows
|
(when on-windows
|
||||||
;; Increase performance by not automatically refreshing status buffers
|
;; Increase performance by not automatically refreshing status buffers
|
||||||
@ -3124,7 +3125,7 @@ eventuelly be set to nil, however)."
|
|||||||
(with-demoted-errors "Cannot activate `vlf': %s"
|
(with-demoted-errors "Cannot activate `vlf': %s"
|
||||||
(require 'vlf-setup))
|
(require 'vlf-setup))
|
||||||
|
|
||||||
;; Global Hooks
|
;; Global Hooks (XXX: should be moved outside of this init function)
|
||||||
|
|
||||||
(add-hook 'minibuffer-setup-hook 'cursor-intangible-mode)
|
(add-hook 'minibuffer-setup-hook 'cursor-intangible-mode)
|
||||||
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
|
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user