From tplate at acm.org  Tue Oct 14 17:39:45 2008
From: tplate at acm.org (Tony Plate)
Date: Tue, 14 Oct 2008 09:39:45 -0600
Subject: [Rd] dos-style line endings in .Rbuildignore result in files
 not being excluded
In-Reply-To: <alpine.LFD.2.00.0810141248500.27617@gannet.stats.ox.ac.uk>
References: <48F429D1.6040500@acm.org>	<874p3fn3yf.fsf@patagonia.sebmags.homelinux.org>
	<alpine.LFD.2.00.0810141248500.27617@gannet.stats.ox.ac.uk>
Message-ID: <48F4BD41.1050504@acm.org>

Prof Brian Ripley wrote:
> On Tue, 14 Oct 2008, Sebastian P. Luque wrote:
>
>> On Mon, 13 Oct 2008 23:10:41 -0600,
>> Tony Plate <tplate at acm.org> wrote:
>>
>>> I was trying, on a Linux system, to get a .Rbuildignore file to work.
>>> After far too long, I found the problem was the <CR><NL> line endings
>>> in the .Rbuildignore file -- I had originally created it on a Windows
>>> system, and emacs in Ubuntu was politely hiding that fact from me.
>>
>> Are you sure? Whenever I open M$ files in Emacs under Debian I see
>> '(DOS)' near the left end of the modeline, which indicates that it has
>> ^C as EOL.  This has been the case since at least 21.0.
>
> ^M^J, I think you mean (CRLF).
>
> Emacs is not totally consistent about how it does this: since it tries 
> to guess the file encoding it will usually indicate (DOS) on the mode 
> line, but not always (and it sometimes displays the ^M's, even on 
> Windows).
>
> But to the point: how often do people get DOS-style files on a 
> Unix-alike? You have to work pretty hard to do this, and there comes a 
> point at which complicating R to workaround wrongly encoded files is 
> not worth the trouble.  Let's see if anyone else reports having done 
> this.
>
It was pretty easy for me to get these line endings -- I created the 
file in GNU Emacs under Windows, and rsync'ed the package directory to a 
Ubuntu Linux machine.  I went back and checked, and GNU Emacs under 
Ubuntu did show (DOS) in the status line of the buffer, but I never 
noticed that while I was trying to figure out why my .Rbuildignore file 
wasn't having any effect.  (I think I preferred it when Emacs would show 
^M at the end of each line in a CRLF file -- not showing that is what I 
meant by "hiding it from me".)

-- Tony Plate



[Rd] dos-style line endings in .Rbuildignore result in files not being excluded
Tony Plate