WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Nano 5.3 mistakes in nanorc  (Read 5865 times)

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Nano 5.3 mistakes in nanorc
« on: October 12, 2021, 06:38:25 PM »
Installed the latest Nano editor v 5.3 from using Apps and the ibiblio repo in a new CorePlus 12 (thanks!)

However, inside the application, a red warning bar shows up when you execute it:

Code: [Select]
[Mistakes in 'usr/local/etc/nanorc' ][/color]

After exiting the editor, more detail is seen on the commandline:

Code: [Select]
Error in /usr/local/etc/nanorc on line 2: Unknown option "const"
I havent tested it to see if it shows up in other repos like corepure64 etc.
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Nano 5.3 mistakes in nanorc
« Reply #2 on: October 12, 2021, 11:39:43 PM »
Hi PDP-8
The issue is this:
Quote
       set constantshow
          Constantly display the cursor position in the  status  bar.   (The  old  form  of  this
          option, 'set const', is deprecated.)
  This overrides the option quickblank.
Found here:
http://manpages.ubuntu.com/manpages/bionic/man5/nanorc.5.html

So I unpacked nano.tcz from a bunch of the repos and here are the results:
TC10 x86 is the older version of nano which still used const so it's fine.
TC11 and 12 x86 have been fixed.
TC11 and 12 x86_64 were already correct.
piCore12 and 13 armv6, armv7, armv7l, and aarch64 were already correct.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Nano 5.3 mistakes in nanorc
« Reply #3 on: October 13, 2021, 05:39:45 PM »
Thanks for the tips in the other threads Rich, but unfortunately, that fix only works for the current session.  It does not survive a reboot - /usr/local/etc/nanorc gets overwritten with the original symlink from the tcloop again.

Note that I am using a stick made with the CorePlus 12 *installer*, not the read-only initial demo so the proper setup for saving backups and changes exists - that was my first thought.

So I did something kinda' ugly. :)

I copied /usr/local/etc/nanorc symlink to /home/tc/.nanorc as a file to be edited.

I edited "const" to be "constantshow" in the new .nanorc

I then set up an alias to always delete the original symlink if it exists.  I put it in my .ashrc

Code: [Select]
alias nano='sudo rm /usr/local/etc/nanorc ; nano'
This works and survives reboots.  My ~.nanorc config file is picked up properly with the change from const to constantshow and it all works.  Well to pick up all the colorized including I have to edit those includes, but I'll get to that later.  For now the editor isn't complaining for basic text editing.

Perhaps the original op that tested with the fix may not have realized that it only worked in the current session, and even if properly backed up, came back to haunt him when the symlink returned. :)
« Last Edit: October 13, 2021, 06:08:43 PM by PDP-8 »
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Nano 5.3 mistakes in nanorc
« Reply #4 on: October 13, 2021, 08:53:36 PM »
Hi PDP-8
I fixed It:
... TC11 and 12 x86 have been fixed. ...
Just download the updated extension.

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: Nano 5.3 mistakes in nanorc
« Reply #5 on: October 14, 2021, 04:14:42 PM »
Thank you Rich!

But that took all the fun away.  For a moment I felt like a super-genius! :)

Seriously, you guys rock.  Tnx again.
That's a UNIX book! - cool  -- Garth

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: Nano 5.3 mistakes in nanorc
« Reply #6 on: October 14, 2021, 05:18:09 PM »
Hi PDP-8
... For a moment I felt like a super-genius! :) ...
I'm afraid that title has already been taken by Wile E. Coyote: