From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#32093: 27.0.50; M-x grep appends /dev/null to command line Date: Mon, 09 Jul 2018 17:43:46 -0400 Message-ID: <87pnzwccfh.fsf@gmail.com> References: <87lgamdqcb.fsf@fencepost.gnu.org> <87pnzyawdg.fsf@gmx.de> <87h8ladpem.fsf@fencepost.gnu.org> <87lgamavq7.fsf@gmx.de> <87d0vydli6.fsf@fencepost.gnu.org> <87va9pdin0.fsf@gmail.com> <83pnzxh7lj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1531172527 28260 195.159.176.226 (9 Jul 2018 21:42:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 9 Jul 2018 21:42:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 32093@debbugs.gnu.org, dak@gnu.org, michael.albinus@gmx.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 09 23:42:02 2018 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 1fcduz-0007D9-LW for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 23:42:01 +0200 Original-Received: from localhost ([::1]:44608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcdx6-0003Ic-QM for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jul 2018 17:44:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcdx0-0003IW-2T for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 17:44:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcdww-0007WF-U6 for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 17:44:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcdww-0007Vr-Ov for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 17:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fcdww-00055J-BP for bug-gnu-emacs@gnu.org; Mon, 09 Jul 2018 17:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 Jul 2018 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32093 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32093-submit@debbugs.gnu.org id=B32093.153117263619522 (code B ref 32093); Mon, 09 Jul 2018 21:44:02 +0000 Original-Received: (at 32093) by debbugs.gnu.org; 9 Jul 2018 21:43:56 +0000 Original-Received: from localhost ([127.0.0.1]:52823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcdwq-00054o-B9 for submit@debbugs.gnu.org; Mon, 09 Jul 2018 17:43:56 -0400 Original-Received: from mail-it0-f50.google.com ([209.85.214.50]:34017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fcdwo-00054X-Gx for 32093@debbugs.gnu.org; Mon, 09 Jul 2018 17:43:54 -0400 Original-Received: by mail-it0-f50.google.com with SMTP id d191-v6so12996898ite.1 for <32093@debbugs.gnu.org>; Mon, 09 Jul 2018 14:43:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ERwHA2N0U5/LLxkFcRE6Y8sILwWigXDj6u/mLN235rk=; b=gpmwQrY4YCDNMWVupbBqq3jtcf9kiFIaf/A1Gtvwz4q9O9VeSh3prNUD3E9cs+/GO/ e4c05aKAxiVkhnEruFNouD+fz0bZdCMtTFEnzSyta3P7VsJ0bxO1bJPr/WWzailjvRzX NHdZIO6rsiVCsw0td5K6JmfXKRKkjXBB4aCye0n3Y2L/3Jn6qj0B3tY9rq7FWWyU/iIU EbYfPw1T66LGo0Zul65KRrJa1HBdZQyDbBJjKBS5ykqRxu9fXBiTuUwF7qPDIJuMmQnp sPnOQyHbEpQbP+OaWfT8cx2WcBt/OerKfkQr7Yh/uSPvesJ5SLpcZwzmDHFi+FtqRh0D w1iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=ERwHA2N0U5/LLxkFcRE6Y8sILwWigXDj6u/mLN235rk=; b=lqgYK4TEuKC5QsXiKIonx05woHOub4wr28g2n4Lj33OzOj27++j3AbctDiBO/Pliuv OfS7nurzbmCmNPJpVCfhiIbYdmcoyulDVZmZWJakvovg6aSmVDscgyP/H/rdo+WA1i6U jWU0sdvN0LtfTSUJZ5f75DXqkpHPFmTB/deZMUbgNuPrzE2As62hW+8szZoFzPFbHb2P KNqlClvQ8z0+R/KLMr8zIqjJhvKOPBHXORTDn5vs/HBnLNMfLL8PKqO3SWh4vX04/Z57 rw0lKcnLUQZPselbpOG/S2yE6JJc1oyCU9Zm3f++8Bzn7F1+aYhaEkxOLnutqqXMZ+4R u2WA== X-Gm-Message-State: APt69E39zgbzzjrDtZenOt1nrmO0P6zEHqW8RlsMSswHOLSuHmG1UGH6 fJcE4coJLcmaxoxMW2+uWXo= X-Google-Smtp-Source: AAOMgpc1Q0gjKxP1/okiXDOeR9wgV2wbQsd8BVGq9w/eZ7beu1bJ4d+v6NWUHxMEkeg+av3D77PxuQ== X-Received: by 2002:a02:35a:: with SMTP id y87-v6mr18678776jad.2.1531172629028; Mon, 09 Jul 2018 14:43:49 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id l201-v6sm8517634ita.3.2018.07.09.14.43.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 14:43:48 -0700 (PDT) In-Reply-To: <83pnzxh7lj.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Jul 2018 22:04:40 +0300") 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:148395 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: > But is there a good reason why we use HELLO for that? Why not README, > say, whose first line will always start with "Copyright"? I don't think there's a reason to use HELLO in particular. etc/README doesn't have Copyright on the first line, but it does have COPYRIGHT at the beginning of a line (I think we do want something specifically in etc/, because we know `data-directory' tells us where to find it). --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Use-README-instead-of-HELLO-for-grep-probing-Bug-.patch Content-Description: patch >From 3b0f302b7d06c37cc6fbff2f1e18904020de51f2 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Mon, 9 Jul 2018 17:38:40 -0400 Subject: [PATCH v1] Use README instead of HELLO for grep probing (Bug#32093) * lisp/progmodes/grep.el (grep-compute-defaults): Check README for the string COPYRIGHT; HELLO no longer has "English" at the beginning of a line since 2018-05-19 "Use Enriched mode in etc/HELLO to keep charset information". --- lisp/progmodes/grep.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index b7c44d6083..b466e205b8 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -626,28 +626,28 @@ grep-compute-defaults (unless (or (not grep-use-null-device) (eq grep-use-null-device t)) (setq grep-use-null-device (with-temp-buffer - (let ((hello-file (expand-file-name "HELLO" data-directory))) + (let ((hello-file (expand-file-name "README" data-directory))) (not (and (if grep-command ;; `grep-command' is already set, so ;; use that for testing. (grep-probe grep-command - `(nil t nil "^English" ,hello-file) + `(nil t nil "^COPYRIGHT" ,hello-file) #'call-process-shell-command) ;; otherwise use `grep-program' (grep-probe grep-program - `(nil t nil "-nH" "^English" ,hello-file))) + `(nil t nil "-nH" "^COPYRIGHT" ,hello-file))) (progn (goto-char (point-min)) (looking-at (concat (regexp-quote hello-file) - ":[0-9]+:English"))))))))) + ":[0-9]+:COPYRIGHT"))))))))) (when (eq grep-use-null-filename-separator 'auto-detect) (setq grep-use-null-filename-separator (with-temp-buffer - (let* ((hello-file (expand-file-name "HELLO" data-directory)) - (args `("--null" "-ne" "^English" ,hello-file))) + (let* ((hello-file (expand-file-name "README" data-directory)) + (args `("--null" "-ne" "^COPYRIGHT" ,hello-file))) (if grep-use-null-device (setq args (append args (list null-device))) (push "-H" args)) @@ -656,7 +656,7 @@ grep-compute-defaults (goto-char (point-min)) (looking-at (concat (regexp-quote hello-file) - "\0[0-9]+:English")))))))) + "\0[0-9]+:COPYRIGHT")))))))) (when (eq grep-highlight-matches 'auto-detect) (setq grep-highlight-matches -- 2.11.0 --=-=-=--