bugGNU nano - Bugs: bug #55365, [Request] restore a per-syntax...

 
 

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

bug #55365: [Request] restore a per-syntax file-manipulation command

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 02 Jan 2019 06:45:47 PM UTC
   
 
Severity:  1 - Wish Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 14 Oct 2019 09:05:17 AM UTC, comment #4: 

The feature has been pushed to master, commit 34170611.

Benno Schulenberg <bens>
Group administrator
Thu 10 Oct 2019 05:32:33 PM UTC, comment #3: 

Attached is a single patch that should apply to current git.

(file #47643)

Benno Schulenberg <bens>
Group administrator
Wed 09 Oct 2019 06:56:31 PM UTC, comment #2: 

With the attached 0003 patch (that adds a nanosecond check) it works on Linux, on the three BSDs, and on Alpine.  So... it looks like this is portable.

(file #47637)

Benno Schulenberg <bens>
Group administrator
Wed 09 Oct 2019 05:52:23 PM UTC, comment #1: 

Here is a first attempt at getting the formatting feature back.

(file #47634, file #47635, file #47636)

Benno Schulenberg <bens>
Group administrator
Wed 02 Jan 2019 06:45:47 PM UTC, original submission:  

When removing the 'formatter' command, I thought of later allowing the 'speller' command to be per-syntax (that then could be "abused" to do filtering or whatever instead of spell checking). But after thinking a little more, this is no good, because it would mean that ^T would be "hijacked" by the syntax and it would no longer be possible to invoke the basic spell checker.

I didn't think the 'formatter' command would be used by anyone else other than a few Go programmers, but apparently this is the case. See bug #54651, and http://lists.gnu.org/archive/html/help-nano/2018-09/msg00000.html. And I can see that it makes sense to have a per-syntax formatter/transformer/processor.

So... I want to add a 'fixer' command, similar to the 'formatter' command but without duplicating more than a hundred lines of code. I want to simply reuse and tweak the code for the alternate spell checker. The messages that that code currently spits out can be trimmed down and made more general without losing much clarity -- making them maybe even clearer because more concise.

The command is called 'fixer' to indicate it can change/transform/process a file in any conceivable way, not just formatting or spelling correction.  And it starts with an "F" to make it easier to remember its binding: M-F.

(Original request was made in bug #54889, but that one got polluted with irrelevant stuff.)

Benno Schulenberg <bens>
Group administrator

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2019-11-30 bens Open/ClosedOpen Closed
    2019-10-14 bens StatusIn Progress Fixed
    2019-10-10 bens Attached File- Added 0001-restored-feature-a-per-syntax-fixer-command-that-pro.patch, #47643
    2019-10-09 bens Attached File- Added 0003-restored-feature-a-per-syntax-fixer-command-that-pro.patch, #47637
    2019-10-09 bens Attached File- Added 0001-tweaks-reshuffle-some-declarations-and-rename-a-vari.patch, #47634
        Attached File- Added 0002-tweaks-rename-a-function-and-add-a-parameter-so-it-b.patch, #47635
        Attached File- Added 0003-restored-feature-a-per-syntax-fixer-command-that-pro.patch, #47636
        StatusNone In Progress
        Assigned toNone bens
        Summary[Request] re-add a per-syntax filtering command [Request] restore a per-syntax file-manipulation command

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code