After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 567145 - KDE style external editor plugin
KDE style external editor plugin
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Plugins
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-plugin-maintainers
Evolution QA team
evolution[composer]
Depends on:
Blocks:
 
 
Reported: 2009-01-09 11:31 UTC by Sankar P
Modified: 2009-05-05 00:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch by Holger Macht <hmacht@suse.de> (22.06 KB, patch)
2009-01-09 11:32 UTC, Sankar P
needs-work Details | Review
New patch (24.17 KB, text/plain)
2009-01-19 13:40 UTC, Holger Macht
  Details
Updated patch that applies to latest svn (21.53 KB, patch)
2009-04-25 21:10 UTC, Holger Macht
accepted-commit_now Details | Review
New patch that applies to current git (21.47 KB, patch)
2009-04-28 13:00 UTC, Holger Macht
committed Details | Review

Description Sankar P 2009-01-09 11:31:54 UTC
The external editor plugin should act in the kmail way.

It should popup a evo mail composer so the user gets the benefits of auto-completion etc. Once the user types in something in the body, it should launch the external editor that is configured.
Comment 1 Sankar P 2009-01-09 11:32:55 UTC
Created attachment 126097 [details] [review]
Patch by Holger Macht <hmacht@suse.de>
Comment 2 Sankar P 2009-01-09 11:34:32 UTC
Holger,

Thanks for the patch.

One important comment is: The patch opens a new window whenever keys like alt are pressed. So, if you set gvim to be your external editor and everytime you switch to composer and press alt key, a new editor window is launched. 
Comment 3 Holger Macht 2009-01-09 14:07:04 UTC
Yes, I know. But only if the 'auto feature' is enabled. I also checked with kmail, same behaviour there, but I also agree that this is not perfect. There's also the issue for "shift", pressed alone or when trying to type an uppercase letter.

When I tried to solve this about two weeks ago, I realized that this isn't so easy to solve. Maybe we could just make this function a hidden option without GUI, only in gconf?

Anyway, I just saw that I sent a version of the patch with useless debug info, will attach a new patch.
Comment 4 Holger Macht 2009-01-19 13:40:33 UTC
Created attachment 126754 [details]
New patch

This patch has useless debugging output removed and tries to start the external editor on "non-character" keys. I'm doing something like:


	/* we don't want to start the editor on any modifier keys */
	switch (event->keyval) {
	case GDK_Alt_L:
	case GDK_Alt_R:
	case GDK_Super_L:
	case GDK_Super_R:
	case GDK_Control_L:
	case GDK_Control_R:
		return FALSE;
	default:
		break;
	}


If you have a better idea how to solve this, please feel free to modify it. Thanks.
Comment 5 Holger Macht 2009-02-27 08:40:40 UTC
Any news on the patch? Can it be committed?
Comment 6 Holger Macht 2009-04-25 21:10:53 UTC
Created attachment 133301 [details] [review]
Updated patch that applies to latest svn
Comment 7 Bharath Acharya 2009-04-27 06:44:06 UTC
Looks fine to commit. Works neat too. Just fix this warning before committing.

external-editor.c: In function ‘enable_disable_composer’:
external-editor.c:147: warning: ‘return’ with no value, in function returning non-void
Comment 8 Holger Macht 2009-04-28 13:00:16 UTC
Created attachment 133488 [details] [review]
New patch that applies to current git

Updated patch. Rebased due to yesterday's commit of 0f7060ee7dcceac8d10aaa9100c919712de491ff

This should also address the issues mentioned in bug 561188.

Please commit.
Comment 9 Bharath Acharya 2009-04-28 15:19:33 UTC
Thanks a lot Holger.

Committed to master
http://git.gnome.org/cgit/evolution/commit/?id=156dfd09d8467bcc727e69f27795360866650eec
Comment 10 André Klapper 2009-05-04 11:34:40 UTC
-    _name="External Editor">
+	    id="org.gnome.plugin.external.editor" name="External Editor">
-    <_description>A plugin for using an external editor as the composer. You can send only plain-text messages.</_description>
+    <description>A plugin for using an external editor as the composer. You can send only plain-text messages.</description>

This removed any I18N.
Reopening.
Comment 11 Holger Macht 2009-05-04 12:50:36 UTC
Ok, sorry, missed that during testing. Can someone please commit a fix for this? I doubt I need to provide a patch for this one-liner. Thanks.
Comment 12 Matthew Barnes 2009-05-04 19:33:37 UTC
Fixed in
http://git.gnome.org/cgit/evolution/commit/?id=d95e6e629cdc9f4b16ccff873e3867bcf930fe28

I didn't even realize that's what the underscores meant.
Comment 13 Holger Macht 2009-05-04 20:40:08 UTC
Thanks. However, one more time I have to bother you...the closing description tag needs the underscore too (</_description).