Explorar el Código

Removed unneeded delayed load to hugo-goto-draft

Why was it even locked behind an `after! org`? Makes no sense.
Florian Dormont hace 2 años
padre
commit
a69624efb1
Se han modificado 1 ficheros con 17 adiciones y 18 borrados
  1. 17 18
      config.org

+ 17 - 18
config.org

@@ -652,25 +652,24 @@ project folder. There is also a check to detect first the presence of a config
 file before attmepting to invoke hugo to give a sensible message.
 
 #+BEGIN_SRC emacs-lisp
-(after! org
-  (defun chicken/hugo-goto-draft ()
-    "Opens an ivy-powered search helper to quickly jump on a draft
+(defun chicken/hugo-goto-draft ()
+  "Opens an ivy-powered search helper to quickly jump on a draft
 if the current project is the root of a Hugo-powered site."
-    (interactive)
-    (if (file-exists-p! "config.toml" (projectile-project-root))
-        (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
-                  :require-match t
-                  :history 'chicken/hugo-goto-history
-                  :action (lambda (file)
-                            (with-ivy-window
-                              (when file
-                                (let*
-                                    ((root (projectile-project-root))
-                                     (full-file (concat root file)))
-                                  (find-file full-file)))))
-                  :unwind #'counsel-delete-process
-                  :caller 'chicken/hugo-goto-draft)
-      (message "The current project doesn't have a config.toml in the root directory."))))
+  (interactive)
+  (if (file-exists-p! "config.toml" (projectile-project-root))
+      (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
+                :require-match t
+                :history 'chicken/hugo-goto-history
+                :action (lambda (file)
+                          (with-ivy-window
+                            (when file
+                              (let*
+                                  ((root (projectile-project-root))
+                                   (full-file (concat root file)))
+                                (find-file full-file)))))
+                :unwind #'counsel-delete-process
+                :caller 'chicken/hugo-goto-draft)
+    (message "The current project doesn't have a config.toml in the root directory.")))
 #+END_SRC
 ** PROJ Convert GIF to videos
 I like GIFs, that's a fact. But neither your bandwidth nor your CPU will