Opened 12 years ago

Closed 3 years ago

#15 closed enhancement (fixed)

Implement Greg's mode recognition

Reported by: Andreas Schnellbacher Owned by: Andreas Schnellbacher
Priority: minor Milestone: Unsorted
Component: Mode config Version: 1.14
Keywords: Cc:

Description (last modified by Andreas Schnellbacher)

Greg Jarvis changed the previous NEPMD mode recognition to add
the following:

o recognize Unix shebang
o fully configurable mode detection
o ...

Unfortunately the provided code has at least one severe bug,
that I'm not able to debug in shortness. That might be the
reason that Greg had problems to get it implemented for some
modes in the past. Moreover, it would lead to a much slower mode
detection as it was before. The method before was also far from
being optimal (e.g. mode files were read at every file load or
settings were written at every load or every load causes the
mode config files being read twice).

OTOH, I would like to have that implemented.

Change History (6)

comment:1 by Andreas Schnellbacher, 12 years ago

Owner: set to Andreas Schnellbacher
Status: newaccepted

comment:2 by Andreas Schnellbacher, 11 years ago

Details about what's not working with Greg's version of MODE.C of his fork:

File: MODE.C, Func: _getModeInfo

For mode = SHELL, keyword dir is set to 'perl' instead
of 'F:\Apps\NEPMD\netlabs\mode'. For mode = CMD, keyword dir is set to
a string of 72x 0xAA = '¬'.

After commenting the block

// extproc check                                        
if ((pmi->pszDefExtProc) &&                             
    (*pmi->pszDefExtProc) &&                            
    (_isExtProcFile( pszFilename, pmi->pszDefExtProc))) 
   iPoints = 5;                                         

out, mode CMD works, but SHELL still doesn't.

Version 0, edited 11 years ago by Andreas Schnellbacher (next)

comment:3 by Andreas Schnellbacher, 11 years ago

Description: modified (diff)

comment:4 by Andreas Schnellbacher, 11 years ago

Slightly off-topic: The changesets r2608 - r2624 implement Greg's request to change the syntax of most Nepmd* procs.

comment:5 by Andreas Schnellbacher, 6 years ago

Priority: majorminor
Type: defectenhancement

comment:6 by Andreas Schnellbacher, 3 years ago

Resolution: fixed
Status: acceptedclosed

Since all mode config was moved to NEPMD.INI, there's no notable performance loss on doing mode determination completely in E. Implemented by changesets r4725 ... r4745.

Note: See TracTickets for help on using tickets.