summaryrefslogtreecommitdiffhomepage
path: root/blog.org
diff options
context:
space:
mode:
Diffstat (limited to 'blog.org')
-rw-r--r--blog.org45
1 files changed, 25 insertions, 20 deletions
diff --git a/blog.org b/blog.org
index faea694..e259828 100644
--- a/blog.org
+++ b/blog.org
@@ -138,8 +138,8 @@
(advice-add 'org-static-blog-generate-post-path :override
#'jao-org-static-post-path)
- :bind (("H-s-b" . jao-hydra-org-blog/body)
- :map org-mode-map (("C-c B" . jao-hydra-org-blog/body))))
+ :bind (("H-s-b" . jao-transient-org-blog)
+ :map org-mode-map (("C-c B" . jao-transient-org-blog))))
#+end_src
* Commands
*** New entries
@@ -228,23 +228,28 @@
(interactive)
(jao-org-blog-publish t))
#+end_src
-* Hydras
+* Transient
#+begin_src emacs-lisp
- (pretty-hydra-define jao-hydra-org-blog (:color blue :quit-key "q")
- ("Insert"
- (("s" (insert jao-org-static-blog--prev-beg) "preview begin")
- ("S" (insert jao-org-static-blog--prev-end) "preview end")
- ("t" jao-org-static-blog-update-date "update date"))
- "Edit"
- (("n" jao-org-static-blog-create-new-post "create post")
- ("d" jao-org-static-blog-create-new-draft "create draft")
- ("e" jao-org-static-blog-edit-draft "edit draft"))
- "Publish"
- (("D" jao-org-static-blog-publish-draft "publish draft")
- ("f" jao-org-blog-publish-file "publish single file")
- ("p" jao-org-blog-publish "publish all")
- ("r" jao-org-blog-republish "republish"))))
-
- (major-mode-hydra-define+ org-mode nil
- ("Utilities" (("b" jao-hydra-org-blog/body "Blog ops"))))
+ (defun jao-org-static-prev-begin ()
+ (interactive)
+ (insert jao-org-static-blog--prev-beg))
+
+ (defun jao-org-static-prev-end ()
+ (interactive)
+ (insert jao-org-static-blog--prev-end))
+
+ (jao-transient-major-mode+ org
+ ["Insert blog snippet"
+ ("s" "preview begin" jao-org-static-prev-begin)
+ ("S" "preview end" jao-org-static-prev-end)
+ ("T" "update date" jao-org-static-blog-update-date)]
+ ["Edit blog"
+ ("n" "create post" jao-org-static-blog-create-new-post)
+ ("d" "create draft" jao-org-static-blog-create-new-draft)
+ ("e" "edit draft" jao-org-static-blog-edit-draft)]
+ ["Publish blog"
+ ("D" "publish draft" jao-org-static-blog-publish-draft)
+ ("f" "publish single file" jao-org-blog-publish-file)
+ ("p" "publish all" jao-org-blog-publish)
+ ("r" "republish" jao-org-blog-republish)])
#+end_src