unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#22551: 24.5; M-x grep: can't add option after default option list
@ 2016-02-04 16:21 Benoit Coste
  2016-02-04 17:32 ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Benoit Coste @ 2016-02-04 16:21 UTC (permalink / raw)
  To: 22551


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))





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22551: 24.5; M-x grep: can't add option after default option list
  2016-02-04 16:21 bug#22551: 24.5; M-x grep: can't add option after default option list Benoit Coste
@ 2016-02-04 17:32 ` Glenn Morris
  2016-02-04 17:35   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2016-02-04 17:32 UTC (permalink / raw)
  To: Benoit Coste; +Cc: 22551

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22551: 24.5; M-x grep: can't add option after default option list
  2016-02-04 17:32 ` Glenn Morris
@ 2016-02-04 17:35   ` Drew Adams
  2016-02-04 21:46     ` Benoît Coste
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2016-02-04 17:35 UTC (permalink / raw)
  To: Glenn Morris, Benoit Coste; +Cc: 22551

> 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...]





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#22551: 24.5; M-x grep: can't add option after default option list
  2016-02-04 17:35   ` Drew Adams
@ 2016-02-04 21:46     ` Benoît Coste
  0 siblings, 0 replies; 4+ messages in thread
From: Benoît Coste @ 2016-02-04 21:46 UTC (permalink / raw)
  To: Drew Adams, Glenn Morris; +Cc: 22551

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

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@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...]
>

[-- Attachment #2: Type: text/html, Size: 850 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-04 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-04 16:21 bug#22551: 24.5; M-x grep: can't add option after default option list Benoit Coste
2016-02-04 17:32 ` Glenn Morris
2016-02-04 17:35   ` Drew Adams
2016-02-04 21:46     ` Benoît Coste

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).