Version: (using KDE 4.2.4) OS: Linux Installed from: Mandriva RPMs I choose emacs as the external editor in kmail Settings->Configure Kmail->Composer by checking the box "use external editor instead of composer". Fine, after putting "emacs %f" in the "specify editor" box, emacs comes up when I start typing in the composer window. Also fine. However, after typing my mail, saving, then closing emacs, none of that text is handed to composer. It is all lost. Doing the same thing with "kwrite %f" works fine, as does nedit. emacs, xemacs, gedit all fail in this respect. I remember trying to figure this out a year or two ago, and I think I remember finding some information that pointed to the problem being in the way kmail expects temporary files to be saved. However, I don't seem to be able to find that information right now.
Confirmed with gvim. Does also not work. I'm going to see why.
With gvim you need to pass the extra option "-f" which tells it not to fork into the background. If that option is not given, gvim starts another subprocess and terminates the just started one, which is why kmail thinks the editor has already been closed. Can you check if emacs, gedit has a similar commandline option, please ?
Perhaps this isn't much help, but, gedit has a very brief man/--help that says nothing about forking. The emacs man also doesn't mention forking or running in the background. Both processes execute in the foreground from a shell.
ok, I now installed emacs and xemacs, and when configuring "emacs %f" or "xemacs %f" the editing works as expected. I tried with KDE-4.3 RC3 and with KDE4.4/current trunk. Didn't test gedit (too much gnome libs to install). As it works for me, I'll close it for now. If you can see the problem still with 4.3, please reopen.