all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Nano: disable hard wrapping by default
@ 2018-11-06 18:43 swedebugia
  2018-11-06 18:49 ` swedebugia
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: swedebugia @ 2018-11-06 18:43 UTC (permalink / raw)
  To: guix-devel

Hi

I stumpled on this hard-wrapping default behavior when editing 
.bash_profile on GuixSD

It is super annoying.

Could we disable it by default?

According to the FAQ this exist:

"With --disable-wrapping-as-root you can disable any hard-wrapping by 
default when the user is root, useful to prevent accidentally changing 
long lines in system configuration files."

"  --disable-wrapping      Disable all hard-wrapping of text"

We only compile with this:

sdb@komputilo ~$ nano -V

  GNU nano, version 2.9.8

snip

  Compiled options: --enable-utf8

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 18:43 Nano: disable hard wrapping by default swedebugia
@ 2018-11-06 18:49 ` swedebugia
  2018-11-06 19:27   ` Alex Vong
  2018-11-07 18:20 ` Leo Famulari
  2019-03-25 19:08 ` Leo Famulari
  2 siblings, 1 reply; 13+ messages in thread
From: swedebugia @ 2018-11-06 18:49 UTC (permalink / raw)
  To: guix-devel


On 2018-11-06 19:43, swedebugia wrote:
> Hi
>
> I stumpled on this hard-wrapping default behavior when editing 
> .bash_profile on GuixSD
>
> It is super annoying.
>
> Could we disable it by default?
>
> According to the FAQ this exist:
>
> "With --disable-wrapping-as-root you can disable any hard-wrapping by 
> default when the user is root, useful to prevent accidentally changing 
> long lines in system configuration files."
>
> "  --disable-wrapping      Disable all hard-wrapping of text"
>
> We only compile with this:
>
> sdb@komputilo ~$ nano -V
>
>  GNU nano, version 2.9.8
>
> snip
>
>  Compiled options: --enable-utf8
>
We could do this also by adding the following to our core ~.bashrc

alias nano="nano --nowrap"

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 18:49 ` swedebugia
@ 2018-11-06 19:27   ` Alex Vong
  2018-11-06 21:57     ` swedebugia
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2018-11-06 19:27 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

swedebugia <swedebugia@riseup.net> writes:

> On 2018-11-06 19:43, swedebugia wrote:
>> Hi
>>
>> I stumpled on this hard-wrapping default behavior when editing
>> .bash_profile on GuixSD
>>
>> It is super annoying.
>>
>> Could we disable it by default?
>>
>> According to the FAQ this exist:
>>
>> "With --disable-wrapping-as-root you can disable any hard-wrapping
>> by default when the user is root, useful to prevent accidentally
>> changing long lines in system configuration files."
>>
>> "  --disable-wrapping      Disable all hard-wrapping of text"
>>
>> We only compile with this:
>>
>> sdb@komputilo ~$ nano -V
>>
>>  GNU nano, version 2.9.8
>>
>> snip
>>
>>  Compiled options: --enable-utf8
>>
> We could do this also by adding the following to our core ~.bashrc
>
> alias nano="nano --nowrap"

I don't use nano. But I think usually we want to stick with the default
provided by upstream. Also, do you know how other distros handle this?
Debian does disable wrapping by default. I think we can change it if
many distros agree that the more sensible default is to disable
wrapping.

