X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=jEmtiNNPgazYctHRWYhp8ESOXKnTaF1jTg2Xh9Pui3U 0+gdD8OMZeQNK5EJdEcBdQlf7gpaiYWjSyGrJ4+8fTqhAMSadu71s6J3ymzJCG9t h9/44svFNC/EM3kO0VP0+pMxMyULt4xb7BR6coWzIr3HWR9YofLoSPal+K0GjRsE = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=RZFCNBXYbqHAY3i01wqx0XpZeq0=; b=mZOOyrPSke6Mri465 dgWgRMjnwHlkcxdXMY4CJ2kKBCCCWmPg/ekkKEDyyNvYJI/S2ittOhrQD3A8duGt KEx1UHjGw86CommljehAh8es1Q1+c2fkjh8IbcA8MaGP4sQyKPOaC0V2242gq3Zp K4WNUYcDTRXRjb7xUl8J5EhX7E= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 X-CornellRouted: This message has been Routed already. Message-ID: <51CC8B0C.9070809@cornell.edu> Date: Thu, 27 Jun 2013 14:57:16 -0400 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 AT cygwin DOT com Subject: Re: where was mention of what creates NUL files? References: <4C93A171 DOT 4040402 AT fgm DOT com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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