bugGNU nano - Bugs: bug #53694, --enable-altrcname is broken since...


You are not allowed to post comments on this tracker with your current authentication level.

bug #53694: --enable-altrcname is broken since 2.9.0

Submitted by:  None
Submitted on:  Wed 18 Apr 2018 05:35:41 PM UTC  
Severity:  3 - Normal Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

( Jump to the original submission)

Sat 28 Apr 2018 09:17:39 AM UTC, comment #7: 

The fix has been released in 2.9.6.  Thanks for reporting.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 21 Apr 2018 08:11:06 AM UTC, comment #6: 

Thanks for confirming.

Fixed in git, commit bf8bd025.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 20 Apr 2018 02:42:47 PM UTC, comment #5: 

Yeah, that patch seems suitable. After compiling with the process I used before the resulting binary can read from the path I specified, but not the default of "~/.nanorc" (as expected).

Thanks for looking into the issue.

Cody A. Taylor <code_m>
Fri 20 Apr 2018 08:55:09 AM UTC, comment #4: 

I was thinking in a wrong direction: trying to manipulate a defined string.  But that is no necessary, of course.

Attached patch should fix the problem.

(file #43981)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 19 Apr 2018 06:03:41 PM UTC, comment #3: 

Hmm...  When the builder gives an alternate name for the rcfile, we shouldn't prepend a dot to it.  But if no alternate name is given, then it should be ".nanorc" for ~/, and plain "nanorc" for an $XDG_CONFIG_DIR.  I don't see how we can achieve that.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 18 Apr 2018 06:10:02 PM UTC, comment #2: 

Verified that dropping `--enable-altrcname` altogether does read in "~/.config/nano/nanorc".

I'll leave this open so you can double check that everything is documented clearly.

Cody A. Taylor <code_m>
Wed 18 Apr 2018 06:03:59 PM UTC, comment #1: 

Ok, so it appears the commit to blame is c16e79b612.

Let me give this new (breaking!) system a try.

> commit c16e79b612eb8e061a4bd0b5f187c37a036fc403
> Author: Simon Ochsenreither <simon@ochsenreither.de>
> Date:   Fri Oct 27 23:15:06 2017 +0200
>     startup: look for nanorc and history files also in the XDG directories
>     When not finding a .nanorc file in the user's home directory, nano will
>     look for a nanorc file in $XDG_CONFIG_HOME and in the ~/.config/nano/
>     fallback directory.  And when not finding a .nano/ subdir in the user's
>     home directory, nano will look for (or create) the history files in
>     $XDG_DATA_HOME or in the ~/.local/share/nano/ fallback directory.
>     This is a partial implementation of the XDG Base Directory Specification:
>    https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html,
>     for the purpose of reducing the clutter in a user's home directory, and
>     to make it easier to back up just the configuration files.
>     Signed-off-by: Simon Ochsenreither <simon@ochsenreither.de>
>     Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>

Cody A. Taylor <code_m>
Wed 18 Apr 2018 05:35:41 PM UTC, original submission:  

Working: v2.8.7-61-g80ed2568fcca
Broken: v2.9.0


When using the configure script to build a nano from the git repository, the `--enable-altrcname` option does not seem to take affect. What I do exactly below.

    $ git checkout v2.9.0
    $ make clean
    $ ./autogen.sh
    $ ./configure --prefix="$HOME/.local" --enable-altrcname='.config/nano/nanorc'
    $ make
    $ ./src/nano # nanorc is not read
    $ git checkout 80ed2568fcca
    $ ./config.status --recheck
    $ make
    $ ./src/nano # nanorc is correctly read



Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by code_m (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-28 bens Open/ClosedOpen => Closed
    2018-04-21 bens StatusIn Progress => Fixed
    2018-04-20 bens Attached File- => Added 0001-build-do-not-prefix-an-alternative-rcfilename-with-a.patch, #43981
        StatusNone => In Progress
    2018-04-19 bens Assigned toNone => bens
        Summary--enable-altrcname seems broken => --enable-altrcname is broken since 2.9.0

    Back to the top

    Powered by Savane 3.7