Personally though, I prefer wrapping because I can read all the text at
once. I like to see the "whole picture" at once :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 19:27   ` Alex Vong
@ 2018-11-06 21:57     ` swedebugia
  2018-11-07  5:38       ` Alex Vong
  0 siblings, 1 reply; 13+ messages in thread
From: swedebugia @ 2018-11-06 21:57 UTC (permalink / raw)
  To: Alex Vong; +Cc: guix-devel

Hi

On 2018-11-06 20:27, Alex Vong wrote:
> swedebugia <swedebugia@riseup.net> writes:
>
>> On 2018-11-06 19:43, swedebugia wrote:
>>> Hi
>>>
>>> I stumpled on this hard-wrapping default behavior when editing
>>> .bash_profile on GuixSD
>>>
>>> It is super annoying.
>>>
>>> Could we disable it by default?
>>>
>>> According to the FAQ this exist:
>>>
>>> "With --disable-wrapping-as-root you can disable any hard-wrapping
>>> by default when the user is root, useful to prevent accidentally
>>> changing long lines in system configuration files."
>>>
>>> "  --disable-wrapping      Disable all hard-wrapping of text"
>>>
>>> We only compile with this:
>>>
>>> sdb@komputilo ~$ nano -V
>>>
>>>   GNU nano, version 2.9.8
>>>
>>> snip
>>>
>>>   Compiled options: --enable-utf8
>>>
>> We could do this also by adding the following to our core ~.bashrc
>>
>> alias nano="nano --nowrap"
> I don't use nano. But I think usually we want to stick with the default
> provided by upstream. Also, do you know how other distros handle this?
> Debian does disable wrapping by default. I think we can change it if
> many distros agree that the more sensible default is to disable
> wrapping.
>
> Personally though, I prefer wrapping because I can read all the text at
> once. I like to see the "whole picture" at once :)

That is what soft wrapping is for (soft wrap = on screen only, hard wrap 
= break lines with \n to fit on screen whatever the cost).

Soft wrapping is supported with: --softwrap

Arch/Antergos has this:

$ nano -V
  GNU nano, version 3.1
  Kompileringsflaggor: --disable-wrapping-as-root --enable-utf8

Gentoo warns in their wiki but compile as we do now with utf8. 
https://packages.gentoo.org/packages/app-editors/nano

Nixpkgs uses no arguments 
https://github.com/NixOS/nixpkgs/blob/1c2d575205f7aa3fc37d64d0606e3fd33de08d74/pkgs/applications/editors/nano/default.nix

Dunno with other distributions.

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 21:57     ` swedebugia
@ 2018-11-07  5:38       ` Alex Vong
  2018-11-07  9:19         ` Thorsten Wilms
  0 siblings, 1 reply; 13+ messages in thread
From: Alex Vong @ 2018-11-07  5:38 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]

swedebugia <swedebugia@riseup.net> writes:

[...]
>
> That is what soft wrapping is for (soft wrap = on screen only, hard
> wrap = break lines with \n to fit on screen whatever the cost).
>
> Soft wrapping is supported with: --softwrap
>
> Arch/Antergos has this:
>
> $ nano -V
>  GNU nano, version 3.1
>  Kompileringsflaggor: --disable-wrapping-as-root --enable-utf8
>
> Gentoo warns in their wiki but compile as we do now with
> utf8. https://packages.gentoo.org/packages/app-editors/nano
>
Good to learn something new! For editing files, I prefer soft wrapping
because of the reason mentioned before but not hard wrapping because of
the reason mentioned by Gentoo:

  Important

  To edit configuration files always pass nano the -w option. Without
  the -w option long lines become wrapped lines. This creates problems
  when saving because the lines are saved as wrapped lines instead of
  how they were in the original file. Many time this will break
  configuration files. 

Although I do use hard wrapping when writing emails and git commit
messages in Emacs (in different modes).

> Nixpkgs uses no arguments
> https://github.com/NixOS/nixpkgs/blob/1c2d575205f7aa3fc37d64d0606e3fd33de08d74/pkgs/applications/editors/nano/default.nix
>
> Dunno with other distributions.

For Debian, 'nano -V' displays:

alexvong1995@debian:~$ nano -V
 GNU nano,版本 3.1
 (C) 1999-2011, 2013-2018 Free Software Foundation, Inc.
 (C) 2014-2018 Nano 貢獻者
 電子郵件: nano@nano-editor.org	網頁: https://nano-editor.org/
 編譯選項: --disable-libmagic --disable-wrapping-as-root --enable-utf8

I think we can also go ahead with the change if many nano users think it
is a better default (even if not all distros do it). 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-07  5:38       ` Alex Vong
@ 2018-11-07  9:19         ` Thorsten Wilms
  2018-11-11  8:02           ` swedebugia
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Wilms @ 2018-11-07  9:19 UTC (permalink / raw)
  To: guix-devel

On 07/11/2018 06.38, Alex Vong wrote:
>    To edit configuration files always pass nano the -w option. Without
>    the -w option long lines become wrapped lines. This creates problems
>    when saving because the lines are saved as wrapped lines instead of
>    how they were in the original file. Many time this will break
>    configuration files.

Even though I got in the habit of always using -w back in my Gentoo 
days, I either never knew leaving it out would have affected more than 
display, or I have forgotten about it. I think this qualifies as 
unexpected/surprising behavior.

> I think we can also go ahead with the change if many nano users think it
> is a better default (even if not all distros do it).

Ubuntu is also in the --disable-wrapping-as-root flag club.

A potential reason against joining would be if there's a real need for 
the default behavior (no --disable-wrapping-as-root, no -w) and it being 
hard to achieve with the flag. It looks like the option to use would be:

-r number, --fill=number
Hard-wrap  lines at column number.  If this value is 0 or less, wrapping 
will occur at the width of the screen less number columns, allowing the 
wrap point to vary along with the width of the screen  if  the screen 
is resized.  The default value is -8.  This option conflicts with -w 
(--nowrap) -- the last one given takes effect.


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 18:43 Nano: disable hard wrapping by default swedebugia
  2018-11-06 18:49 ` swedebugia
