<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #3416: mutt doesn't respect mailcap editor in Compose view



#3416: mutt doesn't respect mailcap editor in Compose view
--------------------------+-------------------------------------------------
 Reporter:  tohPhu2U      |       Owner:  mutt-dev
     Type:  defect        |      Status:  new     
 Priority:  major         |   Milestone:          
Component:  mutt          |     Version:  1.5.20  
 Keywords:  mailcap edit  |  
--------------------------+-------------------------------------------------
 So, I'm in compose view, just attached a gif image, which is properly
 identified as 'image/gif'. Now, I need to edit it, default keybinding is
 !^Xe. For some reason mutt runs $EDITOR for gif.
 Here is what my mailcap has:
 {{{
 image/gif; edit=xpaint %s
 }}}

 Indeed, after checking source code, mutt unconditionally runs $EDITOR for
 anything.
 compose.c line ~960:
 {{{
  case OP_COMPOSE_EDIT_FILE:
    CHECK_COUNT;
    mutt_edit_file (NONULL(Editor), idx[menu->current]->content->filename);
    mutt_update_encoding (idx[menu->current]->content);
    menu->redraw = REDRAW_CURRENT | REDRAW_STATUS;
    mutt_message_hook (NULL, msg, M_SEND2HOOK);
  break;
 }}}
 as you can see, mutt_edit_file is always passed Editor, which points to
 $EDITOR...

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3416>
Mutt <http://www.mutt.org/>
The Mutt mail user agent