nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: packaging nano with a skeleton nanorc file


From: Kamil Dudka
Subject: Re: packaging nano with a skeleton nanorc file
Date: Mon, 14 Sep 2020 12:56:03 +0200

On Monday, September 14, 2020 10:23:31 AM CEST Benno Schulenberg wrote:
> You wouldn't move the line.  The new package wouldn't install an /etc/nanorc
> file at all.

Syntax highlighting is not the only uncommented line in /etc/nanorc on Fedora.  
It also sets the spell checker program:

    https://bugzilla.redhat.com/681000

I do not think we want to discourage users from configuring anything globally.  
We should just give them an option to skip the global configuration if needed.
For example bash on Fedora has ~/.bashrc which by default sources /etc/bashrc 
so all users get the same environment by default.  But they are free tu put 
anything before/after the sourced script, or choose not to source it at all.

> When upgrading a package, do all files installed by the old
> package get removed first?

As long as the configuration files were not touched since their installation, 
they should be automatically removed upon update (in case the updated package 
does not install them any more).

> If yes, is there no way to tell the installer
> to leave the files in /etc alone?

I think this should be technically possible with some RPM magic.  On the other 
hand I am not sure whether it is really what Fedora users expect in this case.

> (I think in Debian this is the default
> behavior: remove the package but leave the configuration files in place.)
> 
> The idea is that users who do a rolling upgrade will retain their
> /etc/nanorc (and will not get a .nanorc from the skeleton because that is
> only for newly created users), and on a new install there will be no
> /etc/nanorc and just the ~/.nanorc from the skeleton.  But... this will not
> work on a multi-user machine: new users would get the skeleton ~/.nanorc
> but the still-present /etc/nanorc would affect them too.  :|  I see no
> solution for this case.
> > I am not sure whether it was mentioned here but nano is going to be used
> > 
> > as the default editor in Fedora 33:
> >     https://fedoraproject.org/wiki/Changes/UseNanoByDefault
> 
> Nice.  The example of git, though, is not a very good one, I think.
> People who use git on the command line probably know a bit about shell
> things and environment variables.  But true, if they try git for the
> first time, it's much better to land in nano than in something like vi.

Thanks for feedback although I am not the owner of this Fedora change myself.

> (If the user has 'set positionlog' in their ~/.nanorc, doing a later
> 'git commit' will put the cursor back where it was left in the previous
> commit message.  In most cases, this is annoying.  So in my ~/.gitconfig
> I have under [core]: editor = "nano --guide=74 +1", where +1 places the
> cursor at the start of the message.)

I would expect that most consumers of the default configuration will have
no .nanorc in their home.  Anyway, I am afraid that changing default git 
configuration is out of scope or the mentioned Fedora change.

Kamil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]