Feature #236

XEmbed support for external editors

Added by Charles Lehner over 2 years ago. Updated over 2 years ago.

Status:NewStart date:06/04/2015
Priority:NormalDue date:
Assignee:Charles Lehner% Done:

100%

Category:SylpheedSpent time:-
Target version:3.5

Description

This patch enables an external editor to be embedded into the compose window, using GtkSocket and XEmbed. If the external editor command string has a %d, it is replaced with a XID, and if it doesn't then the external editor launches in a new window as is the current behavior. The main use case I have for this is to use Vim as the embedded editor, using the command "gvim -f --socketid %d '%s', but it could also be used to open an editor in a terminal with e.g. "xterm -into %d -s $EDITOR '%s'"

The patch also adds a utility function `str_check_format` to libsylph which is like str_find_format_times but for format strings with more than one % type.

One thing I wasn't able to get working was to make the embedded external editor grab focus when it launches. However, you can press tab a few times to give it focus.

0001-Add-XEmbed-support-for-external-editors.patch Magnifier - Patch adding XEmbed support for external message editors (6.61 KB) Charles Lehner, 06/04/2015 08:58 PM

xembed-gvim-screenshot.png - Screenshot showing gvim embedded in the compose window (32.7 KB) Charles Lehner, 06/04/2015 09:24 PM

History

#1 Updated by Hiroyuki Yamamoto over 2 years ago

Hello,

It seems to be an interesting feature :)
(Probably included in 3.5 or 3.6 release)

Also available in: Atom PDF