0

I just installing eclipse. Using File -> Open to open a .c file, opens the file in emacs.

At this point I'm already tired of eclipse, but my curiosity is insatiable.

Where does this come from? I don't usually use emacs. Does eclipse have some fallback which opens emacs? Where could I inspect this fallback chain / choose something other than emacs?


Fedora Workstation 27

$ rpm -qa|grep eclipse
eclipse-platform-4.7.2-1.fc27.x86_64
eclipse-p2-discovery-4.7.2-1.fc27.noarch
eclipse-webtools-common-3.9.2-1.fc27.noarch
eclipse-swt-4.7.2-1.fc27.x86_64
eclipse-xsd-2.13.0-1.fc27.noarch
eclipse-m2e-workspace-0.4.0-6.fc27.noarch
eclipse-pde-4.7.2-1.fc27.x86_64
eclipse-mylyn-tasks-bugzilla-3.23.2-2.fc27.noarch
eclipse-recommenders-2.5.0-1.fc27.noarch
eclipse-equinox-osgi-4.7.2-1.fc27.x86_64
eclipse-egit-4.10.0-1.fc27.noarch
eclipse-m2e-core-1.8.2-2.fc27.noarch
eclipse-epp-logging-2.0.6-1.fc27.noarch
eclipse-ecf-core-3.13.8-1.fc27.noarch
eclipse-jdt-4.7.2-1.fc27.noarch
eclipse-usage-4.5.2-0.1.fc27.noarch
eclipse-jgit-4.10.0-2.fc27.noarch
eclipse-webtools-servertools-3.9.2-1.fc27.noarch
eclipse-webtools-sourceediting-3.9.2-1.fc27.noarch
eclipse-mylyn-3.23.2-2.fc27.noarch
eclipse-abrt-0.0.3-3.fc27.noarch
eclipse-emf-runtime-2.13.0-3.fc27.noarch
eclipse-gef-3.11.0-4.fc27.noarch
eclipse-emf-core-2.13.0-3.fc27.noarch
1

https://superuser.com/questions/112410/how-do-i-make-all-file-types-open-in-the-internal-editor-in-eclipse

When using the open file dialog on Eclipse, many file types open in the internal editor as expected (.java, .txt). However, others open in an external editor. For example on my system attempting to open .sh file causes it to open it in emacs, and .py files open in bluefish.

...

You have two alternatives: either install an eclipse plug-in to manage the kind of file you want to edit (like e.g. pyDev for python), or go to Window > Preferences > Editors > File Associations and associate your file extensions to the built-in text editor in Eclipse.

Given that you have emacs installed, it has become the default editor for .c files, even though the default text editor for text files is gedit (Gnome Text Editor).

If you compare emacs.desktop and org.gnome.gedit.desktop. in /usr/share/applications, you will see that emacs registers itself specifically for .c files, but gedit only for text files in general. I assume the more specific type takes priority.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.