bugGNU nano - Bugs: bug #52446, [Request] add an option to totally...

 
 

bug #52446: [Request] add an option to totally disable justifications

Submitted by:  Peter Passchier <pepa65>
Submitted on:  Sun 19 Nov 2017 10:56:07 AM UTC  
 
Severity: 1 - WishStatus: Wont Fix
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 25 Nov 2017 06:38:03 PM UTC, comment #4:

The issue of not asking to save modifications (when all of them have been undone) has been rereported as bug #52504. A patch for it is now available.

Benno Schulenberg <bens>
Project Administrator
Sun 19 Nov 2017 04:16:09 PM UTC, comment #3:

Certainly, such a patch will be accepted. Because it will be beautiful to see the "Modified" disappear when the first edit is undone. :)

But take care, there are other things that cannot be undone. Calling the external spell checker cannot be undone. Calling the formatter cannot be undone. So the flag should have a different name. Something like "undostack_was_discarded". Or probably the inverse: "pristine_undostack".

But such a patch is not what you requested in this issue. So I suggest you file a new report, something like: « title bar continues to show "Modified" after first edit is undone ».

Benno Schulenberg <bens>
Project Administrator
Sun 19 Nov 2017 01:02:35 PM UTC, comment #2:

All for fixing that bug. But it would be so simple to have a flag JUSTIFICATION_USED, and if it is not set (like it would be for users that unbind all those key mappings) and the undo-history is clean, then there needs to be no offer to save the game.

If I file a patch for this, would it be accepted??

Peter Passchier <pepa65>
Sun 19 Nov 2017 11:40:33 AM UTC, comment #1:

There is no need for such an option. If the user wants to be sure to never do any justification by accident, they can just unbind the relevant keys in their nanorc:

unbind ^J main
unbind F4 main
unbind M-J main
unbind M-J search

No, instead of working around a problem, it would be better to fix bug #46900.

Benno Schulenberg <bens>
Project Administrator
Sun 19 Nov 2017 10:56:07 AM UTC, original submission:

Jutifications are the only obstacle to having full undo (because they can only be undone immediately: bug #46900), and therefore their possible use is dangerous. I would never want to use such a feature anyway, especially because it is so dangerous. It can leave you in a position where you lose all your edits, or you have to accept the justifications (whatever they were),

If they were properly recorded it would mitigate the reason for this bug somewhat, but I still think it would be good if they could be disallowed in nanorc.

The win is also that if a file is then fully "undone" it doesn't need to ask to save modifications when quitting, because it is known there aren't any.
(Alternatively, it could be recorded whether any justifications have taken place, and if not, the undo history can be relied upon to be correct, and also no question need to be asked about saving modifications on quitting.)

Peter Passchier <pepa65>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by pepa65 (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Nov 2017 06:38:03 PM UTCbensOpen/ClosedOpen=>Closed
    Sun 19 Nov 2017 11:40:33 AM UTCbensSeverity3 - Normal=>1 - Wish
      StatusNone=>Wont Fix
      SummaryOption to totally disable justifications=>[Request] add an option to totally disable justifications

    Back to the top


    Powered by Savane 3.1-cleanup1