jdee
jdee copied to clipboard
jdee-find-dlg default directory
My Emacs version:
GNU Emacs 25.3.1
My JDEE version (elpa package date):
2.4.2
My JDK version:
1.8
My Operating System (Linux/OSX/Windows X/Other):
Mac OSX
Stacktrace (if applicable):
How to reproduce (if applicable):
M-x jdee-find-dlg
Other info you consider could help to fix it:
I did both a jdee-find and a jdee-find-dlg I entered the test phrase I was looking for and it worked with jdee-find but, not with jdee-find-dlg. Then I realized I was missing a directory in the dlg search. It would be nice if both functions have similar behaviors. Adding a default directory to the jdee-find-dlg would be nice.
Here is the result from my searches:
jdee-find
-- mode: grep; default-directory: "/java/" -- Grep started at Sun Nov 25 18:58:14
find /java/ -name "*.java" -type f | xargs grep -i -n "println" /dev/null /java//Hello.java:5: System.out.println("Hello World!"); /java//HelloWorld.java:15: System.out.println(ctx.getEnvironment());
Grep finished (matches found) at Sun Nov 25 18:58:14
jdee-find-dlg
-- mode: grep; default-directory: "/opt/rubbish/bin/java/" -- Grep started at Sun Nov 25 18:59:47
find -name "*.java" -type f | xargs grep -i -n "println" /dev/null find: illegal option -- n usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression] find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
Grep finished (matches found) at Sun Nov 25 18:59:48
Summary
by adding a default file path on '.' both commands would be similar.
This works find . -name "*.java" -type f | xargs grep -i -n "println" /dev/null
Notice I have added a '.' to indicated the directory the jdee-find-dlg function should default to as jdee-find does.