Version: 1.13.5 (using KDE 4.5.2) OS: Linux I’ve been experimenting with emacs as standard-editor for the composer, and I stumbled upon xembed: http://www.emacswiki.org/emacs/EmacsXembed By passing emacs the window ID of the parent window, it seems that it can be embedded in the window. So I’d like to see an option to not only add the file to the command via %f, but also to add the window ID of the composer text-area (or an overlay) via %w or similar. With that, any external editor should be embeddable as if it were the native one. Well, I could also spell this bug as „I’d like to embed emacs directly into kmail instead of opening it in a seperate window or switching to a running emacs window“ :) Reproducible: Didn't try OS: Linux (x86_64) release 2.6.34-gentoo-r6 Compiler: x86_64-pc-linux-gnu-gcc
Some info I found: Discussion in the emacs list: - http://osdir.com/ml/general/2010-04/msg38048.html - http://osdir.com/ml/general/2010-04/msg36121.html qtxembeddedcontainer: - http://doc.trolltech.com/solutions/qtxembed/qtxembedcontainer.html A more general solution would be an emacs kpart. Possible TODO on the emacs-side: xembed also for emacsclient. Best wishes, Arne
I wrote a proof of concept embedding script. It’s very simple (only opens a qt window and embeds emacs), but it works: http://bitbucket.org/ArneBab/kembed-emacs/src/tip/qxembed-emacs.py
Thank you for your feature request. Kmail1 is currently unmaintained so we are closing all wishes. Please feel free to reopen a feature request for Kmail2 if it has not already been implemented. Thank you for your understanding.
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2
The bug is still valid: currently I can only specify “emacsclient -c %f”. That means a new Window gets opened. With the implemented wish I would be able to specify “emacsclient --parent-id=%w -c %f”. That would mean, that emacs would be opened inside the text frame of the kmail editor window. xembed for emacsclient has been implemented in the meantime (in emacs 24.x), so embedding is fast (if you run an emacs server - as recommended).
--parent-id is just define for 24.x ? I will add %w as windowId but I will not able to test it. I don't have emacs 24.x just 23.3 Regards
Git commit ae25540ae4ebc5dcdd88bb30860501eddc004b87 by Montel Laurent. Committed on 21/08/2012 at 12:53. Pushed by mlaurent into branch 'KDE/4.9'. Fix Bug 255008 - external editor: string replace for the window id to be used with xembed use %w for windows id. and fix command line parsing when we have "emacs --toto=%w" FIXED-IN: 4.9.1 M +10 -3 messagecomposer/kmeditor.cpp http://commits.kde.org/kdepim/ae25540ae4ebc5dcdd88bb30860501eddc004b87
That’s great! Thank you! You can test the embedding with emacs 23 by using emacs proper instead of emacsclient: emacs --parent-id %w %f that should embed emacs directly in the editor-window. The only advantages of emacsclient is that it starts faster and that it has all the open files I used in other editing sessions. I don’t see in the diff if you create a QX11EmbedContainer for generating the winid. It looks as if you just give it the ID of the editor window, and I don’t know if that can be used for embedding via xembed. (I hope my example python code helped a bit :) )
I success to test it and windId is enough. emacs is embedded in composer. Not necessary to use a QX11EmbedContainer
Nice! I’m really anxious to test it in KDE 4.9.1! A thousand times thank you!
Strangely it does not work for me… I set emacs via emacs --parent-id=%w %f And it still openes a new emacs window instead of embedding it. How exactly do you define emacs as editor? Viesion is 4.9.5
… there I write and the next moment I find the answer myself: The correct command line is emacs --parent-id %w %f Thank you very much!
Note: The embedded emacs still has issues, but these seem to come from emacs, not KMail: http://lists.gnu.org/archive/html/bug-gnu-emacs/2013-01/msg00623.html