       (org-redisplay-inline-images)))
   (defun me:babel-should-confirm (lang body)
     (not (member lang '( "plantuml" "ditaa" ))))
+  (defun me:org-capture ()
+    (interactive)
+    (setq org-capture-templates me:org-capture-templates)
+    (me:add-project-templates)
+    (counsel-org-capture))
   (defun me:search-notes ()
     (interactive)
-    (counsel-ag nil (expand-file-name "Notes" me:data-directory) "-i" nil)))
+    (let* ((dot-notes (expand-file-name "Notes" me:data-directory))
+           (proj-notes (me:project-path "Notes"))
+           (home-notes (expand-file-name "Notes" "~"))
+           (proj-notes-path (if (file-exists-p proj-notes) proj-notes ""))
+           (home-notes-path (if (file-exists-p home-notes) home-notes "")))
+      (counsel-rg nil dot-notes (concat " -- " home-notes-path " " proj-notes-path) nil))))
 
 (use-package evil-org
   :after ( org evil )

  :config
  (require 'evil-org-agenda)
  (evil-org-agenda-set-keys))

(use-package org-projectile
  :after ( projectile org )
  :demand t     ; required because use-package-always-defer is t
  :init
  :config
  (org-projectile-per-project)
  (setq org-projectile-per-project-filepath "todo.org")
  (setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
  (add-to-list 'org-capture-templates
               (org-projectile-project-todo-entry :capture-character "rn"
                                                  :capture-heading "Project Note"
                                                  :capture-template "* NOTE %i %?\n %a"))
  (add-to-list 'org-capture-templates
               (org-projectile-project-todo-entry :capture-character "rd"
                                                  :capture-heading "Project Todo")))

(use-package org-bullets
  :init


(use-package org
  :commands org-capture
  :general
  ("<f8> t" #'org-todo-list)
  ("<f8> a" #'org-agenda)
  ("<f8> <f8>" #'me:search-notes)
  ("<f8> c" #'me:org-capture)
  ("s-e" #'org-toggle-latex-fragment)
  (:prefix "C-c"
           "C-x"  '(:ignore t :which-key "Org→" ))
