bugGNU nano - Bugs: bug #52445, magic does not work

 
 

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

bug #52445: magic does not work

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 19 Nov 2017 08:42:04 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 19 Nov 2017 10:27:34 AM UTC, comment #1: 

Fixed in git, bacb0f71.

Benno Schulenberg <bens>
Group administrator
Sun 19 Nov 2017 08:42:04 AM UTC, original submission:  

To reproduce, compile nano without disabling libmagic.  Then copy src/text.c to ceetext.  Then run:

   src/nano ceetext

Nano does not recognize the file as C and falls back to the default syntax.  But if you run:

   file --brief ceetext

the result is:

   C source, ASCII text

So libmagic does recognize the file as being C.  The thing is, with file-5.10 libmagic stopped identifying C files as "C program" and identified them as "C source" instead.  :|  The identifying strings for several other files changed as well, I imagine (I haven't checked beyond C and C++), breaking nano's magic.  So... for the past three, four years, on production systems, nano's magic hasn't been working.  :|

It almost makes me decide to chuck the magic stuff entirely.  First, because it is very rarely needed (file extensions and header lines work in most cases).  And second, no one noticed that it isn't working (not for C files, at least), so it doesn't seem that anyone uses it or relies on it.

Benno Schulenberg <bens>
Group administrator

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-28 bens Open/ClosedOpen Closed
    2017-11-19 bens StatusIn Progress Fixed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code