Hello,

please perform the following steps in a Python shell

import mimetypes
print mimetypes.guess_type(<filename goes here>)

and check, that the first entry is either None or text/... That is the same 
logic eric uses to decide to open it with the editor or pass it on to your 
system (i.e. default application).


On Mittwoch, 18. Mai 2011, [email protected] wrote:
> Thank you for your response.
> My /etc/mime.types has the entry you mention and it is the only one.
> grep js /etc/mime.types
> 758:text/x-js                                 js
> 
> I noticed that xdg-mime query filetype static/menu.js lists the js file
> as application/javascript. I changed this using kcmshell4 filetypes
> where i set another
> extension for application/javascript and created an entry text/x-js
> with .js associated
> and no application in the list. xdg-mime query filetype list a js file
> now as  text/x-js
> Eric4 still does not work as expected. It asks me for an application
> when i click on an
> .js file in the project. Of course this happens because i have not
> associated an application
> with this mime type.
> 
> 
> 
> 
> On Wed, 18 May 2011 19:19:05 +0200, Detlev Offenbach wrote:
> On Mittwoch, 18. Mai 2011, [email protected] wrote:
> Hi.
> I am using Eric4 4.4.13 as supplied by archlinux. I try to edit .js
> file but it is not working as expected.
> I am able to load .js files from command line or through the File->Open
> menu but when trying to edit .js files
> within an project eric4 starts kwrite. I modified /etc/mime.types but
> this shows no effect.
> 
> My /etc/mime.types has an entry of "text/x-js js" for javascript. It
> works
> fine over here. eric uses the mime type to determine, if the file is a
> text
> file (i.e. mime type starts with 'text/'). If so, the internal editor
> is used.
> If not, the standard application of the system is used. Please check
> your
> /etc/mime.types for such an entry and if it is there check, that it is
> not
> overwritten later on in the file by something starting with e.g.
> application/.
> 
> I also changed
> the file type association in kde which changes what editor Eric4/kde
> starts for .js files. I even put eric4
> as editor for .js file in kde. Then eric4 starts another eric4 with the
> .js file but not in the same project.
> I read on the mailing list that this is no new problem. Unfortunately i
> did not found a solution.
> Does anybody have an advice?
> _______________________________________________
> Eric mailing list
> [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/eric
> _______________________________________________
> Eric mailing list
> [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/eric


-- 
Detlev Offenbach
[email protected]
_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric

Reply via email to