You are not logged in.

#1 2008-08-04 10:02:55

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Shouldn't Nano be packaged with nowrap by default?

Nano's default behaviour of hard-wrappig lines can be quite dangerous for newbies, it can for example thrash grub lines easily when adding some text like vga=773 in combination with long uuid's. Shouldn't Nano better be packaged with 'set nowrap', and called with nano -w in the installer?

I can't think of many use cases for hard wrapping text anyway... wink


ᶘ ᵒᴥᵒᶅ

Offline

#2 2008-08-04 10:33:15

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Shouldn't Nano be packaged with nowrap by default?

It seems like a safe thing to do.

Most stuff can be broken up though, like the modules array. Just be sure to add a space before the \

Offline

#3 2008-08-04 10:38:43

ScriptDevil
Member
From: In Front of My PC
Registered: 2006-04-06
Posts: 253

Re: Shouldn't Nano be packaged with nowrap by default?

put

alias nano="nano -w"

in your .bashrc


Be yourself, because you are all that you can be

Offline

#4 2008-08-04 10:46:35

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Shouldn't Nano be packaged with nowrap by default?

ScriptDevil wrote:

put

alias nano="nano -w"

in your .bashrc

yes i know that now, but not when i was installing arch. coming from ubuntu where hard-wrap is disabled by default, i had no idea i was about to prevent my computer from booting when i added some parameters to grub.

Last edited by litemotiv (2008-08-04 10:48:54)


ᶘ ᵒᴥᵒᶅ

Offline

#5 2008-08-04 13:13:24

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Shouldn't Nano be packaged with nowrap by default?

Oh, the hard wrapping used to drive me mad. then I switched to emacs lol

Offline

#6 2008-08-04 13:49:35

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,123

Re: Shouldn't Nano be packaged with nowrap by default?

Packaging nano without hardwrap isn't a very KISS approach. PKGs are supposed to be as vanilla as possible. But adding -w to the calls in the setup might be a good thing to do. File a bug report.


Haven't been here in a while. Still rocking Arch. smile

Offline

#7 2008-08-06 11:51:25

Agent69
Member
Registered: 2006-05-26
Posts: 189

Re: Shouldn't Nano be packaged with nowrap by default?

While I can see the point the OP is making, I feel that Arch should just go with whatever the developer default is.

Offline

#8 2008-08-06 12:06:55

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Shouldn't Nano be packaged with nowrap by default?

Agent69 wrote:

While I can see the point the OP is making, I feel that Arch should just go with whatever the developer default is.

big_smile

Offline

#9 2008-09-03 11:59:31

zatricky
Member
From: Cape Town
Registered: 2008-09-03
Posts: 55
Website

Re: Shouldn't Nano be packaged with nowrap by default?

It seems that nowrap is now not available in nano. Is this as a result of an upstream change?

I had this aliased just as it is suggested previously here and so every time I typed "nano filename" I just got the help info. hmm I've commented out the alias in my .bashrc so long but its a little silly.

I also had the "set nowrap" option set in /etc/nanorc but now I get an error every time I open nano:

brendan@watricky:~$ nano .bashrc

Error in /etc/nanorc on line 94: Unknown flag "nowrap"

Press Enter to continue starting nano.

pacman russian roulette: yes | pacman -Rcs $(pacman -Q | LANG=C sort -R | head -n $((RANDOM % 10)))
(yes, I know its broken)

Offline

#10 2008-09-03 12:38:15

sp42b
Member
Registered: 2008-04-01
Posts: 13

Re: Shouldn't Nano be packaged with nowrap by default?

@zatricky
I had the same error. I comment out the option in /etc/nanorc.

There was a change in the PKGBUILD:
http://repos.archlinux.org/viewvc.cgi/n … iew=markup
./configure --prefix=/usr --sysconfdir=/etc --enable-color --enable-nanorc --enable-multibuffer --disable-wrapping

Offline

#11 2008-09-03 12:44:25

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Shouldn't Nano be packaged with nowrap by default?

But still there is this option available in /etc/nanorc ... But that's useless now, so it would be better to remove these two lines in this config as well

Offline

#12 2008-09-03 12:55:34

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,479
Website

Re: Shouldn't Nano be packaged with nowrap by default?

Ask me, and I'm having a hard time, nano -w does not function anymore, and I keep typing nano -w for everything still. sad


Follow me in: Identi.ca, Twitter, Google+

Offline

#13 2008-09-03 13:01:48

zatricky
Member
From: Cape Town
Registered: 2008-09-03
Posts: 55
Website

Re: Shouldn't Nano be packaged with nowrap by default?

Lol. So it looks like the default is to not do any wrapping at all anyway now. smile

Thanks, sp42b


pacman russian roulette: yes | pacman -Rcs $(pacman -Q | LANG=C sort -R | head -n $((RANDOM % 10)))
(yes, I know its broken)

Offline

#14 2008-09-03 14:22:28

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 3,951

Re: Shouldn't Nano be packaged with nowrap by default?

http://bugs.archlinux.org/task/11290, see the closing comment.

Last edited by Mr.Elendig (2008-09-05 13:08:55)


Evil #archlinux@freenode channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#15 2008-09-03 14:32:20

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Shouldn't Nano be packaged with nowrap by default?

