Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96995 - nano no longer saves dos-format text files as linux-format
Summary: nano no longer saves dos-format text files as linux-format
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 16:52 UTC by pogo
Modified: 2005-08-19 20:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pogo 2005-06-24 16:52:32 UTC
A file in ms-dos text format (carriage return & linefeed) when loaded and 
edited and then saved in nano used to be saved by nano as unix format (just a 
linefeed).  As of a week (or so) ago, this no longer happens.  Now when nano 
saves, it no longer converts the new saved file to unix (linefeed only) format.  
Most likely there was a version change (to nano) caused by an "emerge world" 
and the new version of nano has a new bug or problem.  I attempted to work 
around this problem by adding "unset noconvert" to my ~/.nanorc file but that 
has had no effect. 
 

Reproducible: Always
Steps to Reproduce:
1. create a file (not in nano) that is a text file in ms-dos format.  The way I 
do this is to boot uinto windows and run notepad or edit.com.  name the file 
test.txt 
2. boot into linux (if not in linux already) and type "nano test.txt" 
3. in nano, make a change, any change, to the file (just add a space, for 
example) 
4. save the file via control-o and then pressing enter 
5. examine the file in a hex editor and see if any CR (ascii 13, hex 0d) 
characters remain in the file.  If they are still there, you have succefully 
replicated this bug 
Actual Results:  
the saved file had CR-LF pairs at each end of line 

Expected Results:  
the saved file should have LF only at the end of line, not CR-LF 

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, 
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r11 i686) 
================================================================= 
System uname: 2.6.11-gentoo-r11 i686 Intel(R) Pentium(R) 4 CPU 1500MHz 
Gentoo Base System version 1.6.12 
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May  5 2005, 03:02:47)] 
dev-lang/python:     2.3.5 
sys-apps/sandbox:    [Not Present] 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.5, 1.9.5, 1.8.5-r3, 1.4_p6, 1.6.3, 1.7.9 
sys-devel/binutils:  2.15.92.0.2-r10 
sys-devel/libtool:   1.5.16 
virtual/os-headers:  2.6.8.1-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
LDFLAGS="-Wl,-O1" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl doc emboss 
encode esd fam flac foomaticdb fortran gdbm gif gnome gpm gtk gtk2 gtkhtml 
guile imagemagick imlib ipv6 java jpeg junit kde libg++ libwww mad mikmod mmx 
motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python 
qt quicktime readline real sdl slang speex spell sse2 ssl svga tcltk tcpd tiff 
truetype truetype-fonts type1-fonts vorbis xine xml xml2 xmms xv zlib ~canna 
~cjk ~freewnn userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LINGUAS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2005-06-25 23:16:20 UTC
works fine for me

$ echo "blah" > foo
$ unix2dos foo
$ nano foo
<add some lines and save>
$ file foo
foo: ASCII text, with CRLF line terminators

i normally have 'set noconvert' in my .nanorc but once i commented out the line
it worked fine
Comment 2 SpanKY gentoo-dev 2005-07-02 07:04:03 UTC
try nano-1.3.8
Comment 3 SpanKY gentoo-dev 2005-08-19 20:39:26 UTC
works for me in 1.3.8