Re: [PATCH] git.el: Add a git-grep command
Jakub Narebski <jnareb@gmail.com> writes:
Show 24 quoted lines
> On Fri, 22 Feb 2008, David Kågedal wrote:
>> Jakub Narebski <jnareb@gmail.com> writes:
>>> David Kågedal <davidk@lysator.liu.se> writes:
>>>
>>>> This works for me, but before including it someone else should try
>>>> it. It might only work in Emacs 22, for instance.
>>>
>>> emacs -batch -f batch-byte-compile git.el
>>> [...]
>>> While compiling toplevel forms in file git/contrib/emacs/git.el:
>>> !! File error (("Cannot open load file" "grep"))
>>> Done
>>> make: *** [git.elc] Error 1
>>>
>>> 1078:[emacs@git/contrib/emacs]# emacs --version
>>> GNU Emacs 21.4.1
>>
>> As I suspected. The problem is that the grep commands were rewritten
>> for Emacs 22, and lots of it can be reused. So to write a similar
>> command for Emacs 21 probably requires a bit more work. And since I
>> use Emacs 22 I'm not sure I will feel motivated enough...
>
> Could you make it at least conditional on the Emacs version used,
> or even better depending on the fact if "grep" 'library' is available?Sure. We could e.g. put it in its own file, git-grep.el.
> I'd like to be able to use git.el with my Emacs, even without some
> functionality. TIA.
Absolutely, I hope this doesn't get included until this is resolved.
--
David Kågedal