@ 2018-11-07 18:20 ` Leo Famulari
  2018-11-11  8:04   ` swedebugia
  2019-03-25 19:08 ` Leo Famulari
  2 siblings, 1 reply; 13+ messages in thread
From: Leo Famulari @ 2018-11-07 18:20 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

On Tue, Nov 06, 2018 at 07:43:21PM +0100, swedebugia wrote:
> Could we disable it by default?
> 
> According to the FAQ this exist:
> 
> "With --disable-wrapping-as-root you can disable any hard-wrapping by
> default when the user is root, useful to prevent accidentally changing long
> lines in system configuration files."
> 
> "  --disable-wrapping      Disable all hard-wrapping of text"

In general, we don't change upstream defaults in Guix except when it's
required for portability or to fix really egregious problems (i.e.
security bugs). This is different from distros like Debian that
basically fork the software and make a huge number of changes to suit
the package maintainer's taste.

This keeps package maintenance relatively easy for us and ensures that
important changes get pushed upstream so that all users can benefit.

Having said that, this line wrapping thing is a very bad default, and I
think we should change it. Nano is one of the editors in the GuixSD
installer. It needs to be easy to use.

If we change the default in our package, we need to file a bug upstream:

https://savannah.gnu.org/bugs/?group=nano

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-07  9:19         ` Thorsten Wilms
@ 2018-11-11  8:02           ` swedebugia
  2018-11-11 10:16             ` Thorsten Wilms
  0 siblings, 1 reply; 13+ messages in thread
From: swedebugia @ 2018-11-11  8:02 UTC (permalink / raw)
  To: t_w_, guix-devel

On 2018-11-07 10:19, Thorsten Wilms wrote:

snip

> Ubuntu is also in the --disable-wrapping-as-root flag club.
> 
> A potential reason against joining would be if there's a real need for 
> the default behavior (no --disable-wrapping-as-root, no -w) and it being 
> hard to achieve with the flag. 

I can think of no such need. Could we add --disable-wrapping-as-root and 
advise the user in the specification to create his own package inherited 
from nano instead?

If a valid need does surface we can discuss changing the default.

> It looks like the option to use would be:
> 
> -r number, --fill=number
> Hard-wrap  lines at column number.  If this value is 0 or less, wrapping 
> will occur at the width of the screen less number columns, allowing the 
> wrap point to vary along with the width of the screen  if  the screen is 
> resized.  The default value is -8.  This option conflicts with -w 
> (--nowrap) -- the last one given takes effect.

If I understand you correctly adding this as root would reenable the -w 
behavior?

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-07 18:20 ` Leo Famulari
@ 2018-11-11  8:04   ` swedebugia
  2018-11-15 13:14     ` swedebugia
  0 siblings, 1 reply; 13+ messages in thread
From: swedebugia @ 2018-11-11  8:04 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

On 2018-11-07 19:20, Leo Famulari wrote:

snip

> In general, we don't change upstream defaults in Guix except when it's
> required for portability or to fix really egregious problems (i.e.
> security bugs). This is different from distros like Debian that
> basically fork the software and make a huge number of changes to suit
> the package maintainer's taste.
> 
> This keeps package maintenance relatively easy for us and ensures that
> important changes get pushed upstream so that all users can benefit.
> 
> Having said that, this line wrapping thing is a very bad default, and I
> think we should change it. Nano is one of the editors in the GuixSD
> installer. It needs to be easy to use.
> 
> If we change the default in our package, we need to file a bug upstream:
> 
> https://savannah.gnu.org/bugs/?group=nano
> 

Agreed. :)

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-11  8:02           ` swedebugia
@ 2018-11-11 10:16             ` Thorsten Wilms
  0 siblings, 0 replies; 13+ messages in thread
From: Thorsten Wilms @ 2018-11-11 10:16 UTC (permalink / raw)
  To: guix-devel

On 11/11/2018 09.02, swedebugia wrote:
>> It looks like the option to use would be:
>>
>> -r number, --fill=number
>> Hard-wrap  lines at column number.  If this value is 0 or less, 
>> wrapping will occur at the width of the screen less number columns, 
>> allowing the wrap point to vary along with the width of the screen  
>> if  the screen is resized.  The default value is -8.  This option 
>> conflicts with -w (--nowrap) -- the last one given takes effect.
> 
> If I understand you correctly adding this as root would reenable the -w 
> behavior?

To me it reads like it should, yes. Especially since no other option 
comes close and it's explicitly in conflict with --nowrap.

In principle, to be certain, one would have to ask a maintainer, or read 
the code, or best of all, test it, though.


-- 
Thorsten Wilms

thorwil's design for free software:
http://thorwil.wordpress.com/

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-11  8:04   ` swedebugia
@ 2018-11-15 13:14     ` swedebugia
  2018-11-15 20:28       ` Alex Vong
  0 siblings, 1 reply; 13+ messages in thread
