Re: Using the builtin editor
On Fri, May 07, 2004 at 02:42:56PM +0900, Derek Martin wrote:
> On Fri, May 07, 2004 at 02:21:36PM +0900, TAKAHASHI Tamotsu wrote:
> > With (2), mutt tries to invoke "builtin" as an _external_ editor.
> [snip]
> > Is this a bug?
>
> Uh, yes, I'd say so... Mutt should know that "builtin" means the
> internal editor, and not try to invoke an external editor.
I see.
BTW, I misunderstood the code and thought it was hard to fix.
(I thought mutt_edit_headers() was to edit only headers.)
Solution is very simple.
Probably this is the real intention of the developers:
--- mutt/cvs-m/compose.c~ Tue Apr 13 09:01:33 2004
+++ mutt/cvs-m/compose.c Fri May 7 16:10:37 2004
@@ -733,7 +733,7 @@
/* fall through */
case OP_COMPOSE_EDIT_HEADERS:
if (op == OP_COMPOSE_EDIT_HEADERS ||
- (op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS)))
+ (op == OP_COMPOSE_EDIT_MESSAGE && (mutt_strcmp ("builtin", Editor)
!= 0) && option (OPTEDITHDRS)))
{
char *tag = NULL, *err = NULL;
mutt_env_to_local (msg->env);
--
tamo