bugGNU nano - Bugs: bug #48275, syntax names may no longer contain...

 
 

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

bug #48275: syntax names may no longer contain whitespace

Submitter:  Eric F <ief>
Submitted:  Mon 20 Jun 2016 11:13:28 AM UTC
   
 
Severity:  2 - Minor Status:  Wont Fix
Assigned to:  bens Open/Closed:  Closed

Mon 04 Jul 2016 02:25:17 AM UTC, comment #4: 

Yes, that's fine. Thanks.

I found my notes and it was from here: https://freethegnu.wordpress.com/2007/06/23/nano-shortcuts-syntax-highlight-and-nanorc-config-file-pt2/ I learned about the colors …in 2012 or so. But the other link might be the one I found and added to my collection.

Eric F <ief>
Sat 02 Jul 2016 04:04:01 PM UTC, comment #3: 

Most likely you got it from here:

https://github.com/pwaleczek/.nanorc/blob/master/delphi.nanorc

Who probably took it from here:

https://nas-tweaks.net/300/syntax-highlighting-with-nano-nanorc-for-delphi/

Anyway, as I was planning to allow syntax names to be unquoted in nanorc files, it will not be possible (or at least: too hard) to allow whitespace inside syntax names.  So I am marking the change as intentional and thus wontfix.

Benno Schulenberg <bens>
Group administrator
Mon 20 Jun 2016 12:23:34 PM UTC, comment #2: 

Tried to find the source/link now where I got it from. I think I might have got it from a “pack” of files, but that was long ago, like 5+ years ago. But it's been working since.

I'll probably just rename the syntax then, or remove the include line.

Thanks.

/Eric

Eric F <ief>
Mon 20 Jun 2016 11:48:01 AM UTC, comment #1: 

Hmm...  Apparently I've assumed that syntax names will not contain whitespace.  ...  Don't know if I want to change that.  Will think about it.

But... delphi.nanorc?  Did you make it yourself, or does Apple provide it?  Because it's not in nano.

If you made it yourself, why not simply call it "delphi"?  Lower case, one short word, so that it is easy to type when one day you need --syntax=delphi for a file with an unusual extension.  Because that is the only purpose of giving a syntax a name.

Benno Schulenberg <bens>
Group administrator
Mon 20 Jun 2016 11:13:28 AM UTC, original submission:  

Updated nano yesterday to 2.6.0. When opening a file...



Error in /usr/share/nano/delphi.nanorc on line 1: A syntax name must be quoted

Error in /usr/share/nano/delphi.nanorc on line 2: A 'color' command requires a preceding 'syntax' command

Error in /usr/share/nano/delphi.nanorc on line 3: A 'color' command requires a preceding 'syntax' command

Error in /usr/share/nano/delphi.nanorc on line 5: A 'color' command requires a preceding 'syntax' command

Error in /usr/share/nano/delphi.nanorc on line 6: A 'color' command requires a preceding 'syntax' command

Error in /usr/share/nano/delphi.nanorc on line 7: A 'color' command requires a preceding 'syntax' command

Press Enter to continue starting nano.


Syntax says:


syntax "Delphi Source" "\.pas$"


When I remove the blank, the err msgs disappears.
(tried to escape the blank, but it didn't work. :))


syntax "DelphiSource" "\.pas$"


- - -

OS X, nano-2.6.0

Eric F <ief>

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-29 bens Open/ClosedOpen Closed
    2016-07-02 bens Severity3 - Normal 2 - Minor
        StatusNone Wont Fix
    2016-06-21 bens Summarynanorc file and whitespace in syntax names syntax names may no longer contain whitespace
    2016-06-20 bens Assigned toNone bens
        Summarynanorc file and whitespace nanorc file and whitespace in syntax names

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code