From: swedebugia @ 2018-11-15 13:14 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Hi

On 2018-11-11 09:04, swedebugia wrote:
> On 2018-11-07 19:20, Leo Famulari wrote:
> 
> snip
> 
>> In general, we don't change upstream defaults in Guix except when it's
>> required for portability or to fix really egregious problems (i.e.
>> security bugs). This is different from distros like Debian that
>> basically fork the software and make a huge number of changes to suit
>> the package maintainer's taste.
>>
>> This keeps package maintenance relatively easy for us and ensures that
>> important changes get pushed upstream so that all users can benefit.

I understand. But this is a severe usability but as long as we encourage 
people to use nano in the install guide and include it in %base-packages.

We could solve this by removing it from there and deleting all 
references to nano in the manual, but that seems like more work and 
somewhat counter productive compared to adding a flag.

>>
>> Having said that, this line wrapping thing is a very bad default, and I
>> think we should change it. Nano is one of the editors in the GuixSD
>> installer. It needs to be easy to use.
>>
>> If we change the default in our package, we need to file a bug upstream:
>>
>> https://savannah.gnu.org/bugs/?group=nano

Hi. I found https://savannah.gnu.org/bugs/index.php?36523

Tried to create an account to suggest them to reopen it and fix it 
upstream by changing the default and failed :/

Savannah seems broken.

Can somebody with an account do it?

I suggest we disable with compile flag until they fixed it.

-- 
Cheers
Swedebugia

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-15 13:14     ` swedebugia
@ 2018-11-15 20:28       ` Alex Vong
  0 siblings, 0 replies; 13+ messages in thread
From: Alex Vong @ 2018-11-15 20:28 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 788 bytes --]

swedebugia <swedebugia@riseup.net> writes:

[...]
>>>
>>> Having said that, this line wrapping thing is a very bad default, and I
>>> think we should change it. Nano is one of the editors in the GuixSD
>>> installer. It needs to be easy to use.
>>>
>>> If we change the default in our package, we need to file a bug upstream:
>>>
>>> https://savannah.gnu.org/bugs/?group=nano
>
> Hi. I found https://savannah.gnu.org/bugs/index.php?36523
>
> Tried to create an account to suggest them to reopen it and fix it
> upstream by changing the default and failed :/
>
> Savannah seems broken.
>
> Can somebody with an account do it?
>
> I suggest we disable with compile flag until they fixed it.

I think you can still comment (and ask the devs to reopen the bug) if
you have an account, right?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Nano: disable hard wrapping by default
  2018-11-06 18:43 Nano: disable hard wrapping by default swedebugia
  2018-11-06 18:49 ` swedebugia
  2018-11-07 18:20 ` Leo Famulari
@ 2019-03-25 19:08 ` Leo Famulari
  2 siblings, 0 replies; 13+ messages in thread
From: Leo Famulari @ 2019-03-25 19:08 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 350 bytes --]

On Tue, Nov 06, 2018 at 07:43:21PM +0100, swedebugia wrote:
> I stumpled on this hard-wrapping default behavior when editing .bash_profile
> on GuixSD

This issue should be fixed with commit
cdfb69b46abbdaa2ac0a80b5f92172cd1290a782, which upgrades our nano
package to nano 4.0.

This release changes the default wrapping behavour to not wrap at all.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-03-25 19:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 18:43 Nano: disable hard wrapping by default swedebugia
2018-11-06 18:49 ` swedebugia
2018-11-06 19:27   ` Alex Vong
2018-11-06 21:57     ` swedebugia
2018-11-07  5:38       ` Alex Vong
2018-11-07  9:19         ` Thorsten Wilms
2018-11-11  8:02           ` swedebugia
2018-11-11 10:16             ` Thorsten Wilms
2018-11-07 18:20 ` Leo Famulari
2018-11-11  8:04   ` swedebugia
2018-11-15 13:14     ` swedebugia
2018-11-15 20:28       ` Alex Vong
2019-03-25 19:08 ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.