* Weird stuff printed out by emacs rgrep
@ 2009-03-19 22:14 Geoff Bache
0 siblings, 0 replies; 9+ messages in thread
From: Geoff Bache @ 2009-03-19 22:14 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
Whenever I run M-x rgrep (which is a lot) I get exactly six lines of
[: 320: Illegal number: 7
[: 320: Illegal number: 7
[: 320: Illegal number: 7
[: 320: Illegal number: 7
[: 320: Illegal number: 7
[: 320: Illegal number: 7
printed between the find command and the output (which are both correct).
This seems to happen independently of the files and the search. Does anyone know
what it means? It seems to refer to a file called '[', line 320, but
there is no file
with that name anywhere on my file system.
It's not fatal but it's very annoying :)
I'm running emacs 22.1.1 on Ubuntu (Hardy Heron)
Thanks for any help,
Geoff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
[not found] <mailman.3609.1237522114.31690.help-gnu-emacs@gnu.org>
@ 2009-03-21 21:02 ` geoff.bache
2009-03-21 22:32 ` Drew Adams
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: geoff.bache @ 2009-03-21 21:02 UTC (permalink / raw)
To: help-gnu-emacs
Hi again,
After a great deal of digging I have discovered why this happens. (It
also happens with ordinary grep, not just rgrep, but does not happen
with emacs 21 and earlier). I still don't really know what to do about
it though.
Emacs starts /bin/tcsh -c find ... | xargs grep ...
Crucially, it sets the environment variable GREP_OPTIONS=' --
color=always'
That means that anything in the various site-specific and personal
shell starter scripts called when /bin/tcsh is called that wishes to
make use of grep (and parse its output) will find it is parsing
coloured output. Which of course it may well not expect.
In my case I have Sun Grid Engine installed, which makes sure to set
up a load of its own variables when a new shell is started. It was its
starter script that was producing the strange error messages, which
basically came from the fact it didn't know what to do with the
coloured output when it called grep.
Is this perhaps an emacs bug? It would seem perfectly possible to
instead start something like
/bin/tcsh -c "env GREP_OPTIONS=' --color=always' find ..."
which would avoid the problem and any other similar potential
problems.
Regards,
Geoff
On Mar 19, 11:14 pm, Geoff Bache <geoff.ba...@gmail.com> wrote:
> Hi,
>
> Whenever I run M-x rgrep (which is a lot) I get exactly six lines of
>
> [: 320: Illegal number: 7
> [: 320: Illegal number: 7
> [: 320: Illegal number: 7
> [: 320: Illegal number: 7
> [: 320: Illegal number: 7
> [: 320: Illegal number: 7
>
> printed between the find command and the output (which are both correct).
> This seems to happen independently of the files and the search. Does anyone know
> what it means? It seems to refer to a file called '[', line 320, but
> there is no file
> with that name anywhere on my file system.
>
> It's not fatal but it's very annoying :)
>
> I'm running emacs 22.1.1 on Ubuntu (Hardy Heron)
>
> Thanks for any help,
> Geoff
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: Weird stuff printed out by emacs rgrep
2009-03-21 21:02 ` Weird stuff printed out by emacs rgrep geoff.bache
@ 2009-03-21 22:32 ` Drew Adams
2009-03-21 23:01 ` Eli Zaretskii
[not found] ` <mailman.3759.1237676491.31690.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2009-03-21 22:32 UTC (permalink / raw)
To: geoff.bache, help-gnu-emacs
> Is this perhaps an emacs bug? It would seem perfectly possible to
> instead start something like
> /bin/tcsh -c "env GREP_OPTIONS=' --color=always' find ..."
> which would avoid the problem and any other similar potential
> problems.
Perhaps someone reading your post here can give you an authoritative answer.
But I would say that the best way to find out whether some behavior you find
problematic is in fact a bug is to report it as a bug (with a precise recipe for
reproducing the behavior, starting with emacs -Q).
People reading the bug reports are generally the best placed to filter such
observations and pronounce whether something is a bug or not. help-gnu-emacs
might help you in this regard, but `M-x report-emacs-bug' is probably a better
target for your question.
Especially if you are interested in discussing possible fixes (e.g. "it would
seem perfectly possible to..."), file a bug report and you will likely get the
informed discussion you seek.
There is no need to be certain that something is a bug before you file a bug
report. And there's no shame in mistakenly thinking some behavior is wrong or in
not understanding something completely. Go for it.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
2009-03-21 21:02 ` Weird stuff printed out by emacs rgrep geoff.bache
2009-03-21 22:32 ` Drew Adams
@ 2009-03-21 23:01 ` Eli Zaretskii
[not found] ` <mailman.3759.1237676491.31690.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2009-03-21 23:01 UTC (permalink / raw)
To: help-gnu-emacs
> From: geoff.bache@gmail.com
> Date: Sat, 21 Mar 2009 14:02:47 -0700 (PDT)
>
> Emacs starts /bin/tcsh -c find ... | xargs grep ...
> Crucially, it sets the environment variable GREP_OPTIONS=' --
> color=always'
The current development sources change that to --color=auto.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
[not found] ` <mailman.3759.1237676491.31690.help-gnu-emacs@gnu.org>
@ 2009-03-22 18:23 ` geoff.bache
2009-03-22 19:08 ` Eli Zaretskii
[not found] ` <mailman.3789.1237749011.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: geoff.bache @ 2009-03-22 18:23 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 22, 12:01 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: geoff.ba...@gmail.com
> > Date: Sat, 21 Mar 2009 14:02:47 -0700 (PDT)
>
> > Emacs starts /bin/tcsh -c find ... | xargs grep ...
> > Crucially, it sets the environment variable GREP_OPTIONS=' --
> > color=always'
>
> The current development sources change that to --color=auto.
Great, that would also fix my problem.
Do you know if this fix is present in any stable releases of emacs 22
yet?
Regards,
Geoff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
2009-03-22 18:23 ` geoff.bache
@ 2009-03-22 19:08 ` Eli Zaretskii
[not found] ` <mailman.3789.1237749011.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2009-03-22 19:08 UTC (permalink / raw)
To: help-gnu-emacs
> From: geoff.bache@gmail.com
> Date: Sun, 22 Mar 2009 11:23:00 -0700 (PDT)
>
> On Mar 22, 12:01 am, Eli Zaretskii <e...@gnu.org> wrote:
> > > From: geoff.ba...@gmail.com
> > > Date: Sat, 21 Mar 2009 14:02:47 -0700 (PDT)
> >
> > > Emacs starts /bin/tcsh -c find ... | xargs grep ...
> > > Crucially, it sets the environment variable GREP_OPTIONS=' --
> > > color=always'
> >
> > The current development sources change that to --color=auto.
>
> Great, that would also fix my problem.
>
> Do you know if this fix is present in any stable releases of emacs 22
> yet?
No, it was done only recently, in preparation for Emacs 23.
But you can, of course, make the change in grep.el yourself, then
recompile it, and be done.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
[not found] ` <mailman.3789.1237749011.31690.help-gnu-emacs@gnu.org>
@ 2009-03-22 19:55 ` geoff.bache
2009-03-22 21:48 ` Eli Zaretskii
[not found] ` <mailman.3799.1237758495.31690.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 9+ messages in thread
From: geoff.bache @ 2009-03-22 19:55 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 22, 8:08 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > From: geoff.ba...@gmail.com
> > Date: Sun, 22 Mar 2009 11:23:00 -0700 (PDT)
>
> > On Mar 22, 12:01 am, Eli Zaretskii <e...@gnu.org> wrote:
> > > > From: geoff.ba...@gmail.com
> > > > Date: Sat, 21 Mar 2009 14:02:47 -0700 (PDT)
>
> > > > Emacs starts /bin/tcsh -c find ... | xargs grep ...
> > > > Crucially, it sets the environment variable GREP_OPTIONS=' --
> > > > color=always'
>
> > > The current development sources change that to --color=auto.
>
> > Great, that would also fix my problem.
>
> > Do you know if this fix is present in any stable releases of emacs 22
> > yet?
>
> No, it was done only recently, in preparation for Emacs 23.
>
> But you can, of course, make the change in grep.el yourself, then
> recompile it, and be done.
I can happily do that at home (where I can also just reset
GREP_OPTIONS at the top of the offending SGE script), but not really
at work which has the same issue. I have no control over the emacs
installation and don't really want to start building and supporting my
own personal emacs there.
Is there any chance of a backport into emacs 22 or is that not being
patched any more? I believe I have more chance of convincing my
sysadmins to install an official emacs release than to start hacking
in elisp code :)
Geoff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
2009-03-22 19:55 ` geoff.bache
@ 2009-03-22 21:48 ` Eli Zaretskii
[not found] ` <mailman.3799.1237758495.31690.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2009-03-22 21:48 UTC (permalink / raw)
To: help-gnu-emacs
> From: geoff.bache@gmail.com
> Date: Sun, 22 Mar 2009 12:55:56 -0700 (PDT)
>
> Is there any chance of a backport into emacs 22 or is that not being
> patched any more?
The Emacs 22 branch is no longer worked on, and I don't think any
releases will come out of it, unless some very grave problem will be
reported in Emacs 22 with 23.1 still far from being ready.
Btw, you don't need to build your own Emacs, just to include a
modified version of grep-process-setup in your .emacs, after you
`(load "grep")'.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Weird stuff printed out by emacs rgrep
[not found] ` <mailman.3799.1237758495.31690.help-gnu-emacs@gnu.org>
@ 2009-03-23 18:25 ` geoff.bache
0 siblings, 0 replies; 9+ messages in thread
From: geoff.bache @ 2009-03-23 18:25 UTC (permalink / raw)
To: help-gnu-emacs
OK. Many thanks for the info and tips!
Geoff
On Mar 22, 10:48 pm, Eli Zaretskii <e...@gnu.org> wrote:
> > From: geoff.ba...@gmail.com
> > Date: Sun, 22 Mar 2009 12:55:56 -0700 (PDT)
>
> > Is there any chance of a backport into emacs 22 or is that not being
> > patched any more?
>
> The Emacs 22 branch is no longer worked on, and I don't think any
> releases will come out of it, unless some very grave problem will be
> reported in Emacs 22 with 23.1 still far from being ready.
>
> Btw, you don't need to build your own Emacs, just to include a
> modified version of grep-process-setup in your .emacs, after you
> `(load "grep")'.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-03-23 18:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3609.1237522114.31690.help-gnu-emacs@gnu.org>
2009-03-21 21:02 ` Weird stuff printed out by emacs rgrep geoff.bache
2009-03-21 22:32 ` Drew Adams
2009-03-21 23:01 ` Eli Zaretskii
[not found] ` <mailman.3759.1237676491.31690.help-gnu-emacs@gnu.org>
2009-03-22 18:23 ` geoff.bache
2009-03-22 19:08 ` Eli Zaretskii
[not found] ` <mailman.3789.1237749011.31690.help-gnu-emacs@gnu.org>
2009-03-22 19:55 ` geoff.bache
2009-03-22 21:48 ` Eli Zaretskii
[not found] ` <mailman.3799.1237758495.31690.help-gnu-emacs@gnu.org>
2009-03-23 18:25 ` geoff.bache
2009-03-19 22:14 Geoff Bache
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.