Use gvim with mutt to compose email

2009-04-06 Thread Dave Feustel
I currently have the mutt editor set to vim. I would like to
use gvim instead, but when I specify gvim and start a reply
to an email, gvim starts with an empty screen. Is there a
way to get mutt to start gvim with the message already loaded?

Thanks.


Re: Use gvim with mutt to compose email

2009-04-06 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Monday, April  6 at 09:01 PM, quoth Dave Feustel:
 I currently have the mutt editor set to vim. I would like to 
 use gvim instead, but when I specify gvim and start a reply 
 to an email, gvim starts with an empty screen. Is there a 
 way to get mutt to start gvim with the message already loaded?

The reason that gvim starts with an empty screen is because of the way 
it detaches itself from the terminal.

The way mutt handles the editor is by creating a temporary file for 
the message, launching the editor, and waiting for it to exit. When 
(as far as mutt can tell) the editor exits, it reads and then deletes 
the temporary file. When you launch gvim, it creates a second gvim 
process that is detached from the terminal, and then the first 
(original) one exits. Mutt notices that this first one exited, and so 
deletes the temporary file. Thus, by the time the second gvim process 
has gotten underway, the temporary file is gone. More importantly, 
mutt is no longer paying attention to whatever gvim might do.

The way to fix this situation is to prevent gvim from disconnecting 
itself from the terminal, so that mutt can properly wait for it. Do 
this by setting $editor to gvim -f

Make sense?

~Kyle
- -- 
I have always found that mercy bears richer fruits than strict 
justice.
 -- Abraham Lincoln
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iEYEARECAAYFAknaP9EACgkQBkIOoMqOI16FOwCgmaaeReRStRISK4nPv2JcZWKU
ALYAoLL86h3TvmcQFm+xKle/767WXqbW
=Nhfk
-END PGP SIGNATURE-


vim ou gvim

2002-11-22 Thread Eric Santonacci
Bonjour,

J'aimerais utiliser gvim à la place de vim en tant qu'éditeur par défaut
pour mutt. (set editor=gvim). Malheuresement, gvim ne communique pas
bien avec mutt contrairement à vim. Pas de texte lors d'un réponse à un
mail, pas d'insertion de ma signature, et lors de la sauvegarde du message
à envoyer, mutt m'annonce abandon, message non modifié.

J'ai loupé quelque chose ou ce n'est pas possible d'associer gvim à
mutt.

Merci d'avance
-- 
Eric Santonacci
TALC Informatique
http://www.talc.fr



Re: gvim

2000-07-21 Thread Michael Soulier

On Thu, Jul 20, 2000 at 03:37:06PM -0500, Ben Beuchler wrote:

 I doubt that's the problem he's having as I use vim and it works fine
 but if I change the vim line to gvim, it does the same thing he
 describes.  No signature and doesn't actually save the message...

Yes, that's because it's forking. The process that mutt is waiting to
return returns right away, and meanwhile gvim runs in a child process. Use the
-f option to prevent this. 

Mike

-- 
Michael P. Soulier, 1Z22, SKY  Tel: 613-765-4699 (ESN: 39-54699)
Optical Networks, Nortel Networks, SDE Pegasus
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX
Nortel Linux User's Group Ottawa: (internal) http://nlug.ca.nortel.com:8080



gvim

2000-07-20 Thread Mostly Harmless

Can anyone explain how to use gvim with mutt? mutt and gvim fail to get
my signature into the message and mutt is always telling me that gvim
didn't modify my message, so why don't I abort.

Thanks.

-- 
"Now you see that evil will always triumph, because good is dumb."
- Dark Helmet, Spaceballs

"You can't be a real country unless you have a beer and an airline; it
helps if you have some kind of a football team, or some nuclear
weapons, but at the very least you need a beer."
- Frank Zappa



Re: gvim

2000-07-20 Thread Michael Soulier

On Thu, Jul 20, 2000 at 03:57:04PM -0400, Mostly Harmless wrote:
 Can anyone explain how to use gvim with mutt? mutt and gvim fail to get
 my signature into the message and mutt is always telling me that gvim
 didn't modify my message, so why don't I abort.

set editor='gvim -f'

The -f tells gvim not to fork. Otherwise, mutt can't wait for the gvim
process to return. 

Mike

