all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sven Joachim <svenjoac@gmx.de>
To: xah lee <xah@xahlee.org>
Cc: 2693@emacsbugs.donarmstrong.com
Subject: bug#2693: grep-find with camelCase returns error of 123
Date: Tue, 17 Mar 2009 10:15:02 +0100	[thread overview]
Message-ID: <8763i8y0h5.fsf@turtle.gmx.de> (raw)
In-Reply-To: <56B65F1D-C3B9-4094-A49F-07A0A6C21BDC@xahlee.org> (xah lee's message of "Mon, 16 Mar 2009 17:41:15 -0700")

On 2009-03-17 01:41 +0100, xah lee wrote:

> Summary: when using M-x grep-find, on a search word with camelCase, i
> get this error:
> “Grep exited abnormally with code 123 at Mon Mar 16 17:22:46”.
>
> Reproduce steps:
>
> • start emacs 22.x with -q
> • M-x grep-find
> • Try to search a word with camelCase. e.g. “find . -name "*txt" -
> print0 | xargs -0 -e grep -nH -e pestiLence”
> • Emacs gives the error mentioned above.
>
> This is reproducible in:
>
> • GNU Emacs 22.2.1 (powerpc-apple-darwin8.11.0, Carbon Version 1.6.0)
> of 2008-04-05 on g5.tokyo.stp.isas.jaxa.jp
> • GNU Emacs 22.0.50.1 (powerpc-apple-darwin8.11.0, GTK+ Version
> 2.6.10) of 2009-03-01 on xahg5.local
>
> This problem happens also when called with shell-command. e.g. M-x 
> shell-command, then use
> “find . -name "*txt" -print0 | xargs -0 -e grep -nH -e pestiLence”.

This is not surprising, since 123 is xargs' exit code if any of the
command invocations failed, see the "EXIT STATUS" section in xargs(1).

> However, this does not happen when called in shell, e.g. M-x
> shell. Nor when i simply run it in a Terminal running bash. (so, prob
> not  having to do with the unix's “find”, “grep”, “xargs”  programs on
> my computer.)

Your shell may not report failure, but unless one of your files contains
pestiLence, the above command will still finish with an exit code of
123.  Type "echo $?" to convince yourself.

Maybe it would be possible to special-case an exit code of 123 in
grep-find, but the problem is that this exit code does not tell if there
were matches or not.

Sven






  reply	other threads:[~2009-03-17  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  0:41 bug#2693: grep-find with camelCase returns error of 123 xah lee
2009-03-17  9:15 ` Sven Joachim [this message]
2009-03-17 12:24 ` Jason Rumney
2009-03-17 12:28   ` xah lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763i8y0h5.fsf@turtle.gmx.de \
    --to=svenjoac@gmx.de \
    --cc=2693@emacsbugs.donarmstrong.com \
    --cc=xah@xahlee.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.