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

 
 

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

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

Submitter:  Peter Passchier <pepa65>
Submitted:  Sun 19 Nov 2017 10:56:07 AM UTC
   
 
Severity:  1 - Wish Status:  Wont Fix
Assigned to:  None Open/Closed:  Closed

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>
Group 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>
Group 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>
Group 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.)

No files currently attached

 

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 pepa65 (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
    2017-11-25 bens Open/ClosedOpen Closed
    2017-11-19 bens Severity3 - 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.13-3230.
    Corresponding source code