Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nano doesn't handle softwrap properly
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Tue Oct 06, 2020 1:19 pm    Post subject: nano doesn't handle softwrap properly Reply with quote

I have a personal Gentoo installation guide text file, when I open it in nano and trying to copy a lengthy command (which have been split in two lines) (with middle mouse buffer), then my terminal interprets that as a two separate commands (split in the place where softwrap must have been occurred). So nano has a newline there even if I open it with an -S option.
Here is an example of a command which doesn't work in case nano window didn't fit the entire command:
Code:
wget https://mirror.yandex.ru/gentoo-distfiles/releases/amd64/autobuilds/current-stage3-amd64/stage3-amd64-20201004T214503Z.tar.xz.DIGESTS.asc

What's going on here, I really tired of this behavior and want to fix it, I remember it working OK about a year ago.

---
Can anyone confirm such behavior, or it's just me?
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 474
Location: Brisbane, Australia

PostPosted: Wed Oct 07, 2020 10:20 am    Post subject: Re: nano doesn't handle softwrap properly Reply with quote

etnull wrote:
I have a personal Gentoo installation guide text file, when I open it in nano and trying to copy a lengthy command (which have been split in two lines) (with middle mouse buffer), then my terminal interprets that as a two separate commands (split in the place where softwrap must have been occurred). So nano has a newline there even if I open it with an -S option.
Here is an example of a command which doesn't work in case nano window didn't fit the entire command:
Code:
wget https://mirror.yandex.ru/gentoo-distfiles/releases/amd64/autobuilds/current-stage3-amd64/stage3-amd64-20201004T214503Z.tar.xz.DIGESTS.asc

What's going on here, I really tired of this behavior and want to fix it, I remember it working OK about a year ago.

---
Can anyone confirm such behavior, or it's just me?

/etc/nanorc:
Code:

set softwrap
works for me.
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Wed Oct 07, 2020 10:32 am    Post subject: Reply with quote

Still same behavior, what's your version?
---
What I tried:
passing -S
passing -$
compiling with justify
running in different terminal emulator (st, xterm)
changing to set softwrap in .nanorc
activating softwrap with the shortcut (Esc + $)
downgrading to 4.9.3

If even 4.9.3 has the same thing it must be something in my enviroment...
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 474
Location: Brisbane, Australia

PostPosted: Wed Oct 07, 2020 11:58 pm    Post subject: Reply with quote

etnull wrote:
Still same behavior, what's your version?
---
What I tried:
passing -S
passing -$
compiling with justify
running in different terminal emulator (st, xterm)
changing to set softwrap in .nanorc
activating softwrap with the shortcut (Esc + $)
downgrading to 4.9.3

If even 4.9.3 has the same thing it must be something in my enviroment...

Nano:
Code:

[ebuild   R    ] app-editors/nano-4.9.3::gentoo  USE="magic ncurses nls spell (split-usr) unicode -debug -justify -minimal -slang -static" 0 KiB

Note: /etc/nanorc should not be /etc/.nanorc!

Terminal:
Code:

[ebuild   R    ] x11-terms/xfce4-terminal-0.8.9.2::gentoo  USE="-utempter" 0 KiB

Env:
Code:

SHELL=/bin/bash
SESSION_MANAGER=local/Gentoo-1:@/tmp/.ICE-unix/3664,unix/proxy-64:/tmp/.ICE-unix/3664
WINDOWID=81788931
COLORTERM=truecolor
XDG_CONFIG_DIRS=/etc/xdg:/etc/xdg
LESS=-R -M --shift 5
XDG_MENU_PREFIX=xfce-
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/terminfo /etc/dconf /etc/ca-certificates.conf /etc/texmf/web2c /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild
SSH_AUTH_SOCK=/tmp/ssh-To52h1DUZtBW/agent.3710
DESKTOP_SESSION=xfce
SSH_AGENT_PID=3711
EDITOR=/bin/nano
GTK_MODULES=canberra-gtk-module
XDG_SEAT=seat0
PWD=/
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt /usr/lib64/libreoffice/program/sofficerc
LOGNAME=root
QT_QPA_PLATFORMTHEME=qt5ct
XDG_SESSION_TYPE=x11
MANPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.3.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.34/man:/usr/local/share/man:/usr/share/man:/usr/share/rust-1.45.2/man:/usr/lib/llvm/10/share/man
XAUTHORITY=/root/.xauthDdmorC
MOTD_SHOWN=pam
HOME=/root
LANG=en_AU.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;
01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=
30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=
01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01
;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.
gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=
01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;
31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:
*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.
cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.
jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*
.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.
tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.
mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.
webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.
qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=
01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35
:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.
cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.
patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au
=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=
00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;
36:*.spx=00;36:*.xspf=00;36:
XDG_CURRENT_DESKTOP=XFCE
VTE_VERSION=6003
INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.3.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.34/info:/usr/share/info
MOZ_GMP_PATH=/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed
XDG_SESSION_CLASS=user
TERM=xterm-256color
LESSOPEN=|lesspipe %s
USER=root
MANPAGER=manpager
DISPLAY=:0.0
SHLVL=3
PAGER=/usr/bin/less
XDG_VTNR=7
XDG_SESSION_ID=2
XSESSION=Xfce4
XDG_RUNTIME_DIR=/run/user/1000
GCC_SPECS=
GSETTINGS_BACKEND=dconf
LC_COLLATE=C
XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share
PATH=/sbin:/bin:/usr/sbin:/usr/bin
VBOX_APP_HOME=/usr/lib64/virtualbox
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-3DB8SNoLBW,guid=ba6e45ce3c4d3622bd20eaa25f7d5e3f
MAIL=/var/mail/user1
OLDPWD=/home/user1/Desktop
_=/bin/env

Run:
Code:

emerge --unmerge app-editors/nano
rm /bin/rnano (if it exist)
rm /etc/nanorc or rm /etc/.nanorc
rm /var/cache/distfiles/nano*
emerge --depclean -av
revdep-rebuild

Remove all traces of nano in / and subdirectories. (dev-util/catfish or app-misc/mc can help)
Code:

reboot
login as root without X
emerge -av app-editors/nano


Run:
'nano /etc/nanorc' and add 'set softwrap' as line 1 and save.

Run:
nano and type a very long line of text and check that the line wraps.
If the line wraps, run nano in your favirite X terminal and repeat.

If you use 'x11-terms/xfce4-terminal', disable all shortcuts.

Wrapped 'LS_COLORS' to make the forum layout behave.Chiitoo
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
389292
Guru
Guru


Joined: 26 Mar 2019
Posts: 504

PostPosted: Thu Oct 08, 2020 10:11 am    Post subject: Reply with quote

Quote:
nano and type a very long line of text and check that the line wraps.
If the line wraps, run nano in your favirite X terminal and repeat.

softwrap is working. what's not working is copying long softwrapped command betwean nano and the terminal by middle mouse button.
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 474
Location: Brisbane, Australia

PostPosted: Thu Oct 08, 2020 11:53 pm    Post subject: Reply with quote

etnull wrote:
Quote:
nano and type a very long line of text and check that the line wraps.
If the line wraps, run nano in your favirite X terminal and repeat.

softwrap is working. what's not working is copying long softwrapped command betwean nano and the terminal by middle mouse button.


My 12 year old Microsoft mouse pastes fine by pushing the scroll wheel.

When copying a long wrapped lines the pasted line is displayed split in 2 parts. This is a "feature" of nano.
_________________
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum