This is the mail archive of the
mailing list for the Cygwin project.
Re: where was mention of what creates NUL files?
- From: wynfield at gmail dot com
- To: <cygwin at cygwin dot com>
- Date: Fri, 28 Jun 2013 06:59:19 +0900
- Subject: Re: where was mention of what creates NUL files?
- References: <4C93A171 dot 4040402 at fgm dot com> <loom dot 20130626T202645-269 at post dot gmane dot org> <51CC8B0C dot 9070809 at cornell dot edu>
I do not have the problem using emacs built on cygwin either.
> On 6/26/2013 2:53 PM, g wrote:
> > Daniel Barclay <daniel <at> 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 <ret>
> > <enter anything, valid ('ls') or not>
> > 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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple