patchGNU nano - Patches: patch #8805, Trunk r5429: Add option to close a...

 
 

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

patch #8805: Trunk r5429: Add option to close a buffer in nano without saving

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Sat 21 Nov 2015 08:39:57 PM UTC
   
 
Priority:  5 - Normal Status:  Done
Privacy:  Public Assigned to:  bens
Open/Closed:  Closed Release:  None

Wed 30 Dec 2015 10:48:42 AM UTC, comment #3: 

A somewhat different change went into SVN, r5509, and was amended in r5512.  But thanks anyhow!

(About making --nonewlines permanent, I would agree.  But not about --morespace, because I /like/ the blank line below the title bar: it makes for symmetry with the normally blank status bar.  But you probably run without the help lines, so for you things will be more symmetrical when using --morespace: just title bar at the top and status bar at the bottom.)

Benno Schulenberg <bens>
Group administrator
Thu 03 Dec 2015 05:25:51 PM UTC, comment #2: 

No problem on the lack of notification.

Oops on the rejectfile item in the documentation; I guess I'm a bit rusty.

Go ahead with reverting that patch and adding this one.  Actually, I think -t is dangerous too, but having to strictly keep Pico compatibility is problematic in some ways.  (Specifically, if it were entirely up to me, I'd make the -O/--morespace and -L/--nonewlines options permanent instead of options, as wasting a line of screen real estate without the former option is bad, and the gimmickiness of the latter option can be confusing sometimes.)

David Lawrence Ramsey <dolorous>
Group Member
Wed 02 Dec 2015 08:33:45 PM UTC, comment #1: 

Hello David.  Sorry, I don't get a notification when a patch is posted.

About the patch...  It adds the rejectfile item to the docs as if it is a main menu function, but it is a Write Out item, so should be listed somewhere after dosformat, probably as last one in that series.

About this not being enough...  I would undo your earlier patch that makes ^O with -t work like in Pico.  First: I think -t is a dangerous idea -- people shouldn't use it if they're not sure they will want to (and can) save the file. Second, since we have 'savefile', we don't need ^O with -t to save directly.  If a user wants this, he can rebind ^O to savefile.

So... let's undo the previous patch, and then apply this one to add M-R to the Write Out menu, to protect users from their overcourageous use of --tempfile.  What do you say?

Benno Schulenberg <bens>
Group administrator
Sat 21 Nov 2015 08:39:57 PM UTC, original submission:  

Given the discussion on how to quit nano without saving when the -t option is used, I figure the problem is significant.  The attached patch adds Meta-R at the WriteOut prompt (and the associated binding), which makes nano close the current buffer without saving.

However, this isn't quite enough, as using "nano -t filename.txt" and saving will save without bringing up the WriteOut prompt at all.  The proper solution to that would be to put it at the global level, but it would add two other problems: what to use for the shortcut, and how to ensure that the user doesn't hit it by accident.

Even so, this could be a beginning, so I'm submitting it anyway.

David Lawrence Ramsey <dolorous>
Group Member

 

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

Attached Files
file #35516:  nano5429reject.patch added by dolorous (9KiB - text/x-patch)

 

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 dolorous (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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-30 bens StatusNone Done
        Open/ClosedOpen Closed
    2015-12-02 bens Assigned toNone bens
    2015-11-21 dolorous Attached File- Added nano5429reject.patch, #35516

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code