X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=0.2 required=5.0	tests=AWL,BAYES_00,RCVD_IN_SORBS_WEB,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Oleksandr Gavenko <gavenko@bifit.com.ua>
Subject: Re: where was mention of what creates NUL files?
Date: Mon, 20 Sep 2010 12:40:06 +0300
Lines: 29
Message-ID: <i77a5a$30t$1@dough.gmane.org>
References: <4C93A171.4040402@fgm.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
In-Reply-To: <4C93A171.4040402@fgm.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 17.09.2010 20:12, Daniel Barclay wrote:
> Does anyone recall a mention of what in CygWin (or possibly Emacs) creates
> files with a simple name of "NUL"?
>
I also use native Emacs and after some operation I got file with name NUL.

I have a lot NUL files in many dirs, which can be removed only from Cygwin:

   $ rm NUL

I don't fully  debug but think this come from 'null-device' variable
(which has 'NUL' value by default).

To friend native GNU Emacs with Cygwin (and stop creating NUL) I use:

(when (eq system-type 'windows-nt)
   (setq shell-file-name "bash")
   ;; Workaround for Cygwin shell, when set 'CYGWIN=noglob'. By default 
'shell-quote-argument'
   ;; quoted by double '\' chars this cause failure.
   (defun shell-quote-argument (argument)
     (concat "'" argument "'")
     )
   ;; Workaround for Cygwin when 'shell-file-name' is 'bash'.
   (setq null-device "/dev/null")
   )

--
Happy hacking!


--
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

