org-grep
org-grep copied to clipboard
No results found?
Hi,
I'm excited to use org-grep, but every time I use org-grep
or org-grep-full
, a buffer is opened with no results found, e.g.:
#+TITLE: org (org-grep -i) browse [[elisp:(org-grep-display-edit)][edit]] [[elisp:(org-grep-display-tree)][tree]]
* Occurrences
I just installed it from MELPA, version 20151202.429. I'm using org-mode version 8.2.4.
Thanks for your help.
I encountered the same problem in Mac. If you are also a Mac user and defining org-grep-extensions with multiple extensions, could you please try the following code?
(defun org-grep-from-org-shell-command (regexp)
(if org-grep-directories
(concat "find -E "
(if org-grep-directories
(mapconcat #'identity org-grep-directories " ")
org-directory)
(and org-grep-extensions
(concat " -regex '.*("
(mapconcat #'regexp-quote org-grep-extensions "|")
")$'"))
" -print0 | xargs -0 grep " org-grep-grep-options
" -n -- " (shell-quote-argument regexp))
":"))
Sorry, I'm on Linux. I never got org-grep to work, so I ended up making this: https://github.com/alphapapa/helm-org-rifle It has functions to search directories of Org files. It works by opening them in Emacs buffers, though, so it may not be as fast for searching many separate files. In the future I may add some features to search directories using external tools like grep and git-grep.
It's OK :-) The proposed org-grep-from-org-shell-command
is modified version to execute find command with correct options, and also regex syntax was not valid for Mac environment. BTW, We have several methods for searching such as the keyword search in org-agenda (C-c a s), ag.el, helm-swoop for inbuffer. I'm new to helm-org-rifle
but It looks fancy for me!
On Mon, Aug 22, 2016 at 9:38 PM, Takaaki ISHIKAWA [email protected] wrote:
I'm new to helm-org-rifle but It looks fancy for me!
It's basically an enhanced version of helm-swoop for Org. Give it a try, it's very easy to use. ;)
@takaxp's function worked for me on OS X. 👍
Seems like this repo may not be supported, but should submit a PR :)
This issue is not occurring in my present environment, El Capitan/Emacs 25.2(NS build)/Org Mode 9.0, anymore. So I think we don't need a PR to update the original code and this issue could be closed if other people do not suffer from the problem.