From: Noam Postavsky <npostavs@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 32093@debbugs.gnu.org, dak@gnu.org, michael.albinus@gmx.de
Subject: bug#32093: 27.0.50; M-x grep appends /dev/null to command line
Date: Mon, 09 Jul 2018 17:43:46 -0400 [thread overview]
Message-ID: <87pnzwccfh.fsf@gmail.com> (raw)
In-Reply-To: <83pnzxh7lj.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 08 Jul 2018 22:04:40 +0300")
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
Eli Zaretskii <eliz@gnu.org> 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).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 2632 bytes --]
From 3b0f302b7d06c37cc6fbff2f1e18904020de51f2 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
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
next prev parent reply other threads:[~2018-07-09 21:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-08 9:33 bug#32093: 27.0.50; M-x grep appends /dev/null to command line David Kastrup
2018-07-08 9:51 ` Michael Albinus
2018-07-08 9:53 ` David Kastrup
2018-07-08 10:05 ` Michael Albinus
2018-07-08 11:17 ` David Kastrup
2018-07-08 12:19 ` Noam Postavsky
2018-07-08 12:30 ` David Kastrup
2018-07-08 19:04 ` Eli Zaretskii
2018-07-08 19:11 ` David Kastrup
2018-07-09 21:43 ` Noam Postavsky [this message]
2018-07-10 7:33 ` David Kastrup
2018-07-10 15:55 ` Eli Zaretskii
2018-07-10 22:04 ` Noam Postavsky
2018-07-09 23:10 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnzwccfh.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=32093@debbugs.gnu.org \
--cc=dak@gnu.org \
--cc=eliz@gnu.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.