From unknown Mon Aug 18 08:55:46 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4115 <4115@debbugs.gnu.org> To: bug#4115 <4115@debbugs.gnu.org> Subject: Status: grep and null device Reply-To: bug#4115 <4115@debbugs.gnu.org> Date: Mon, 18 Aug 2025 15:55:46 +0000 retitle 4115 grep and null device reassign 4115 emacs submitter 4115 ts011c8050@blueyonder.co.uk severity 4115 normal thanks From ts011c8050@blueyonder.co.uk Tue Aug 11 01:42:02 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 11 Aug 2009 08:42:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7B8g0DH006815 for ; Tue, 11 Aug 2009 01:42:02 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mamvd-0000s3-Er for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 04:41:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MamvZ-0000od-Hr for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 04:41:57 -0400 Received: from [199.232.76.173] (port=51329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MamvZ-0000oS-C1 for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 04:41:53 -0400 Received: from smtp-out4.blueyonder.co.uk ([195.188.213.7]:45068) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MamvY-0003ZB-PV for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 04:41:53 -0400 Received: from [172.23.170.142] (helo=anti-virus02-09) by smtp-out4.blueyonder.co.uk with smtp (Exim 4.52) id 1MamvW-0004e0-OG for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 09:41:51 +0100 Received: from [195.188.53.231] (helo=webmail.blueyonder.co.uk) by asmtp-out3.blueyonder.co.uk with esmtp (Exim 4.52) id 1MamvW-0005Kq-0y for bug-gnu-emacs@gnu.org; Tue, 11 Aug 2009 09:41:50 +0100 Received: from 84.19.238.174 (SquirrelMail authenticated user); by webmail.blueyonder.co.uk with HTTP; Tue, 11 Aug 2009 09:41:50 +0100 (BST) Message-ID: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> Date: Tue, 11 Aug 2009 09:41:50 +0100 (BST) Subject: grep and null device From: ts011c8050@blueyonder.co.uk To: bug-gnu-emacs@gnu.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Using emacs 23.1.1 on Windows ( also saw it on emacs 22.x and upgraded ) grep is from cygwin "GNU grep 2.5.3" Using rgrep always tags on a null device giving lots of output like grep: NUL: No such file or directory grep: NUL: No such file or directory grep: NUL: No such file or directory grep: NUL: No such file or directory grep: NUL: No such file or directory I've tried customising and turning of grep-use-null-device - as from a quick look at grep.el this is responsible. But no success. Bug recreated using -no-init-file and -no-site-file In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) of 2009-07-30 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.4)' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENG value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Custom Minor modes in effect: tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e g g r e p * . a s C-a C-k $ F L A S H / L : : g r e p M-x r g r e p M-x r g r e p M-x r e p o r t - e m Recent messages: Creating group... Creating group members... 91% Creating group magic... Creating group state... Creating group... done Creating customization items ...done Resetting customization items...done Creating customization setup...done To install your edits, invoke [State] and choose the Set operation Grep finished (matches found) [2 times] From eliz@gnu.org Tue Aug 11 11:40:48 2009 Received: (at 4115) by emacsbugs.donarmstrong.com; 11 Aug 2009 18:40:49 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER, IMPRONONCABLE_2 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BIelcU010889 for <4115@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 11:40:48 -0700 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KO8002006JI2Z00@i_mtaout2.012.net.il> for 4115@emacsbugs.donarmstrong.com; Tue, 11 Aug 2009 21:40:40 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.224.142]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KO8008VE6JR0591@i_mtaout2.012.net.il>; Tue, 11 Aug 2009 21:40:40 +0300 (IDT) Date: Tue, 11 Aug 2009 21:40:42 +0300 From: Eli Zaretskii Subject: Re: bug#4115: grep and null device In-reply-to: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> X-012-Sender: halo1@inter.net.il To: ts011c8050@blueyonder.co.uk, 4115@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83r5vijis5.fsf@gnu.org> References: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> > Date: Tue, 11 Aug 2009 09:41:50 +0100 (BST) > From: ts011c8050@blueyonder.co.uk > Cc: > > Using emacs 23.1.1 on Windows ( also saw it on emacs 22.x and upgraded ) > grep is from cygwin "GNU grep 2.5.3" > > > Using rgrep always tags on a null device giving lots of output like > > grep: NUL: No such file or directory Does Cygwin support NUL as the Windows null device? If not, that's your problem. Doesn't `rgrep' also invoke `find'? (It should show the full command it is running in the "*grep*" buffer.) If so, what port of `find' are you using? From eliz@gnu.org Tue Aug 11 13:35:04 2009 Received: (at 4115) by emacsbugs.donarmstrong.com; 11 Aug 2009 20:35:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BKZ2G4022735 for <4115@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 13:35:04 -0700 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KO800M00BMHTJ00@i_mtaout3.012.net.il> for 4115@emacsbugs.donarmstrong.com; Tue, 11 Aug 2009 23:34:55 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.224.142]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KO800DMRBU6PW90@i_mtaout3.012.net.il>; Tue, 11 Aug 2009 23:34:55 +0300 (IDT) Date: Tue, 11 Aug 2009 23:34:57 +0300 From: Eli Zaretskii Subject: Re: bug#4115: grep and null device In-reply-to: <000001ca1ab4$f5c738b0$e155aa10$@co.uk> X-012-Sender: halo1@inter.net.il To: shippeys Cc: 4115@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83prb2jdhq.fsf@gnu.org> References: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> <83r5vijis5.fsf@gnu.org> <000001ca1ab4$f5c738b0$e155aa10$@co.uk> > From: "shippeys" > Date: Tue, 11 Aug 2009 19:53:05 +0100 Please use Reply-All, to let the bug-tracker archive all the discussion. > > > grep: NUL: No such file or directory > > > > Does Cygwin support NUL as the Windows null device? If not, that's > > your problem. > > > > Yes - Would it be the grep.el code that gets confused and picks NUL? You are using a native Windows port of Emacs. NUL is the standard name of the null device on that system. Why do you think it gets confused? > AIUI the null device is only there to make sure the grep call doesn't hang > if you forget to pass it files to search. It seems a lot of pain for a > marginal benefit! I don't know yet why null device is there. Seeing the command line would help. From jasonrumney@gmail.com Tue Aug 11 15:47:53 2009 Received: (at 4115) by emacsbugs.donarmstrong.com; 11 Aug 2009 22:47:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-pz0-f198.google.com (mail-pz0-f198.google.com [209.85.222.198]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7BMlpQ7003259 for <4115@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 15:47:52 -0700 Received: by pzk36 with SMTP id 36so4033533pzk.13 for <4115@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 15:47:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :date:from:user-agent:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=STAMvvKJRIFkq0N8Qz+SWN2DXNDgs7Vo4dBxgVCm8Qg=; b=aMTxu1vflQ7xPYR9B1xjac2+9MMHx2pe1CsyNyAKQpE+VVTN2B7LrfCwTNs149Fs8c wQeMRtftc3A+405mUxNuh9QKUuH9d6S/JbphPYBZ1bBEhGENl2RHCvV7x3jBCyohgy+y LfFbzHYgOrK8NV0qr/06rBZoUQpvHJyH2fApk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=xGaqocGuDr392GBm3efDNbmGOrXS/uJ/1UeGdqTb7+K8mAlMds6YeuXLRfeIZKq3/H RK66HqHZTExxG2wKQTHXGyLVzrqgWWKvUFo8xFG7lhmvzxlT+OJkhVv/iug6Q6+lNP9G 5Nao5fI8CpZFKEef5bnw6mnkCj7xsQSncjLT8= Received: by 10.114.201.10 with SMTP id y10mr8899367waf.95.1250030866220; Tue, 11 Aug 2009 15:47:46 -0700 (PDT) Received: from wanchan.jasonrumney.net ([124.13.5.71]) by mx.google.com with ESMTPS id m28sm11480222waf.37.2009.08.11.15.47.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 11 Aug 2009 15:47:45 -0700 (PDT) Sender: Jason Rumney Received: from wanchan.jasonrumney.net (localhost [127.0.0.1]) by wanchan.jasonrumney.net (Postfix) with ESMTP id 3056CB71; Wed, 12 Aug 2009 06:47:42 +0800 (MYT) Message-ID: <4A81F50D.3010707@gnu.org> Date: Wed, 12 Aug 2009 06:47:41 +0800 From: Jason Rumney User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Eli Zaretskii , 4115@debbugs.gnu.org CC: shippeys Subject: Re: bug#4115: grep and null device References: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> <83r5vijis5.fsf@gnu.org> <000001ca1ab4$f5c738b0$e155aa10$@co.uk> <83prb2jdhq.fsf@gnu.org> In-Reply-To: <83prb2jdhq.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Eli Zaretskii wrote: >> AIUI the null device is only there to make sure the grep call doesn't hang >> if you forget to pass it files to search. It seems a lot of pain for a >> marginal benefit! >> > > I don't know yet why null device is there. Seeing the command line > would help. > It is there to force grep to print filenames in its output, even if only a single filename is given on the command line. From eliz@gnu.org Tue Aug 11 20:10:30 2009 Received: (at 4115) by emacsbugs.donarmstrong.com; 12 Aug 2009 03:10:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout3.012.net.il (mtaout3.012.net.il [84.95.2.7]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7C3ASml001129 for <4115@emacsbugs.donarmstrong.com>; Tue, 11 Aug 2009 20:10:29 -0700 Received: from conversion-daemon.i_mtaout3.012.net.il by i_mtaout3.012.net.il (HyperSendmail v2004.12) id <0KO800K00U2THO00@i_mtaout3.012.net.il> for 4115@emacsbugs.donarmstrong.com; Wed, 12 Aug 2009 06:10:22 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.224.142]) by i_mtaout3.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KO800BYIU59ID90@i_mtaout3.012.net.il>; Wed, 12 Aug 2009 06:10:22 +0300 (IDT) Date: Wed, 12 Aug 2009 06:10:24 +0300 From: Eli Zaretskii Subject: Re: bug#4115: grep and null device In-reply-to: <000c01ca1acf$29cca3b0$7d65eb10$@co.uk> X-012-Sender: halo1@inter.net.il To: Tom Shippey Cc: 4115@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83ocqlk9r3.fsf@gnu.org> References: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> <83r5vijis5.fsf@gnu.org> <000001ca1ab4$f5c738b0$e155aa10$@co.uk> <83prb2jdhq.fsf@gnu.org> <000c01ca1acf$29cca3b0$7d65eb10$@co.uk> > From: "Tom Shippey" > Date: Tue, 11 Aug 2009 23:00:38 +0100 > > find . \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o > -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o -path > \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o -type f \( > -iname \*.c \) -exec grep -i -n junk {} NUL \; > ./x.c:1:junk > ./x.c:3:junk > grep: NUL: No such file or directory > grep: NUL: No such file or directory Does it help to set null-device to "/dev/null"? From eliz@gnu.org Wed Aug 12 10:32:46 2009 Received: (at 4115-done) by emacsbugs.donarmstrong.com; 12 Aug 2009 17:32:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mtaout1.012.net.il (mtaout1.012.net.il [84.95.2.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7CHWiaJ016789 for <4115-done@emacsbugs.donarmstrong.com>; Wed, 12 Aug 2009 10:32:46 -0700 Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KO900900Y14VS00@i-mtaout1.012.net.il> for 4115-done@emacsbugs.donarmstrong.com; Wed, 12 Aug 2009 20:32:35 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.224.142]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KO9006TGY2AHW80@i-mtaout1.012.net.il>; Wed, 12 Aug 2009 20:32:35 +0300 (IDT) Date: Wed, 12 Aug 2009 20:32:38 +0300 From: Eli Zaretskii Subject: Re: bug#4115: grep and null device In-reply-to: <001501ca1b21$a118aca0$e34a05e0$@co.uk> X-012-Sender: halo1@inter.net.il To: Tom Shippey Cc: 4115-done@debbugs.gnu.org Reply-to: Eli Zaretskii Message-id: <83my65j5u1.fsf@gnu.org> References: <3988.84.19.238.174.1249980110.UEIUQ2lbQEh6Qw==.squirrel@84.19.238.174> <83r5vijis5.fsf@gnu.org> <000001ca1ab4$f5c738b0$e155aa10$@co.uk> <83prb2jdhq.fsf@gnu.org> <000c01ca1acf$29cca3b0$7d65eb10$@co.uk> <83ocqlk9r3.fsf@gnu.org> <001501ca1b21$a118aca0$e34a05e0$@co.uk> > From: "Tom Shippey" > Date: Wed, 12 Aug 2009 08:50:57 +0100 > > > > find . \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path > > \*/MCVS -o > > > -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o - > > path > > > \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o -type f > > \( > > > -iname \*.c \) -exec grep -i -n junk {} NUL \; > > > ./x.c:1:junk > > > ./x.c:3:junk > > > grep: NUL: No such file or directory > > > grep: NUL: No such file or directory > > > > Does it help to set null-device to "/dev/null"? > > Yep - that works fine. Many thanks. Thanks. I'm closing the bug, because its reason is mixing a native Windows build of Emacs with Cygwin shell that apparently does not support NUL as the null device. From unknown Mon Aug 18 08:55:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Sep 2009 14:24:11 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator