[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-nano] Altering DOS/Mac/Unix terminated text files
From: |
Fergus Daly |
Subject: |
Re: [Help-nano] Altering DOS/Mac/Unix terminated text files |
Date: |
Wed, 25 Mar 2015 08:04:42 +0000 |
Thank you for getting back to me so rapidly.
>> If I use nano -N on a DOS file, then I see at the end of each and every line
>> a ^M. Don't you see this?
Yes I do.
>> Maybe the explanation of the option should be improved: it doesn't convert
>> the actual file, it just converts the internal representation.
Yes: it's more "what you see" rather than "what you get".
>> I think that in general when one edits a file, one surely does not want the
>> editor to change the format of the file without having explicitly asked it
>> to do that.
I agree. The default
nano (no argument) = if not Unix, convert to Unix
was probably non-optimal (though it suited me.)
>> Secondly I think it is not an editor's task to convert formats -- sure, it
>> would be cool if it could do that, but it is an extra bell or whistle.
I agree with both your assertions "not a task" and "cool if it could". I notice
that nano (current v.2.4.0) now offers nothing at all on DOS / Mac / Unix
formats other than the option -N which as we have already observed is not
optimal, or at least not described optimally, (and might not even be useful).
How's this for an ambition for the next version? (And where should I go if I
want to request it, do you know?)
nano (no argument) = do not change format
nano -U = if not Unix, convert to Unix
nano -D = if not DOS, convert to DOS
nano -M = if not Mac, convert to Mac
So in general things i.e. by default are left as they are but nano does allow
format changes.
Thanks again for your swift and knowledgeable response.
Fergus
-----Original Message-----
From: Benno Schulenberg [mailto:address@hidden
Sent: 24 March 2015 11:09
To: Fergus Daly
Cc: address@hidden
Subject: Re: [Help-nano] Altering DOS/Mac/Unix terminated text files
Hello Fergus,
On Tue, Mar 24, 2015, at 08:51, Fergus Daly wrote:
> Just started using nano 2.4.0. As with many previous versions
> nano -help
> yields
> -N --noconvert Don't convert files from DOS/Mac format
> carrying the implication that without the switch -N, files will be converted
> to Unix format.
> But this is not what happens.
> nano (no argument)
> nano -N
> are identical: they don't convert.
Hmm... If I use nano -N on a DOS file, then I see at the end of each and every
line a ^M. Don't you see this?
Maybe the explanation of the option should be improved: it doesn't convert the
actual file, it just converts the internal representation.
> If you go back far enough the following beautiful behaviour is what happened
> with v.1.3.4:
> nano (no argument) = if not Unix, convert convert to Unix
> nano -D = if not DOS, convert to DOS
> nano -M = if not Mac, convert to Mac
> nano -N = do not change format
> PLEASE could nano v.current be made to mimic the marvellous behaviour of
> 1.3.4?
I think that in general when one edits a file, one surely does not want the
editor to change the format of the file without having explicitly asked it to
do that. Secondly I think it is not an editor's task to convert formats --
sure, it would be cool if it could do that, but it is an extra bell or whistle.
There are tools like dos2unix or simple seds that can do that.
> Or, if not, how can I get
> nano {? switch} = if not Unix, convert to Unix
Benno
--
http://www.fastmail.com - Send your email first class
- [Help-nano] Altering DOS/Mac/Unix terminated text files, Fergus Daly, 2015/03/24
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Benno Schulenberg, 2015/03/24
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files,
Fergus Daly <=
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Benno Schulenberg, 2015/03/25
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Fergus Daly, 2015/03/25
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Chris Allegretta, 2015/03/25
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Benno Schulenberg, 2015/03/25
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Fergus Daly, 2015/03/26
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Benno Schulenberg, 2015/03/26
- Re: [Help-nano] Altering DOS/Mac/Unix terminated text files, Benno Schulenberg, 2015/03/25