-- 
Michael P. Soulier, 1Z22, SKY  Tel: 613-765-4699 (ESN: 39-54699)
Optical Networks, Nortel Networks, SDE Pegasus
"...the word HACK is used as a verb to indicate a massive amount
of nerd-like effort."  -Harley Hahn, A Student's Guide to UNIX
Nortel Linux User's Group Ottawa: (internal) http://nlug.ca.nortel.com:8080



Re: gvim

2000-07-20 Thread Charles Curley

On Thu, Jul 20, 2000 at 03:57:04PM -0400, Mostly Harmless muttered:
 Can anyone explain how to use gvim with mutt? mutt and gvim fail to get
 my signature into the message and mutt is always telling me that gvim
 didn't modify my message, so why don't I abort.

I suspect that your .muttrc is not set up correctly for your signature. It
provides the siganture before feeding the message boilerplate to your
editor.


-- 

-- C^2

No windows were crashed in the making of this email.

Looking for fine software and/or web pages?
http://w3.trib.com/~ccurley
 PGP signature


Re: gvim

2000-07-20 Thread Ben Beuchler

On Thu, Jul 20, 2000 at 02:11:22PM -0600, Charles Curley wrote:

 On Thu, Jul 20, 2000 at 03:57:04PM -0400, Mostly Harmless muttered:
  Can anyone explain how to use gvim with mutt? mutt and gvim fail to get
  my signature into the message and mutt is always telling me that gvim
  didn't modify my message, so why don't I abort.
 
 I suspect that your .muttrc is not set up correctly for your signature. It
 provides the siganture before feeding the message boilerplate to your
 editor.

I doubt that's the problem he's having as I use vim and it works fine
but if I change the vim line to gvim, it does the same thing he
describes.  No signature and doesn't actually save the message...

Ben

-- 
Ben Beuchler [EMAIL PROTECTED]
MAILER-DAEMON (612)-321-9290 x101
Bitstream Underground   www.bitstream.net



Re: vim -g/gvim problem

1999-05-27 Thread Paul Ackersviller

On Tue, May 25, 1999 at 09:30:19PM +, Henning 'Faroul' Peters wrote:
 Am Tue, May 25, 1999 at 05:03:23PM +0300 schrieb Saku Ytti:
  For some reason if I use gvim/vim -g as my $EDITOR I always get 'Aborted
  unmodified message.' and vim -g opens on my screen with proper filename and
  it's completely empty. This works perfectly with other programs.
 
 Same happens to me on AMIGA some times ago... gvim seems to detach from the
 shell - and mutt "thinks", the editor exits. There's a flag (-x?) to tell vim
 not to detach from the starting shell.

The flag is -f, for foreground.

-- 
Paul Ackersviller



vim -g/gvim problem

1999-05-25 Thread Saku Ytti

For some reason if I use gvim/vim -g as my $EDITOR I always get 'Aborted unmodified 
message.'
and vim -g opens on my screen with proper filename and it's completely empty.

This works perfectly with other programs.

-- 
--ytti - ::3585:0512:1378



Re: vim -g/gvim problem

1999-05-25 Thread David DeSimone

Saku Ytti [EMAIL PROTECTED] wrote:

 For some reason if I use gvim/vim -g as my $EDITOR I always get
 'Aborted unmodified message.' and vim -g opens on my screen with
 proper filename and it's completely empty.

Vim probably forks itself into the background, thinking that you must be
at a shell prompt and you want to have your prompt back so you can type
another command.  But instead, Mutt is waiting for the editor to finish,
and when it returns control back to Mutt, the file has not been touched,
so Mutt aborts, and deletes the file before gvim can really get a good
look at it.

Don't let vim background itself.

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
Convex Division  |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: vim -g/gvim problem

1999-05-25 Thread Henning 'Faroul' Peters

Am Tue, May 25, 1999 at 05:03:23PM +0300 schrieb Saku Ytti:
 For some reason if I use gvim/vim -g as my $EDITOR I always get 'Aborted
 unmodified message.' and vim -g opens on my screen with proper filename and
 it's completely empty. This works perfectly with other programs.

Same happens to me on AMIGA some times ago... gvim seems to detach from the
shell - and mutt "thinks", the editor exits. There's a flag (-x?) to tell vim
not to detach from the starting shell.

Faroul

-- 
Henning `Faroul' Peters  -  [EMAIL PROTECTED]
   http://www.beyond.kn-bremen.de  -  PBeMs, Rollenspiel, LARP, DragonDice
 If a=b and b=c, then we've got a messed up alphabet.