6 Answers
6

Right click on a text file, point to "Open With" and it'll show other editors in a sub-menu. Click on "Other Application...". It'll show you a dialog with a list of applications, select Emacs and make sure the "Remember this application for "plain text document" file" option is checked. Click "Open".

I did try this, but I'm having a bit of a problem - whenever I double-click on a file in Nautilus, I get a dialog box that says: "Do you want to run "tasks.css", or display its contents? "tasks.css" is an executable text file." And then there are four options - Run in Terminal, Display, Cancel, Run. (This happens with every file, not just CSS files.)
–
begtognenNov 16 '10 at 12:05

3

@begtognen: Sorry for the ultra-late reply. But I've been trying to find a solution for this myself. Just found one - go to Nautlius preferences (Edit > Preferences), select the "Behavior" tab and under the "Executable Text Files" section, select the radio button "View executable text files when they are opened". Fixed the issue for me.
–
MussnoonNov 22 '10 at 23:28

It does not work on 13.04. After Step 3, I see a lot of choices, but not the editor I would like to have .... of course, the idea would be to use 'Add' ... but this is grayed out and can't be selected. Argh
–
Marius HofertMay 23 '13 at 15:24

I don't know how, but by copying this command I accidentally cleared the whole file. I would much prefer doing this in a text editor using find-replace (as explained in this answer) for those who are not too familiar with sed.
–
kermit666Apr 5 '13 at 22:37