* Problem with grep in Emacs 23.2 @ 2010-09-06 11:32 Shenli Zhu 2010-09-06 20:04 ` Peter Dyballa 0 siblings, 1 reply; 9+ messages in thread From: Shenli Zhu @ 2010-09-06 11:32 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 647 bytes --] Hi, In Emacs 23.1, to grep, (1) M-x grep, (2) change grep-command "grep -i -nH -e \"re\" -r \"/home/username/\" --include=\"*.*\"" to what I want. All works well. But in Emacs 23.2, after step(1), Emacs will fork a grep subprocess which take all CPU resource and I have to kill it. I trace the code, there is a function grep-compute-defaults, seems to check the system info and set some initial values. It will call grep-probe to run some small test(grep English in the file Hello in Emacs). But my grep-command cause Emacs/grep-probe into a non responsive state. I don't want to change grep-command, how can I skip grep-probe? Thanks, Davy [-- Attachment #2: Type: text/html, Size: 753 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-06 11:32 Problem with grep in Emacs 23.2 Shenli Zhu @ 2010-09-06 20:04 ` Peter Dyballa 2010-09-07 0:22 ` Shenli Zhu 0 siblings, 1 reply; 9+ messages in thread From: Peter Dyballa @ 2010-09-06 20:04 UTC (permalink / raw) To: Shenli Zhu; +Cc: help-gnu-emacs Am 06.09.2010 um 13:32 schrieb Shenli Zhu: > (2) change grep-command "grep -i -nH -e \"re\" -r \"/home/username/\" > --include=\"*.*\"" to what I want. Does this work from the command line? (I'd use ' instead of \" to prevent the shell from expanding the meta-characters ``*´´ or ``.´´, which could cause the failure you observe.) -- Greetings Pete Spam will be a thing of the past in two years' time. – Bill Gates, Jan 2004 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-06 20:04 ` Peter Dyballa @ 2010-09-07 0:22 ` Shenli Zhu 2010-09-07 0:24 ` Lennart Borgman 0 siblings, 1 reply; 9+ messages in thread From: Shenli Zhu @ 2010-09-07 0:22 UTC (permalink / raw) To: Peter Dyballa; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 889 bytes --] Hi Peter, Do you mean the grep-command I set should be runnable in shell? I just use grep-command to store the grep template, so it cannot be run in shell. Why we need probe-grep? To test whether grep exists and whether its function works correctly? Can I skip it? Thanks On Tue, Sep 7, 2010 at 4:04 AM, Peter Dyballa <Peter_Dyballa@web.de> wrote: > > Am 06.09.2010 um 13:32 schrieb Shenli Zhu: > > > (2) change grep-command "grep -i -nH -e \"re\" -r \"/home/username/\" >> --include=\"*.*\"" to what I want. >> > > > Does this work from the command line? (I'd use ' instead of \" to prevent > the shell from expanding the meta-characters ``*´´ or ``.´´, which could > cause the failure you observe.) > > -- > Greetings > > Pete > > Spam will be a thing of the past in two years' time. > – Bill Gates, Jan 2004 > > [-- Attachment #2: Type: text/html, Size: 1439 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-07 0:22 ` Shenli Zhu @ 2010-09-07 0:24 ` Lennart Borgman 2010-09-07 1:05 ` Shenli Zhu 0 siblings, 1 reply; 9+ messages in thread From: Lennart Borgman @ 2010-09-07 0:24 UTC (permalink / raw) To: Shenli Zhu; +Cc: help-gnu-emacs On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > Hi Peter, > > Do you mean the grep-command I set should be runnable in shell? I just use > grep-command to store the grep template, so it cannot be run in shell. > > Why we need probe-grep? To test whether grep exists and whether its function > works correctly? Can I skip it? probe-grep tries to find out what grep program you actually use and what it can do. So, yes, you can skip it if you know what the program can do. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-07 0:24 ` Lennart Borgman @ 2010-09-07 1:05 ` Shenli Zhu 2010-09-07 1:24 ` Lennart Borgman 0 siblings, 1 reply; 9+ messages in thread From: Shenli Zhu @ 2010-09-07 1:05 UTC (permalink / raw) To: Lennart Borgman; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 711 bytes --] Hi, Lennart, how to skip grep-probe/grep-compute-defaults (add hook or change variable)? Thanks On Tue, Sep 7, 2010 at 8:24 AM, Lennart Borgman <lennart.borgman@gmail.com>wrote: > On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > > Hi Peter, > > > > Do you mean the grep-command I set should be runnable in shell? I just > use > > grep-command to store the grep template, so it cannot be run in shell. > > > > Why we need probe-grep? To test whether grep exists and whether its > function > > works correctly? Can I skip it? > > > probe-grep tries to find out what grep program you actually use and > what it can do. So, yes, you can skip it if you know what the program > can do. > [-- Attachment #2: Type: text/html, Size: 1112 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-07 1:05 ` Shenli Zhu @ 2010-09-07 1:24 ` Lennart Borgman 2010-09-07 1:50 ` Shenli Zhu 0 siblings, 1 reply; 9+ messages in thread From: Lennart Borgman @ 2010-09-07 1:24 UTC (permalink / raw) To: Shenli Zhu; +Cc: help-gnu-emacs Use customize to set the needed values, for example: M-x customize RET grep-use-null-device RET On Tue, Sep 7, 2010 at 3:05 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > Hi, Lennart, how to skip grep-probe/grep-compute-defaults (add hook or > change variable)? > > Thanks > > On Tue, Sep 7, 2010 at 8:24 AM, Lennart Borgman <lennart.borgman@gmail.com> > wrote: >> >> On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: >> > Hi Peter, >> > >> > Do you mean the grep-command I set should be runnable in shell? I just >> > use >> > grep-command to store the grep template, so it cannot be run in shell. >> > >> > Why we need probe-grep? To test whether grep exists and whether its >> > function >> > works correctly? Can I skip it? >> >> >> probe-grep tries to find out what grep program you actually use and >> what it can do. So, yes, you can skip it if you know what the program >> can do. > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-07 1:24 ` Lennart Borgman @ 2010-09-07 1:50 ` Shenli Zhu 2010-09-07 7:28 ` Shenli Zhu [not found] ` <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org> 0 siblings, 2 replies; 9+ messages in thread From: Shenli Zhu @ 2010-09-07 1:50 UTC (permalink / raw) To: Lennart Borgman; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 1432 bytes --] Lennart, thank you, I set grep-use-null-device to nil, but the problem still happen. Maybe I shall trace the code to find how to avoid grep-probe. There is no switch to turn off (grep-compute-defaults) in grep, because different versions of grep. But I think most of people work on Linux and Gnu grep. So why not have a switch tell it do not compute defaults? On Tue, Sep 7, 2010 at 9:24 AM, Lennart Borgman <lennart.borgman@gmail.com>wrote: > Use customize to set the needed values, for example: > > M-x customize RET grep-use-null-device RET > > > On Tue, Sep 7, 2010 at 3:05 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > > Hi, Lennart, how to skip grep-probe/grep-compute-defaults (add hook or > > change variable)? > > > > Thanks > > > > On Tue, Sep 7, 2010 at 8:24 AM, Lennart Borgman < > lennart.borgman@gmail.com> > > wrote: > >> > >> On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> > wrote: > >> > Hi Peter, > >> > > >> > Do you mean the grep-command I set should be runnable in shell? I just > >> > use > >> > grep-command to store the grep template, so it cannot be run in shell. > >> > > >> > Why we need probe-grep? To test whether grep exists and whether its > >> > function > >> > works correctly? Can I skip it? > >> > >> > >> probe-grep tries to find out what grep program you actually use and > >> what it can do. So, yes, you can skip it if you know what the program > >> can do. > > > > > [-- Attachment #2: Type: text/html, Size: 2146 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Problem with grep in Emacs 23.2 2010-09-07 1:50 ` Shenli Zhu @ 2010-09-07 7:28 ` Shenli Zhu [not found] ` <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 9+ messages in thread From: Shenli Zhu @ 2010-09-07 7:28 UTC (permalink / raw) To: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 1622 bytes --] Set grep-use-null-device to t, problem solved. On Tue, Sep 7, 2010 at 9:50 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > Lennart, thank you, > > I set grep-use-null-device to nil, but the problem still happen. > > Maybe I shall trace the code to find how to avoid grep-probe. There is no > switch to turn off (grep-compute-defaults) in grep, because different > versions of grep. But I think most of people work on Linux and Gnu grep. So > why not have a switch tell it do not compute defaults? > > > On Tue, Sep 7, 2010 at 9:24 AM, Lennart Borgman <lennart.borgman@gmail.com > > wrote: > >> Use customize to set the needed values, for example: >> >> M-x customize RET grep-use-null-device RET >> >> >> On Tue, Sep 7, 2010 at 3:05 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: >> > Hi, Lennart, how to skip grep-probe/grep-compute-defaults (add hook or >> > change variable)? >> > >> > Thanks >> > >> > On Tue, Sep 7, 2010 at 8:24 AM, Lennart Borgman < >> lennart.borgman@gmail.com> >> > wrote: >> >> >> >> On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> >> wrote: >> >> > Hi Peter, >> >> > >> >> > Do you mean the grep-command I set should be runnable in shell? I >> just >> >> > use >> >> > grep-command to store the grep template, so it cannot be run in >> shell. >> >> > >> >> > Why we need probe-grep? To test whether grep exists and whether its >> >> > function >> >> > works correctly? Can I skip it? >> >> >> >> >> >> probe-grep tries to find out what grep program you actually use and >> >> what it can do. So, yes, you can skip it if you know what the program >> >> can do. >> > >> > >> > > [-- Attachment #2: Type: text/html, Size: 2631 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org>]
* Re: Problem with grep in Emacs 23.2 [not found] ` <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org> @ 2010-10-01 2:04 ` David Combs 0 siblings, 0 replies; 9+ messages in thread From: David Combs @ 2010-10-01 2:04 UTC (permalink / raw) To: help-gnu-emacs In article <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org>, Shenli Zhu <zhushenli2@gmail.com> wrote: >-=-=-=-=-=- > >Set grep-use-null-device to t, problem solved. > >On Tue, Sep 7, 2010 at 9:50 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: > >> Lennart, thank you, >> >> I set grep-use-null-device to nil, but the problem still happen. >> >> Maybe I shall trace the code to find how to avoid grep-probe. There is no >> switch to turn off (grep-compute-defaults) in grep, because different >> versions of grep. But I think most of people work on Linux and Gnu grep. So >> why not have a switch tell it do not compute defaults? >> >> >> On Tue, Sep 7, 2010 at 9:24 AM, Lennart Borgman <lennart.borgman@gmail.com >> > wrote: >> >>> Use customize to set the needed values, for example: >>> >>> M-x customize RET grep-use-null-device RET >>> >>> >>> On Tue, Sep 7, 2010 at 3:05 AM, Shenli Zhu <zhushenli2@gmail.com> wrote: >>> > Hi, Lennart, how to skip grep-probe/grep-compute-defaults (add hook or >>> > change variable)? >>> > >>> > Thanks >>> > >>> > On Tue, Sep 7, 2010 at 8:24 AM, Lennart Borgman < >>> lennart.borgman@gmail.com> >>> > wrote: >>> >> >>> >> On Tue, Sep 7, 2010 at 2:22 AM, Shenli Zhu <zhushenli2@gmail.com> >>> wrote: >>> >> > Hi Peter, >>> >> > >>> >> > Do you mean the grep-command I set should be runnable in shell? I >>> just >>> >> > use >>> >> > grep-command to store the grep template, so it cannot be run in >>> shell. >>> >> > >>> >> > Why we need probe-grep? To test whether grep exists and whether its >>> >> > function >>> >> > works correctly? Can I skip it? >>> >> >>> >> >>> >> probe-grep tries to find out what grep program you actually use and >>> >> what it can do. So, yes, you can skip it if you know what the program >>> >> can do. >>> > >>> > >>> >> >> > >-=-=-=-=-=- >[Alternative: text/html] >-=-=-=-=-=- Hi -- I just came across this thread. This M-x grep problem is a bug that you guys have now fixed in the sources, etc? Or is this something that, when I start using it, each of will have to do that fix ourselves? Or what. Am just a little confused. THANKS! David ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-01 2:04 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-09-06 11:32 Problem with grep in Emacs 23.2 Shenli Zhu 2010-09-06 20:04 ` Peter Dyballa 2010-09-07 0:22 ` Shenli Zhu 2010-09-07 0:24 ` Lennart Borgman 2010-09-07 1:05 ` Shenli Zhu 2010-09-07 1:24 ` Lennart Borgman 2010-09-07 1:50 ` Shenli Zhu 2010-09-07 7:28 ` Shenli Zhu [not found] ` <mailman.0.1283844542.27325.help-gnu-emacs@gnu.org> 2010-10-01 2:04 ` David Combs
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).