From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.bugs Subject: bug#46801: Autodetection of grep-use-null-device Date: Fri, 26 Feb 2021 09:10:51 -0800 Message-ID: <055601d70c62$57d58ba0$0780a2e0$@free.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0557_01D70C1F.49B33600" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24328"; mail-complaints-to="usenet@ciao.gmane.io" To: 46801@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 26 19:18:20 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFhgx-0006E6-Mo for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Feb 2021 19:18:19 +0100 Original-Received: from localhost ([::1]:51382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFhgw-0003me-Lp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Feb 2021 13:18:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFhMM-0002d7-3a for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2021 12:57:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFhML-000340-Ri for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2021 12:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFhML-0005Ut-QF for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2021 12:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2021 17:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46801 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.161436220021083 (code B ref -1); Fri, 26 Feb 2021 17:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Feb 2021 17:56:40 +0000 Original-Received: from localhost ([127.0.0.1]:42328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFhLz-0005Tx-Kc for submit@debbugs.gnu.org; Fri, 26 Feb 2021 12:56:40 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:37264) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFgdu-0002F0-4V for submit@debbugs.gnu.org; Fri, 26 Feb 2021 12:11:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFgdt-00077J-Rz for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2021 12:11:05 -0500 Original-Received: from smtp4-g21.free.fr ([212.27.42.4]:64102) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFgdo-0002Mo-Mt for bug-gnu-emacs@gnu.org; Fri, 26 Feb 2021 12:11:05 -0500 Original-Received: from DCHAPPAZ (unknown [70.95.74.148]) (Authenticated sender: david.chappaz@free.fr) by smtp4-g21.free.fr (Postfix) with ESMTPSA id CC8FB19F576 for ; Fri, 26 Feb 2021 18:10:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1614359455; bh=hGdLK5rtcvvwxl3jxX66YTRR0rDw+ElIB8nhkGeZ3Xc=; h=From:To:Subject:Date:From; b=ptwr1I6InbGylXyZQZxnGo7zMpihjlJyk9+iBcrMIfL4Iv+2UvEWfwdvJIvWYuzzD mMGRZXPy03nq1lU+gVjF5VUffIrP94HGd8A2gZ7Px1IsZ8wn8FWNGlqmkEEfU/R1ed vgNT3CW53MnwDxmmqn9peohh6/Hu0AAUMJhY0b1Zf1Sz9dSgawCfLLeA+y7YOusnfR c+hQanOaRWD6kPtH+JYa3slK5p52DaX5vuDgp6qrqLIWjymIR7i5/w9VJte88PapLq tmF7m3JOCu5CK1ftsjQ2f3JiaCawTqL5TP3h5BqX+guMWL2oIiKEvdL8E5n5FhR9zm EcC+DoIJ0N0GA== X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdcMYcE7cRn0GYfeQZuC7idTG9x6Ow== Content-Language: en-us Received-SPF: pass client-ip=212.27.42.4; envelope-from=david.chappaz@free.fr; helo=smtp4-g21.free.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 26 Feb 2021 12:56:38 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:200878 Archived-At: This is a multipart message in MIME format. ------=_NextPart_000_0557_01D70C1F.49B33600 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Here is a simple recipe: 1/ Start emacs with --no-init 2/ Check that grep-use-null-device is set to 'auto-detect' 3/ Execute non-interactively (grep "grep --color -nH --null -e something") The command that's echoed in the grep buffer is: grep --color -nH --null -e something /dev/null 4/ I can see that grep-use-null-device has been set to nil This suggests that automatic detection of grep-use-null-device has taken place. Is this expected after non-interactive invocation ? The documentation seems to suggest that automatic detection of grep-use-null-device should take place on the first *interactive* call, but not before that. Perhaps I don't read the documentation correctly though, it's very possible ! However, if automatic detection of grep-use-null-device after non-interactive Invocation is the correct behavior, then why was /dev/null added to the command despite grep-use-null-device being set to nil ? 5/ Execute non-interactively the same command again: (grep "grep --color -nH --null -e something") The command that's echoed in the grep buffer now is: grep --color -nH --null -e something This time round, /dev/null is not present. At least this is consistent with grep-use-null-device being set to nil. What doesn't seem right is that the echoed command is not the same as that from step 3/ Any thoughts or comments ? Thanks ! David ------=_NextPart_000_0557_01D70C1F.49B33600 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

Here is a = simple recipe:

 

1/ Start = emacs with --no-init

 

2/ Check = that grep-use-null-device is set to = ‘auto-detect’

 

3/ Execute = non-interactively

(grep "grep = --color -nH --null -e something")

 

The command = that’s echoed in the grep buffer is:

grep --color -nH --null -e something = /dev/null

 

4/ I can see that grep-use-null-device has been set to = nil

 

This suggests that automatic detection of = grep-use-null-device

has taken place. = Is this expected after non-interactive invocation ?

 

The = documentation seems to suggest that automatic detection = of

grep-use-null-device should  = take place on the first *interactive*

call, but not before that. Perhaps I don't read the = documentation

correctly though, it's = very possible !

 

However, if = automatic detection of grep-use-null-device after non-interactive =

Invocation is the correct behavior, = then why was /dev/null added to the

command despite grep-use-null-device being set to nil = ?

5/ Execute non-interactively the same command = again:

(grep "grep --color -nH = --null -e something")

 

The command = that’s echoed in the grep buffer now is:

grep --color -nH --null -e something

 

This time = round, /dev/null is not present. At least this is consistent = with

grep-use-null-device being set = to nil.

What doesn't seem right is = that the echoed command is not the same as

that from step 3/

 

Any thoughts = or comments ?

Thanks = !

David

------=_NextPart_000_0557_01D70C1F.49B33600--