patchGNU nano - Patches: patch #10490, Make the file browser open...

 
 

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

patch #10490: Make the file browser open relative to the open file

Submitter:  Max <mjango>
Submitted:  Thu 05 Dec 2024 11:09:43 PM UTC
   
 
Priority:  3 - Low Status:  Wont Do
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None

Sun 08 Dec 2024 12:32:34 PM UTC, comment #3: 

Before posting the patch, you will want to clean it up.  For example: cramming a variable declaration between a function's leading comment and the function itself is horrible, unacceptable.  Also, line comments in nano end with a period -- they are sentences.  And the commit message should have a body that explains what the patch basically does and why.

Autofilling the ^R answer with the path of the current buffer... I don't know, I seldom use ^R.  It sounds ugly to me, but maybe other people think different.

Closing nano and rerunning the command with an additional file will (for me) open all the files that were open, because just about always I open files via the command line.  So for me nothing is lost, because of course I use 'set positionlog'.

Benno Schulenberg <bens>
Group administrator
Sun 08 Dec 2024 03:02:52 AM UTC, comment #2: 

comment #1:

> Proposals for changing nano's behavior should go to the nano-devel mailing list, so that others can weigh in.


Sorry about that! Should I post it there? (I was thinking this would be behind an option by default, so that it could be toggled)

> The wording "open file" is unclear -- nano can have multiple files open.  I guess you mean "the file associated with the current buffer"?


Yes, exactly.

> Personally I never use the file browser: when I need to open another (additional) file, I just close nano and add the name on the command line -- with tab completion this is faster for me than trying to find it in a list of files in the file browser.


This allows for keeping the old file(s) open as well, which is very handy.

> Also, why open only the file browser in that directory?  Why not directly offer the directory that corresponds to the current buffer as the one to read a file from at the ^R prompt?  (I'm not saying that I want that -- I'm just saying that the proposed behavior feels inconsistent to me.)


Good point, maybe I should change the ^R prompt to auto-fill the current path? That way it can still be used to open files relative to either the file associated with the current buffer or the location nano was opened from.

Max <mjango>
Sat 07 Dec 2024 02:53:18 PM UTC, comment #1: 

Proposals for changing nano's behavior should go to the nano-devel mailing list, so that others can weigh in.

The wording "open file" is unclear -- nano can have multiple files open.  I guess you mean "the file associated with the current buffer"?

Personally I never use the file browser: when I need to open another (additional) file, I just close nano and add the name on the command line -- with tab completion this is faster for me than trying to find it in a list of files in the file browser.

Also, why open only the file browser in that directory?  Why not directly offer the directory that corresponds to the current buffer as the one to read a file from at the ^R prompt?  (I'm not saying that I want that -- I'm just saying that the proposed behavior feels inconsistent to me.)

Benno Schulenberg <bens>
Group administrator
Thu 05 Dec 2024 11:09:43 PM UTC, original submission:  

Hello,

Instead of opening the file browser to where nano was started from, this patch makes it open from where the file is. I've been using this for a few months and I think this is a lot more useful, as often files are in a separate directory from the main one, which allows me to edit files and quickly switch between them with the file browser, while also being in the correct directory for compiling/running/etc when I leave nano.

Max <mjango>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

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 mjango (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-12-07 bens Priority5 - Normal 3 - Low
        StatusNone Wont Do
    2024-12-05 mjango Attached File- Added 0001-Make-the-browser-open-relative-to-the-current-file.patch, #56675

    Back to the top

    Powered by Savane 3.15-26b0.
    Corresponding source code