open with emacs in nautilus
1. create or edit /usr/share/applications/emacs.desktop
[Desktop Entry]
Name=Emacs
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacsclient -n -a emacs %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
the most important item is "Exec=emacsclient -n -a emacs %F". The command attempt using a exist emacs server or start a new instance when no emacs server available.
2. edit /usr/share/applications/mimeinfo.cache to associate mime type to emacs. Or change associations in nautilus`s properties editor.