 (defun meain/open-note ()
   "Quick open a note from `.notes` directory."
   (interactive)
-  (ivy-read "Choose note: "
-            (meain/nested-list-dir "~/.notes")
-            :action (lambda (x)
-                      (find-file (concatenate 'string "~/.notes/" x)))))
+  (find-file (concatenate 'string
+                          "~/.notes/"
+                          (completing-read "Choose note: "
+                                           (meain/nested-list-dir "~/.notes")))))
 (evil-leader/set-key "a N" 'meain/open-note)
 
 ;; dasht docs

                                               (car (split-string (buffer-string)
                                                                  "\n")))
                   ""))))
(defun meain/vime (&optional listitems)
  "Load a random file inside ~/.cache/vime dir.  Used as a temp notes dir.
Pass in `LISTITEMS to decide if you wanna create a new item or search for existing items."
  (interactive "P")
  (if listitems
      (ivy-read "Choose file: "
                (mapcar (lambda (x)
                          (meain/vime-name-append (car x)))
                        (sort (remove-if-not #'(lambda (x)
                                                 (eq (nth 1 x) nil))
                                             (directory-files-and-attributes "~/.cache/vime"))
                              #'(lambda (x y)
                                  (time-less-p (nth 6 y)
                                               (nth 6 x)))))
                :preselect (ivy-thing-at-point):require-match
                t
                :action (lambda (x)
                          (find-file (concat "~/.cache/vime/"
                                             (car (split-string x))))):caller'meain/vime-open)
    (progn
      (find-file (concat "~/.cache/vime/_"
                         (substring (uuid-string)

                                                           (split-string elfeed-search-filter))
                                            " "))
      (elfeed-search-update :force)
      (let ((site (completing-read "Look for: "
                                   (remove-if (lambda (x)
                                                (equalp x 'unread))
                                              (delete-dups (flatten-list (cl-list* (with-current-buffer "*elfeed-search*"
                                                                                     (cl-loop for
                                                                                              entry
                                                                                              in
                                                                                              elfeed-search-entries
                                                                                              collect
                                                                                              (cl-struct-slot-value (type-of (elfeed-entry-feed (car elfeed-search-entries)))
                                                                                                                    'title
                                                                                                                    (elfeed-entry-feed entry)))))))))))
        ;; Need \s- insted of just a simple space because elfeed has issues with space in title
        (setq elfeed-search-filter (concatenate 'string
                                                elfeed-search-filter
                                                " ="
                                                (mapconcat 'identity
                                                           (split-string site)
                                                           "\\s-")))
        (elfeed-search-update :force)
        (evil-goto-first-line)))
    (setq-default elfeed-search-filter "@2-months-ago +unread ")
    (setq elfeed-use-curl t)
    (setq elfeed-curl-max-connections 10)
