diff options
author | Marc Coquand <marc@coquand.email> | 2024-11-29 16:11:08 +0200 |
---|---|---|
committer | Marc Coquand <marc@coquand.email> | 2024-11-29 16:11:08 +0200 |
commit | 9c3c0d5d711ff5636fc32b4ba502ce4f6747e046 (patch) | |
tree | 9d108059c0d75265b0a0f8f4c42d21bd637b6d8f /home/dots/.emacs | |
parent | c77cab0847ef2c611ce99bf909247e59180c1840 (diff) | |
download | guix-9c3c0d5d711ff5636fc32b4ba502ce4f6747e046.tar.gz guix-9c3c0d5d711ff5636fc32b4ba502ce4f6747e046.tar.bz2 guix-9c3c0d5d711ff5636fc32b4ba502ce4f6747e046.zip |
.
Diffstat (limited to 'home/dots/.emacs')
-rw-r--r-- | home/dots/.emacs | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index 7f3dee4..6640f7a 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -808,6 +808,10 @@ (ido-decorations '(" " " " " " " , ..." " [" "] " " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]"))) +(use-package completion + :custom + (completion-styles '(substring basic partial-completion emacs22))) + (use-package calendar :defer t :bind @@ -1000,8 +1004,40 @@ :custom (org-id-link-to-org-use-id 'create-if-interactive-and-no-custom-id)) +(use-package bookmark + :after (org org-id) + :init + (defun handle-org-bookmark (bookmark) + "Handle bookmarks which have Org links." + (org-link-open-from-string (alist-get 'org-link bookmark))) + + (defun bookmark-org-link-to-here () + "Bookmark the org link that `org-store-link' would make." + (interactive) + (when-let ((link (substring-no-properties (org-store-link nil)))) + `(,(when (string-match org-link-bracket-re link) + (match-string-no-properties 2 link)) + (org-link . ,link) + (handler . handle-org-bookmark) + (position . ,(point)) + ,@(when buffer-file-name + `((filename . ,(abbreviate-file-name buffer-file-name))))))) + + (defun use-org-link-for-bookmarks () + "Configure bookmarks to current buffer to use Org links." + (interactive) + (setq-local bookmark-make-record-function #'bookmark-org-link-to-here)) + :hook + ((org-mode . use-org-link-for-bookmarks))) + (use-package ol :after (org-compat org-macs org-fold) + :init + ;; Allows creating keyboard macros in the text + ;; <kbd:M-x eshell RET make RET> + (org-link-set-parameters + "kbd" + :follow (lambda (kmacro) (kmacro-call-macro nil t nil (kbd kmacro)))) :bind (("C-c l" . org-store-link))) @@ -1091,9 +1127,6 @@ (use-package autorevert :diminish auto-revert-mode) -(use-package org-agenda - :demand t) - (use-package appt :after (org-agenda dbus) :demand t |