Ticket #1620 (closed defect: fixed)

Opened 9 years ago

Last modified 9 months ago

File hightlighting based on extension is case sensitive

Reported by: bilbo Owned by: andrew_b
Priority: major Milestone: 4.8.21
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Some time ago, file highlighting according to rules in filehighlight.ini was added to MC.

Unfortunately, the "extensions=..." rule is case sensitive, however, for many file types, both upper and lowercase extensions are present on system. For example my digital camera creates photos having uppercased .JPG as extension and these do not get hightlighted, unlike some other .jpg files with lowercase extension

I think the extension=... match should be case insensitive

Change History

comment:1 Changed 9 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted
  • Milestone changed from 4.7 to 4.7.0-pre4

hm... I don't know how better...

Is 'extension' parameter must case insensitive or in additional need to handle 'extension_icase' parameter too? May be someone want to exact match by extentions?..

comment:2 Changed 9 years ago by bilbo

I personally have not seen any application that depends on having some files with specific case of extension or any file format that dictates case of its extension.

So I guess case-sensitive match for extension is not necessary (case insensitive would be enough) and for these few cases (can't think of any) where it would be needed we have regexps

comment:3 Changed 9 years ago by ossi

so let me spoil the party by noting that .c is something else than .C (of course that works only on case-preserving file systems) ...

comment:4 Changed 9 years ago by slavazanko

  • Version changed from master to 4.7.0-pre3
  • severity changed from no branch to on review

Created branch 1620_file_hightlighting_icase

Initial changeset:b34c4509418f74bed0d891d64215878cfa8f741d

Added parameter 'extensions_case'.

At the same time changed the algorithm of processing parameters (previously handled one of the parameters in file highlight group. Now all parametes will handle).

Review, please.

comment:5 Changed 9 years ago by angel_il

  • Votes for changeset set to angel_il

comment:6 Changed 9 years ago by andrew_b

  • Votes for changeset changed from angel_il to angel_il andrew_b
  • severity changed from on review to approved

comment:7 Changed 9 years ago by slavazanko

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il andrew_b to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:8 Changed 9 years ago by slavazanko

  • Status changed from testing to closed

comment:9 Changed 9 months ago by anatoly.borodin

  • Branch state set to no branch

8 years passed, but extensions_case is used only for temp files in misc/filehighlight.ini.

Is it possible to set it to false by default? Or is it better to update the blocks for images, videos, archives etc manually? IMHO, only the source files should (probably) be case-sensitive there, but meybe it's better to separate .c/.C from the rest?

comment:10 Changed 9 months ago by andrew_b

  • Branch state changed from no branch to merged

comment:11 Changed 9 months ago by andrew_b

I'm inclined to agree that all extensions should be case insensitive.
.c and .C both are sources. This is not an exception.

comment:12 Changed 9 months ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • Version changed from 4.7.0-pre3 to 4.7.0-pre4
  • Branch state changed from merged to on review
  • Milestone changed from 4.7.0-pre4 to 4.8.21
  • Resolution fixed deleted

Branch: 1620_file_highlight_icase
changeset:566992da32243096ffeeab5d14b56d29b46796c1

comment:13 Changed 9 months ago by andrew_b

  • Owner changed from slavazanko to andrew_b
  • Status changed from reopened to accepted

comment:14 Changed 9 months ago by zaytsev

  • Votes for changeset set to zaytsev
  • Version changed from 4.7.0-pre4 to master
  • Branch state changed from on review to approved

I agree with your reasoning here.

comment:15 Changed 9 months ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from zaytsev to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:16 Changed 9 months ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.