From e5085a078b4fcb942dd42de4e54697233d1d5ddd Mon Sep 17 00:00:00 2001 From: dockes Date: Sat, 1 Apr 2006 07:34:21 +0000 Subject: [PATCH] Allow ext edit for c/c++ files. 1.3.1 2? --- src/sampleconf/mimeconf | 36 ++++++++++++++++-------------------- src/sampleconf/mimemap | 16 ++++++++++++---- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/src/sampleconf/mimeconf b/src/sampleconf/mimeconf index 5ef8cd10..1fe0cec8 100644 --- a/src/sampleconf/mimeconf +++ b/src/sampleconf/mimeconf @@ -1,10 +1,10 @@ -# @(#$Id: mimeconf,v 1.15 2006-03-29 13:08:08 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: mimeconf,v 1.16 2006-04-01 07:34:21 dockes Exp $ (C) 2004 J.F.Dockes # Recoll : associations of mime types to processing filters. # There are different sections for decompression, 'interning' for indexing # and preview, and external viewers -## +## ####################################### # Decompression: these types need a first pass to create a temp file to # work with. We use a script because uncompress utilities usually work in # place, which is not suitable. @@ -20,7 +20,7 @@ application/x-gzip = uncompress rcluncomp gunzip %f %t application/x-compress = uncompress rcluncomp gunzip %f %t application/x-bzip2 = uncompress rcluncomp bunzip2 %f %t -## +## ################################### # Filters for indexing and internal preview. # The external (exec) filters output the document in simple html format, # have a look at the scripts. @@ -39,28 +39,21 @@ application/vnd.sun.xml.writer = exec rclsoff application/vnd.sun.xml.writer.global = exec rclsoff application/vnd.sun.xml.writer.template = exec rclsoff application/x-dvi = exec rcldvi - -image/vnd.djvu = exec rcldjvu - audio/mpeg = exec rclmedia - +image/vnd.djvu = exec rcldjvu message/rfc822 = internal - text/html = internal text/plain = internal text/rtf = exec rclrtf text/x-gaim-log = exec rclgaim text/x-mail = internal -## -# External viewers, launched when you double-click a result entry +## ########################################## +# External viewers, launched when you on a result entry 'edit' link [view] -text/plain = xemacs %f -#text/html = firefox -remote "openFile(%u)" -text/html = firefox %u +application/msword = openoffice %f application/pdf = xpdf %f application/postscript = gv %f -application/msword = openoffice %f application/vnd.sun.xml.calc = openoffice %f application/vnd.sun.xml.calc.template = openoffice %f application/vnd.sun.xml.draw = openoffice %f @@ -71,14 +64,18 @@ application/vnd.sun.xml.math = openoffice %f application/vnd.sun.xml.writer = openoffice %f application/vnd.sun.xml.writer.global = openoffice %f application/vnd.sun.xml.writer.template = openoffice %f -image/vnd.djvu = djview %f application/x-dvi = xdvi %f - audio/mpeg = xmms %f -image/png = xv %f image/jpeg = xv %f +image/png = xv %f +image/vnd.djvu = djview %f +# Or firefox -remote "openFile(%u)" +text/html = firefox %u +text/plain = gnuclient -q %f +text/x-c = gnuclient -q %f -# Icons to be used in the result list. +## ############################################# +# Icons to be used in the result list if required by gui config [icons] application/msword = wordprocessing application/pdf = pdf @@ -93,8 +90,7 @@ application/vnd.sun.xml.writer = wordprocessing application/vnd.sun.xml.writer.global = wordprocessing application/vnd.sun.xml.writer.template = wordprocessing audio/mpeg = sownd +message/rfc822 = message text/html = html text/plain = txt text/x-mail = message -message/rfc822 = message - diff --git a/src/sampleconf/mimemap b/src/sampleconf/mimemap index ee20a284..dcb38214 100644 --- a/src/sampleconf/mimemap +++ b/src/sampleconf/mimemap @@ -1,10 +1,17 @@ -# @(#$Id: mimemap,v 1.14 2006-03-29 13:08:08 dockes Exp $ (C) 2004 J.F.Dockes - +# @(#$Id: mimemap,v 1.15 2006-04-01 07:34:21 dockes Exp $ (C) 2004 J.F.Dockes # Recoll: associations of file name extensions to mime types + .txt = text/plain .text = text/plain .d = text/plain +# Source files. Defining them as text/x-c will enable ext viewer. If +# text/plain they will be somewhat indexed +.cpp = text/x-c +.h = text/x-c +.c = text/x-c +.cc = text/x-c + .rtf = text/rtf .html = text/html @@ -25,7 +32,7 @@ .gz = application/x-gzip .Z = application/x-gzip .bz2 = application/x-bzip2 -.Z = application/x-compress +#.Z = application/x-compress .doc = application/msword @@ -58,12 +65,13 @@ # unneeded decompression or 'file' calls. File names still get indexed if # indexallfilenames is set recoll_noindex = .tar.gz .tgz .tar.bz2 .tbz .log.gz .md5 .map \ - .c .h .cpp .m4 .tcl .js .sh .pl .awk .php .php3 \ + .m4 .tcl .js .sh .pl .awk \ .o .lib .dll .a \ .dat .bak .rdf .log .db .ini .msf \ .gnm .gnumeric .tex \ .gif .bmp .xpm \ ,v ~ # +# Special handling of .txt files inside ~/.gaim directory [~/.gaim] .txt = text/x-gaim-log