bugGNU nano - Bugs: bug #57105, using fixer to run 'tidy -m' on a...

 
 

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

bug #57105: using fixer to run 'tidy -m' on a HTML file produces an error and no result

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 23 Oct 2019 08:29:50 AM UTC  
 
Severity:  4 - Important Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Fri 25 Oct 2019 03:49:36 PM UTC, comment #3: 

Fixed in git, commit a6dae403, in the way suggested in comment #2.

And closing, because unreleased.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 23 Oct 2019 03:44:25 PM UTC, comment #2: 

Version 2.9.2 still showed the [ Error invoking "tidy" ] message when trying to run "tidy -m" on the buffer.  Commit 58ed3a81, meant to fix bug #52997, wipes the status bar explicitly on a total refresh, thus clearing this message from nano-2.9.3 to 2.9.8.

Anyway, probably we should do the same as for the linter: return 9 when the command is not found, so that we can ignore an exit status of 1 or 2, and only report an error about invocation when the exit status is > 2.  (And maybe for exit status 1 and 2 we could inform on the status bar that the invoked program "complained"/"protested"/"is unhappy".)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 23 Oct 2019 08:38:39 AM UTC, comment #1: 

Using 'tidy -m' with the formatter command in nano-2.9.8 also fails to produce a result: the buffer is not tidied up.  And the error message ([ Error invoking "tidy -m" ]) does not produce a beep and is cleared off the screen before the user can even see it.  That is worse than what we have now.  No feedback is bad.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 23 Oct 2019 08:29:50 AM UTC, original submission:  

To reproduce, add the following line to syntax/html.nanorc:

  fixer  tidy -m

Then run 'src/nano doc/cheatsheet.html' and type: M-F.
See how the status bar says: [ Error invoking "tidy -m" ].
Also, the current buffer has not been replaced with the tidied text.

Apparently some formatters produce a non-zero exit status even when there actually are no errors.  Maybe nano should ignore the exit status when a fixer command is invoked?

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

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

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-25 bens StatusNone => Fixed
        Assigned toNone => bens
        Open/ClosedOpen => Closed

    Back to the top


    Powered by Savane 3.5