]> njoseph.me Git - nimcoon.git/blobdiff - nimcoon.el
Fix all recent bugs. Shift to Invidious API.
[nimcoon.git] / nimcoon.el
index c238fc144a1345d69c02e87db31796ce7e16d49f..90f15e4b23bdbd138add01c4b9bd569e56f1b27e 100644 (file)
@@ -1,5 +1,6 @@
 ;;; nimcoon.el -*- lexical-binding: t; -*-
 ;;;
+;;; Commentary
 ;;; Usage in Doom Emacs
 ;;; Place or symlink the file into ~/.doom.d/
 ;;; (load! "nimcoon")
   "Search by QUERY and play in NimCoon."
   (call-process "nimcoon" nil 0 nil args query))
 
+(defun nimcoon-search(args query)
+  "Search by QUERY with the given ARGS."
+  (with-output-to-temp-buffer "*NimCoon search results*"
+    (call-process "nimcoon" nil "*NimCoon search results*" t args query)
+    (with-current-buffer "*NimCoon search results*"
+      (org-mode))))
+
 ;;; Interactive functions
 (defun nimcoon-feeling-lucky-music(query)
   (interactive "sSearch query: ")
   (interactive)
   (shell-command "kill `pgrep nimcoon` `pgrep mpv` `pgrep vlc`"))
 
-(defun nimcoon-search(args query)
-  "Search by QUERY with the given ARGS."
-  (with-output-to-temp-buffer "*NimCoon search results*"
-    (call-process "nimcoon" nil "*NimCoon search results*" t args query)
-    (with-current-buffer "*NimCoon search results*"
-      (org-mode))))
-
 (defun nimcoon-search-video(query)
   "Search for a video by QUERY."
   (interactive "sSearch query: ")
@@ -72,3 +73,5 @@
        :desc "Kill"  "k" #'nimcoon-kill-background-processes
        :desc "Video" "v" #'nimcoon-feeling-lucky-video
        :desc "Music" "m" #'nimcoon-feeling-lucky-music))
+
+;;; nimcoon.el ends here