litemotiv wrote:

Nano's default behaviour of hard-wrappig lines can be quite dangerous for newbies...<snip>....I can't think of many use cases for hard wrapping text anyway... wink

I would suggest taking it up with the original Nano developers/maintainers.  Our general policy is to keep the default settings from the source--they usually make such choices for a reason.


thayer williams ~ cinderwick.ca

Offline

#16 2008-09-03 18:01:48

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Shouldn't Nano be packaged with nowrap by default?

thayer wrote:

I would suggest taking it up with the original Nano developers/maintainers.  Our general policy is to keep the default settings from the source--they usually make such choices for a reason.

that makes absolutely no sense in this context thayer.

it's just a matter of running nano with the right parameter during arch-install, you can keep the package itself as vanilla as you want. "their" design reasons are per definition less valid than the specific circumstances we are using it for, in this case a crucial part of the installation process. for our scenario there is no point in using hard line breaks, but there are good reasons not to.


ᶘ ᵒᴥᵒᶅ

Offline

#17 2008-09-03 18:36:27

liquibyte
Member
Registered: 2007-11-11
Posts: 91
Website

Re: Shouldn't Nano be packaged with nowrap by default?

Arch Linux defines simplicity as a lightweight base structure without unnecessary additions, modifications, or complications, that allows an individual user to shape the system according to their own needs. In short; an elegant, minimalist approach.

If I need something to do things a certain way, I do so.  If I have a problem I can't fix I ask someone that may know more than I do about the given subject.  I had exactly the same problem during a recent upgrade.  It annoyed me for about a minute after I encountered it until I fixed it.  I used neither the internet or a book to fix it, just my own brain.  Go figure.  I like the Arch way, and as a matter of fact if Arch didn't exist I would probably be using LFS.  More work, yes, but my way.

Offline

#18 2008-09-03 18:54:27

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Shouldn't Nano be packaged with nowrap by default?

replacing the any old nanorc with the default shipped and probably installed as /etc/nanorc.pacnew config should solve all issues. nano shouldn't destroy config files anymore. adding one useful configure switch is still enough vanilla. other major distribution do it the same way. it's still easy to rebuild the pkg without that switch if someone wants the line wrapping back.

Offline

#19 2008-09-04 21:50:20

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Shouldn't Nano be packaged with nowrap by default?

AndyRTR wrote:

replacing the any old nanorc with the default shipped and probably installed as /etc/nanorc.pacnew config should solve all issues. nano shouldn't destroy config files anymore. adding one useful configure switch is still enough vanilla. other major distribution do it the same way. it's still easy to rebuild the pkg without that switch if someone wants the line wrapping back.

Wouldn't it make a little more sense to keep the option enabled, and add "nowrap" to the default nanorc shipped with the package?

Offline

#20 2008-09-05 13:08:25

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 3,951

Re: Shouldn't Nano be packaged with nowrap by default?

I see that noone read closing message on the bug report I posted, so here it is in plain text:

Closed by  Andreas Radke (AndyRTR)
Monday, 25 August 2008, 13:40 GMT+1
Reason for closing:  Fixed
Additional comments about closing:  I disabled line wrapping in 2.0.8-1 release to prevent such issues for the future.

Of course, that don't solve the problem on the current livecd hmm

Last edited by Mr.Elendig (2008-09-05 13:10:01)


Evil #archlinux@freenode channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#21 2008-09-05 13:17:37

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Offline

#22 2008-10-09 20:06:22

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Shouldn't Nano be packaged with nowrap by default?

$ file `which nano`
/usr/bin/nano: symbolic link to `/usr/bin/vim'
$

Not sure what you mean... wink

Offline

#23 2008-10-09 21:28:41

zatricky
Member
From: Cape Town
Registered: 2008-09-03
Posts: 55
Website

Re: Shouldn't Nano be packaged with nowrap by default?

bparsons wrote:

I tried to adapt after using -w for many years with pico and then with nano. But I admin many servers that are not Arch based and instinctively type -w after nano.

So I submitted a package to the AUR that is the same as the official repo package but without the --disable-wrapping flag.

http://aur.archlinux.org/packages.php?ID=20596

As a temporary measure, this goes a long way. smile

From what I understand of the dev thread, the --disable-wrapping flag option isn't an "upstream" default. If we want to maintain everything as close to the upstream setup then the best would be to remove the flag at compile-time. To maintain installation integrity, I don't believe that adding a note saying "watch out for the wrapping!" is good enough. I find that laughable at best. The installer should just use the -w flag as its the simplest and least "invasive" way to completely avoid the original problem (wrapping of config and/or script files causing an installation to go awry).

If you want to customise, you can always either add the -w or modify your nanorc. You should already be used to having to do this if you've got nano experience from other distros. This thread just shows that this very small (yet significant) change has only added confusion into the mix.

Maybe we should just submit a bug to nano's devs asking them to change the default behaviour. Then we can confuse every other distro's users instead! hehe.

Last edited by zatricky (2008-10-09 21:30:34)


pacman russian roulette: yes | pacman -Rcs $(pacman -Q | LANG=C sort -R | head -n $((RANDOM % 10)))
(yes, I know its broken)

Offline

Board footer

Powered by FluxBB