4 コミット

作成者 SHA1 メッセージ 日付
  Daniel bfcca623dc
Make checkdoc happy about db-hydras package 2ヶ月前
  Daniel 78b202aed7
Introduce hydra for managing links between Org mode items 2ヶ月前
  Daniel 77920dd9a2
Move cursor forward when inserting link to current clock 2ヶ月前
  Daniel afb06fca59
Free key binding for f12 2ヶ月前
3個のファイルの変更17行の追加8行の削除
  1. 3
    4
      init.el
  2. 1
    1
      site-lisp/db-hydras.el
  3. 13
    3
      site-lisp/db-org.el

+ 3
- 4
init.el ファイルの表示

@@ -175,15 +175,13 @@
175 175
   (bind-key "<XF86Back>" #'winner-undo)
176 176
   (bind-key "<XF86Forward>" #'winner-redo)
177 177
   (bind-key "<f10>" #'magit-status)
178
-  (bind-key "<f11>" #'db/org-find-links-to-current-item)
179
-  (bind-key "<f12>" #'db/helm-shortcuts)
180 178
   (bind-key "<f1>" #'db/run-or-hide-eshell)
181 179
   (bind-key "<f2>" #'hydra-feature-shortcuts/body)
182 180
   (bind-key "<f5>" (if (executable-find "ag") #'counsel-ag #'rgrep))
183 181
   (bind-key "<f6>" #'hydra-zoom/body)
184 182
   (bind-key "<f7>" #'dictcc)
185 183
   (bind-key "<f8>" #'bm-toggle)
186
-  (bind-key "<f9>" #'db/org-add-link-to-other-item)
184
+  (bind-key "<f9>" #'hydra-org-linking/body)
187 185
   (bind-key "<C-f8>" #'bm-next)
188 186
   (bind-key "<C-S-f8>" #'bm-previous)
189 187
   (bind-key "C-," #'mc/skip-to-previous-like-this)
@@ -733,7 +731,8 @@
733 731
              db/org-copy-template-for-periodic-task
734 732
              db/org-find-links-to-current-item
735 733
              db/org-add-link-to-other-item
736
-             db/org-add-link-to-current-clock))
734
+             db/org-add-link-to-current-clock
735
+             hydra-org-linking/body))
737 736
 
738 737
 (use-package org
739 738
   :pin "gnu"

+ 1
- 1
site-lisp/db-hydras.el ファイルの表示

@@ -80,4 +80,4 @@ the hydra will be generated.  See documentation of
80 80
 (db/define-feature-shortcuts-hydra)
81 81
 
82 82
 (provide 'db-hydras)
83
-;; db-hydras.el ends here
83
+;;; db-hydras.el ends here

+ 13
- 3
site-lisp/db-org.el ファイルの表示

@@ -729,9 +729,19 @@ in an Org Mode buffer or when the clock is not active."
729 729
     (user-error "No clocked-in task, aborting"))
730 730
   (save-mark-and-excursion
731 731
     (org-with-point-at org-clock-marker
732
-      (org-store-link nil t))
733
-    (pcase-let ((`(,location ,description) (cl-first org-stored-links)))
734
-      (org-insert-link nil location description))))
732
+      (org-store-link nil t)))
733
+  (pcase-let ((`(,location ,description) (cl-first org-stored-links)))
734
+    (org-insert-link nil location description)))
735
+
736
+(defhydra hydra-org-linking (:color blue :hint none)
737
+  "\nLinking between Org mode items.
738
+ _c_urrent clock              _o_ther item (current buffer or default Org file)
739
+ _b_acklinks to current item  _O_ther item (all text files)
740
+"
741
+  ("c" (db/org-add-link-to-current-clock))
742
+  ("o" (db/org-add-link-to-other-item nil))
743
+  ("O" (db/org-add-link-to-other-item t))
744
+  ("b" db/org-find-links-to-current-item))
735 745
 
736 746
 
737 747
 ;;; End

読み込み中…
キャンセル
保存