Some newer IDEs such as pida (http://pida.co.uk) [in Portage] and encode (http://encode.sourceforge.net/) that support a user-provided editor do not work with emacs out of the box. The patches in the given URL need to be applied to fix this. In particular, the pida information is listed here: http://pida.co.uk/trac/wiki/EmacsSupport
As discussed on IRC, we could optionally apply parent-{id,fix}.patch depending on some USE flag (xembed?). But first you should ask upstream if they would consider including this.
For information on upstreams opinion of this patch, please see: http://lists.gnu.org/archive/html/emacs-devel/2006-02/msg00162.html (this is specifically about the xembed patch).
Available for testing in the Emacs Overlay, emerge app-editors/emacs-22.1 with "xembed" USE flag enabled.
For the records: The patches have been resubmitted to upstream and are being discussed
Resolving as UPSTREAM since we won't move this to the Portage tree. We will maintain it in the Emacs overlay until it is included upstream.
This has been included in the upstream CVS trunk, i.e. it is available in emacs-cvs:23.