RE: component architecture



On Wed, 4 Mar 1998 jheintz@iconcomp.com wrote:
> Q2) Does Midnight Commander map edit requests to different apps right
> now?

Action taken for Edit, View, Open (the user presses Enter or doubleclicks 
the file) is determined by regular expressions or filetype (file(1) is 
used to get the filetype). This feature is available since a very 
long time and currently it's configured with the file mc.ext.


Two examples taken from mc.ext (you can invoke the actions "Compile" 
and "Link" only with an extension dependent pop-up menu which is not 
available in the textmode edition):
------>
# C++
regex/\.(C|cc)$
        Open=%var{PAGER:more} %f
        View=%view{ascii}
        Compile=c++ -O -c %f
        Link=c++ -O -o %d/`basename %f .c` %f
        Icon=cc.xpm
 
type/JPEG\ picture
        Open=xv %f
        Icon=jpeg.xpm
        Include=image-options
<------


If there's no entry the default action will be taken, i.e. for edit 
requests either the internal editor or ${EDITOR:-vi} will be invoked.


> Anyway, how does it deal with this issue right now?  If it uses MIME,
> can that be adapted?

I think there's no problem to add a new method of mapping requests to 
applications.


MfG,
Norbert



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]