From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12239 invoked by alias); 27 Jun 2013 18:58:13 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12213 invoked by uid 89); 27 Jun 2013 18:58:10 -0000 X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from limerock02.mail.cornell.edu (HELO limerock02.mail.cornell.edu) (128.84.12.100) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 18:58:09 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock02.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id r5RIw35M007725 for ; Thu, 27 Jun 2013 14:58:07 -0400 Received: from [192.168.1.6] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id r5RIw2uD029434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 27 Jun 2013 14:58:03 -0400 Message-ID: <51CC8B0C.9070809@cornell.edu> Date: Thu, 27 Jun 2013 19:00:00 -0000 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: where was mention of what creates NUL files? References: <4C93A171.4040402@fgm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00692.txt.bz2 On 6/26/2013 2:53 PM, g wrote: > > > > Daniel Barclay fgm.com> writes: > >> >> Does anyone recall a mention of what in CygWin (or possibly Emacs) creates >> files with a simple name of "NUL"? >> >> Thanks, >> Daniel >> >> > > > This has been driving me nuts for years. Finally tracked it down. > These are created by emacs' man.el code when you get a man page. > Reproduce: > In emacs, do: > M-x man > > Now, you'll see a NUL file in the directory. I can't reproduce this with Cygwin emacs. You must be using native Windows emacs. > Root cause: > construction of the 'man' command that is passed to the shell includes: > (concat " %s 2>" null-device) > > The variable `null-device' is platform specific and defaults to a pure-copy > of "/dev/null" which, apparently, becomes "NUL" on windows. > > It is a defvar in files.el and 'set' again in dos-w32.el. > > Resolution: > In your .emacs file, do: > > (require 'dos-w32) ;; load this first to avoid it undo'ing the next line > (setq null-device "c:/tmp/emacs-dev-null.txt") ;; set to anything Just to be clear, users of Cygwin emacs should *not* do this. Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple