help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shortcut to compile "highlighted Text/Tag"


From: Bob Proulx
Subject: Re: Shortcut to compile "highlighted Text/Tag"
Date: Fri, 19 Apr 2013 22:04:36 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Rami A wrote:
> I tried grep as you suggested and it did actually work.
> However, it is not as usable as gid.
> When using grep the results are shown as a non-interactive buffer.

Well...  It is grep, not gid.

> When using gid and mkid method I get a buffer with all results,
> files the token is found in and line numbers. More, I can click on
> each results and it will take me to that file and line directly.

I am seeing some strange things in this thread.  Let me comment.

  Rami> Symbol's function definition is void: gid
  Dan> Sounds like you don't have gid.el installed.
  Rami> I agree, I have not installed gid.el.

That seems like a problem.  In order to use it you must install it.
You talked as if you had installed it.  You talked about binding it to
a function key.  We would assume that you had loaded it.

Dan really tried hard to help at that point.  Since you didn't want to
use gid he offered an alternative.  He suggested C-u M-x grep.  Giving
grep an argument has it pre-fill in the word at that point.  I would
also point out M-x lgrep is similar but slightly different.  The lgrep
command prompts separately for the pattern to search for and the files
to search for and tries to be intelligent about defaulting to the
things you would want in the context called.  Try lgrep.

But then after telling us yesterday that you didn't want to load gid
today you are back talking about how good it is.  If you want to use
gid then you *must* load it.  There is no alternative.  The bits will
not magically appear.  If you want to use it then you must load it.

And then there is Kevin Rodgers who yesterday made a great suggestion
and the voluteer of some lisp code to do what you wanted.  I think you
didn't see it.

  http://lists.gnu.org/archive/html/help-gnu-emacs/2013-04/msg00374.html

That code grabs the word at the point just as you asked for and then
calls the compile command.  It seems to me that it wouild be perfect.
(It would be nice if it used that word as the default and prompted
like C-u M-x grep does.  But I it was a nice gift as it is.)

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]