Re: Use gvim with mutt to compose email
- To: mutt-users@xxxxxxxx
- Subject: Re: Use gvim with mutt to compose email
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Mon, 6 Apr 2009 12:45:53 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:mime-version:content-type; s=default ; bh=w7OYR0nAFULed/T2GhsEe7WU/h8=; b=Qq1AYFPF0yZnEg96mGokr8aHnHO PJSdeQyRTI5xFL2d6AMppURzH4d8sWTJ4BgZIuZNQH31E8kznoEIZMVijugxFSN/ HFCyvInhROBfjb+dC6t2gjocALJbopBB7wRmbbyrkaAVuKtRzF1DfYMrUkUe4n3p Rz2nHBo4nWl/nfyw=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=Vv+XoeUuhTd8sBPrzaPX6KKLIjYyPDCOPPIm2pd47qBUgMvcOTT4/KyprgHbESw0qanZ2pACJpsakbk/F3L4jVlGByEdLENhXQNieFbEpiH6kNcTjshA5NzbBuz/6AEz015vqunVoSKk0bwbcjr7TK+Usmf1c6L+6WZdQSLNU50=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition:OpenPGP:User-Agent;
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-03-19)
-----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-----