This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: where was mention of what creates NUL files?
- From: Oleksandr Gavenko <gavenko at bifit dot com dot ua>
- To: cygwin at cygwin dot com
- Date: Mon, 20 Sep 2010 12:40:06 +0300
- Subject: Re: where was mention of what creates NUL files?
- References: <4C93A171.4040402@fgm.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