Opened 11 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 Changed 11 years ago by Andreas Schnellbacher

Owner: set to Andreas Schnellbacher
Status: newaccepted

comment:2 Changed 10 years ago by Andreas Schnellbacher

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

File: MODE.C, Func: _getModeInfo

For mode = SHELL, pszKeywordDir is set to 'perl' instead
of 'F:\Apps\NEPMD\netlabs\mode'. For mode = CMD, pszKeywordDir 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.

Last edited 10 years ago by Andreas Schnellbacher (previous) (diff)

comment:3 Changed 10 years ago by Andreas Schnellbacher

Description: modified (diff)

comment:4 Changed 10 years ago by Andreas Schnellbacher

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

comment:5 Changed 6 years ago by Andreas Schnellbacher

Priority: majorminor
Type: defectenhancement

comment:6 Changed 3 years ago by Andreas Schnellbacher

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.