aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-09-02 13:45:55 +1000
committerYuchen Pei <id@ypei.org>2023-09-02 13:45:55 +1000
commit7e6e98e5683f2b0d8d335f53100b6b3623823df3 (patch)
treecc84f2590da859003ebec0562eee42cd1122b847 /emacs/.emacs.d/init
parente07a2aee70031e7d4b1c43208867e1e716209a53 (diff)
A few more org utilities, and small fixes in editing / goto places
added my-org-swap-referral-with-headline added my-org-clean-up-entry fixed avy binding org capture todo: contain initial content (if any) in an example block
Diffstat (limited to 'emacs/.emacs.d/init')
-rw-r--r--emacs/.emacs.d/init/ycp-complete.el3
-rw-r--r--emacs/.emacs.d/init/ycp-editing.el7
-rw-r--r--emacs/.emacs.d/init/ycp-gnus.el1
-rw-r--r--emacs/.emacs.d/init/ycp-org.el10
4 files changed, 16 insertions, 5 deletions
diff --git a/emacs/.emacs.d/init/ycp-complete.el b/emacs/.emacs.d/init/ycp-complete.el
index 1c9e7ef..c527329 100644
--- a/emacs/.emacs.d/init/ycp-complete.el
+++ b/emacs/.emacs.d/init/ycp-complete.el
@@ -194,7 +194,7 @@
(my-package imenu
(:delay 5)
- (my-keybind global-map "M-s i" #'imenu)
+ (my-keybind global-map "M-g i" #'imenu)
)
;;; consult
@@ -219,7 +219,6 @@
"C-x b" #'consult-buffer
"C-z" #'consult-buffer
"C-x l" #'consult-locate
- "M-g M-g" #'consult-goto-line
"M-K" #'consult-keep-lines ; M-S-k is similar to M-S-5 (M-%)
"M-F" #'consult-focus-lines ; same principle
"M-s M-b" #'consult-buffer
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el
index 5634f86..65189de 100644
--- a/emacs/.emacs.d/init/ycp-editing.el
+++ b/emacs/.emacs.d/init/ycp-editing.el
@@ -116,9 +116,14 @@
(my-package avy
(:install t)
(:delay 15)
- (my-keybind global-map "C-." #'avy-goto-char-timer)
+ (my-keybind global-map
+ "C-." #'avy-goto-char-timer
+ "M-g M-g" #'avy-goto-line)
(setq avy-keys '(97 115 100 102 103 104 106 107 108)))
+(my-package flyspell
+ (my-keybind flyspell-mode-map "C-." nil))
+
(my-package pyim
(:delay 30)
(:install t))
diff --git a/emacs/.emacs.d/init/ycp-gnus.el b/emacs/.emacs.d/init/ycp-gnus.el
index 4c68f2b..e104d25 100644
--- a/emacs/.emacs.d/init/ycp-gnus.el
+++ b/emacs/.emacs.d/init/ycp-gnus.el
@@ -182,6 +182,7 @@
(:delay 5)
(bbdb-initialize 'gnus 'message)
(bbdb-mua-auto-update-init 'gnus 'message)
+ (setq bbdb-dedicated-window t)
(setq bbdb-message-all-addresses t)
(setq bbdb-mua-pop-up-window-size .15)
(setq bbdb-new-mails-primary nil)
diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el
index 81f30ee..2f93b3d 100644
--- a/emacs/.emacs.d/init/ycp-org.el
+++ b/emacs/.emacs.d/init/ycp-org.el
@@ -230,7 +230,12 @@
:Referral: %a
:END:
-%i
+%(unless (string-empty-p \"%i\")
+ (format
+ \"#+begin_example
+%s
+#+end_example\"
+ (org-escape-code-in-string \"%i\")))
"
:prepend t)
("ya" "Blank audio" entry
@@ -296,7 +301,8 @@
(setq org-use-speed-commands t)
(setq org-speed-commands
'(("User commands")
- ("g" . org-delete-property)
+ ("T" . my-org-swap-referral-with-headline)
+ ("D" . my-org-clean-up-entry)
("W" . my-org-refile-logbook)
("+" . my-org-vote-up)
("-" . my-org-vote-down)