]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Add snw and sn
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Nov 2018 14:51:44 +0000 (15:51 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 9 Nov 2018 14:51:44 +0000 (15:51 +0100)
I have the same functionality in bash.
What are notes worth if they are not easily accessible?

Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index bb1619d8c46d8f6d6ed2b7a87f65f4f1a27272b3..15bee170bcf1337d56bde47f35ec1795890c3dd6 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -1151,6 +1151,24 @@ Get reveal.js as well:
     (shell-command "osascript -e \'tell app \"Keyboard Maestro Engine\" to do script \"screen-start-cd-to-clipboard\"'")
     )
 #+END_SRC
+** search notes
+[2018-02-09 Fri 10:57]
+
+Your notes are more useful if you can easily search them!
+
+#+BEGIN_SRC emacs-lisp :tangle yes
+  (defun snw ()
+    "Search work notes."
+    (interactive)
+    (lgrep (read-string "search for regex:") "work*.org" "~/workorg"))
+
+  (defun sn ()
+    "Search notes."
+    (interactive)
+    (lgrep (read-string "search for regex:") "notes.org" "~/org"))
+
+#+END_SRC
+
 ** Some initial languages we want org-babel to support
 
 #+BEGIN_SRC emacs-lisp :tangle yes