From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.bugs Subject: bug#27236: 25.1; grep: nonsensical default commands offered Date: Mon, 5 Jun 2017 00:22:38 +0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1496597050 29527 195.159.176.226 (4 Jun 2017 17:24:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Jun 2017 17:24:10 +0000 (UTC) To: 27236@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 04 19:24:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHZG0-0007On-IB for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 19:24:04 +0200 Original-Received: from localhost ([::1]:57801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHZG6-0004fK-1F for geb-bug-gnu-emacs@m.gmane.org; Sun, 04 Jun 2017 13:24:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHZG0-0004fE-7N for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:24:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHZFy-0003bs-TC for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:24:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHZFy-0003bl-OR for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dHZFy-0002LN-Fo for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuri Khan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2017 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14965969958953 (code B ref -1); Sun, 04 Jun 2017 17:24:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jun 2017 17:23:15 +0000 Original-Received: from localhost ([127.0.0.1]:56050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHZFB-0002KJ-E5 for submit@debbugs.gnu.org; Sun, 04 Jun 2017 13:23:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dHZFA-0002K5-7L for submit@debbugs.gnu.org; Sun, 04 Jun 2017 13:23:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHZF3-00030U-H4 for submit@debbugs.gnu.org; Sun, 04 Jun 2017 13:23:07 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:49794) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dHZF3-00030M-DY for submit@debbugs.gnu.org; Sun, 04 Jun 2017 13:23:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHZF1-0004cj-PL for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:23:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHZF0-0002wq-AM for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:23:03 -0400 Original-Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:34973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHZF0-0002tj-0H for bug-gnu-emacs@gnu.org; Sun, 04 Jun 2017 13:23:02 -0400 Original-Received: by mail-wm0-x236.google.com with SMTP id b84so57709376wmh.0 for ; Sun, 04 Jun 2017 10:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to :content-transfer-encoding; bh=jfS1l2B+DbLpQFnrO6/RVZ7ofeUXLjP+gPFYYN5bl9U=; b=LLrCN+7C7prJmEECHifR2achMurnD4j/Mdg1wMZcMG0zveGT6qQJVPj7B2A8lzjVWT BjpnfXqjcwOsf30cNv/OjfzFN2EvlQdPyyJJVddSeo/3B4v3E0jw941ZUSqdqrycTXjp E9eh1NSWY7EJGugppaVSLdagBMUojzhI9c/abuGyv4oByPpaPy7Zij83JK20zwQ+6qX5 QYtl1Vd00AB9yASH7UhAk1lJJbjcDhA+RG75d2hPpkZiYMabAnY8oiCd6grrH15cDrG+ BdzY3hAJaT5mO2ylFDV3YTJ4Fjke1WAkyxrx81O5ud3Gp0F5n+JYzrXh3M9mXhG/AZ59 s4Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-transfer-encoding; bh=jfS1l2B+DbLpQFnrO6/RVZ7ofeUXLjP+gPFYYN5bl9U=; b=AB9Y3qxAXIkN78f9BwqUmMhLXDehmSCWwU8JvR8YWNzD8ZTjsEit2rwPICT4h8qYWk d+oZ0VKksf+5Iow0o+vlLtxm//sOr5+4wSU4r5OrKQoiSzyy58hsaEG7xZxb1pbOjBY8 URc8cCaMSasE2EP4tKH7dHoP/2qwNcH89BcxwwTNNK3HeM9td3Q4G64yxNC5y389FCN/ tll2S8mqcot/3R+Ps/EnWR2/NKlOvWJgefcaVg2ZiGVMnlOZwJuMtauovUBv38T5X+5Q DWYj6cp9eDqGnFqk9j1kXr3x4AtEXwVWsg2bgALos6hz7xXemjUL3y5S83kuWhojqmb5 eulg== X-Gm-Message-State: AODbwcAabgs/oFii1Zndjwe0/qO8r3VCi02X/qOO71wFLLS2Px798HFZ 7basRpqNPNgCowOT7gAJNmV231X3ylv1 X-Received: by 10.28.220.138 with SMTP id t132mr5592199wmg.63.1496596979084; Sun, 04 Jun 2017 10:22:59 -0700 (PDT) Original-Received: by 10.223.164.93 with HTTP; Sun, 4 Jun 2017 10:22:38 -0700 (PDT) X-Google-Sender-Auth: z2q0LVH2lY5fiD34lTctJycKNCY X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133264 Archived-At: Running =E2=80=98grep=E2=80=99 and cycling through suggested defaults start= s with the value of =E2=80=98grep-command=E2=80=99, followed by that command with the = current symbol substituted. After that, it offers the same command but with the name of a text editor or viewer added in front. The call sequence is as follows: * =E2=80=98grep=E2=80=99 computes the initial command and the first default= command. * =E2=80=98grep=E2=80=99 calls =E2=80=98read-shell-command=E2=80=99. * =E2=80=98read-shell-command=E2=80=99 calls =E2=80=98read-from-minibuffer= =E2=80=99 with a setup hook that binds =E2=80=98minibuffer-default-add-function=E2=80=99 to =E2=80=98minibuffer-default-add-shell-commands=E2=80=99. * =E2=80=98minibuffer-default-add-shell-commands=E2=80=99 interprets the pr= ovided default command as a file name and consults =E2=80=98mailcap-file-default-commands=E2=80=99 for commands applicable to = that file name. * The default command has no file extension, so =E2=80=98mailcap-file-default-commands=E2=80=99 assumes it is a text/plain = file and returns a list of text editors and viewers. $ emacs -Q M-x grep RET =E2=87=92 Run grep (like this): grep --color -nH -e =E2=87=92 Run grep (like this): grep --color -nH '' =E2=87=92 Run grep (like this): less grep --color -nH '' =E2=87=92 Run grep (like this): more grep --color -nH '' =E2=87=92 Run grep (like this): /usr/bin/emacs24 -nw grep --color -nH '' =E2=87=92 Run grep (like this): /usr/bin/emacs24 grep --color -nH '' =E2=87=92 Run grep (like this): /usr/bin/emacs25 -nw grep --color -nH '' =E2=87=92 Run grep (like this): /usr/bin/emacs25 grep --color -nH '' =E2=87=92 Run grep (like this): geany grep --color -nH '' =E2=87=92 Run grep (like this): gvim -f grep --color -nH '' =E2=87=92 Run grep (like this): mousepad grep --color -nH '' =E2=87=92 Run grep (like this): gedit --new-document grep --color -nH '' =E2=87=92 Run grep (like this): kate -b grep --color -nH '' =E2=87=92 Run grep (like this): vim grep --color -nH '' =E2=87=92 Run grep (like this): view grep --color -nH '' =E2=87=92 Run grep (like this): gview grep --color -nH '' =E2=87=92 End of defaults; no next item In GNU Emacs 25.1.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-12-13, modified by Debian built on lgw01-55 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.2 LTS Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25= .1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-li= sp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25= .1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.1/site-li= sp:/usr/share/emacs/site-lisp --with-sound=3Dalsa --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' 'LDFLAGS=3D-Wl,-Bsymbolic-functions -Wl,-z,relro'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Important settings: value of $LC_MONETARY: en_RU.UTF-8 value of $LC_NUMERIC: en_RU.UTF-8 value of $LC_TIME: en_RU.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. user-error: End of defaults; no next item [4 times] Quit Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader sendmail mail-utils mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mailcap shell pcomplete thingatpt grep compile comint ansi-color ring time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 105943 8853) (symbols 48 20562 0) (miscs 40 49 146) (strings 32 22520 4388) (string-bytes 1 586592) (vectors 16 12928) (vector-slots 8 441075 3385) (floats 8 167 117) (intervals 56 249 0) (buffers 976 17) (heap 1024 35911 998))