GNU bug report logs - #22551
24.5; M-x grep: can't add option after default option list

Previous Next

Package: emacs;

Reported by: Benoit Coste <ben.coste <at> gmail.com>

Date: Thu, 4 Feb 2016 16:22:01 UTC

Severity: minor

Tags: notabug

Found in version 24.5

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22551 in the body.
You can then email your comments to 22551 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22551; Package emacs. (Thu, 04 Feb 2016 16:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benoit Coste <ben.coste <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 04 Feb 2016 16:22:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Benoit Coste <ben.coste <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; M-x grep: can't add option after default option list
Date: Thu, 04 Feb 2016 17:21:10 +0100
Hi and thank you for supporting Emacs. It is cool that people do that
and I should get involved at some point.

It is not really a bug but an issue that has room for improvement.
When I type M-x grep, this is what I get.

Run grep (like this): grep --color -nH -e

If if try to add an option after the '-e', let's say '-R', Emacs thinks
the option is the pattern I am looking for instead of considering it as
an option.

In other words:
'grep --color -nH -e' with as following:
      ' -R foo bar' does not work. It fails to find the '-R' pattern.
      ' foo bar -R' works

If this has already been mentioned, then sorry for the inconvenience.
Cheers,
Benoit



In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu)
 of 2015-09-17 on lgw01-52, modified by Debian
System Description:	Ubuntu 15.10

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=no --without-gconf --without-gsettings 'CFLAGS=-g -O2
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 CPPFLAGS=-D_FORTIFY_SOURCE=2 'LDFLAGS=-Wl,-Bsymbolic-functions
 -Wl,-z,relro''

Important settings:
  value of $LC_MONETARY: fr_FR.UTF-8
  value of $LC_NUMERIC: fr_FR.UTF-8
  value of $LC_TIME: fr_FR.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: HTML

Minor modes in effect:
  shell-dirtrack-mode: t
  desktop-save-mode: t
  ido-everywhere: t
  which-function-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Quit [2 times]
Mark saved where search started [2 times]
Quit
Grep exited abnormally with code 2
Please answer yes or no.
Quit
Grep exited abnormally with code 2
Grep finished (matches found)
Quit
Making completion list...

Load-path shadows:
/usr/share/emacs/24.5/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils help-mode shell pcomplete grep compile tool-bar
misearch multi-isearch term disp-table ehelp add-log xterm conf-mode
vc-git js advice help-fns byte-opt bytecomp byte-compile cl-extra cconv
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs image nroff-mode sh-script smie executable
python easymenu json comint ring ansi-color regexp-opt sgml-mode edmacro
kmacro tango-dark-theme desktop frameset cl-loaddefs cl-lib ido
time-date which-func imenu leuven-theme-autoloads package epg-config
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify multi-tty emacs)

Memory information:
((conses 16 250847 11724)
 (symbols 48 26846 0)
 (miscs 40 190 566)
 (strings 32 47419 6211)
 (string-bytes 1 1349254)
 (vectors 16 19510)
 (vector-slots 8 492318 3973)
 (floats 8 85 1388)
 (intervals 56 14050 0)
 (buffers 960 45)
 (heap 1024 29513 816))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22551; Package emacs. (Thu, 04 Feb 2016 17:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 22551 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Benoit Coste <ben.coste <at> gmail.com>
Cc: 22551 <at> debbugs.gnu.org
Subject: Re: bug#22551: 24.5;
 M-x grep: can't add option after default option list
Date: Thu, 04 Feb 2016 12:32:31 -0500
Benoit Coste wrote:

> When I type M-x grep, this is what I get.
>
> Run grep (like this): grep --color -nH -e
>
> If if try to add an option after the '-e', let's say '-R', Emacs thinks
> the option is the pattern I am looking for instead of considering it as
> an option.

We assume familiarity with grep options. The -e option of grep takes an
argument, namely the pattern to search for. You can either add your
option before the -e, or maybe you are interested in M-x rgrep.
I don't see this as an Emacs bug.




Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 04 Feb 2016 17:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22551; Package emacs. (Thu, 04 Feb 2016 17:36:01 GMT) Full text and rfc822 format available.

Message #13 received at 22551 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Glenn Morris <rgm <at> gnu.org>, Benoit Coste <ben.coste <at> gmail.com>
Cc: 22551 <at> debbugs.gnu.org
Subject: RE: bug#22551: 24.5; M-x grep: can't add option after default option
 list
Date: Thu, 4 Feb 2016 09:35:04 -0800 (PST)
> We assume familiarity with grep options. The -e option of grep takes an
> argument, namely the pattern to search for. You can either add your
> option before the -e, or maybe you are interested in M-x rgrep.
> I don't see this as an Emacs bug.

aka `M-x man RET grep RET'

That shows:

grep  [OPTIONS]  [-e  PATTERN   |   -f   FILE]  [FILE...]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22551; Package emacs. (Thu, 04 Feb 2016 21:47:01 GMT) Full text and rfc822 format available.

Message #16 received at 22551 <at> debbugs.gnu.org (full text, mbox):

From: BenoƮt Coste <ben.coste <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>, Glenn Morris <rgm <at> gnu.org>
Cc: 22551 <at> debbugs.gnu.org
Subject: Re: bug#22551: 24.5;
 M-x grep: can't add option after default option list
Date: Thu, 04 Feb 2016 21:46:02 +0000
[Message part 1 (text/plain, inline)]
Oh, my bad. I though -e was an option not taking arguments.

Sorry for the noise.

On Thu, Feb 4, 2016 at 6:35 PM Drew Adams <drew.adams <at> oracle.com> wrote:

> > We assume familiarity with grep options. The -e option of grep takes an
> > argument, namely the pattern to search for. You can either add your
> > option before the -e, or maybe you are interested in M-x rgrep.
> > I don't see this as an Emacs bug.
>
> aka `M-x man RET grep RET'
>
> That shows:
>
> grep  [OPTIONS]  [-e  PATTERN   |   -f   FILE]  [FILE...]
>
[Message part 2 (text/html, inline)]

bug closed, send any further explanations to 22551 <at> debbugs.gnu.org and Benoit Coste <ben.coste <at> gmail.com> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 10 Feb 2016 02:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Mar 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.