Re: alternate editor ?
On Sat, Nov 17, 2007 at 04:56:13PM +0100, Michelle Konzack wrote: From: Michelle Konzack [EMAIL PROTECTED] To: mutt-users@mutt.org Subject: Re: alternate editor ? Organisation: Michelle's Selbstgebrautes Am 2007-11-11 20:29:01, schrieb Gerard Robin: Hello, is it possible to do write this in the file .muttrc (in muttrc language) : if $DISPLAY=:0.0 then editor=gedit else edtor=vim set editor=`if [ ${DISPLAY} = :0.0 ] ; then echo gedit ; else echo vim ; fi` Thanks, it works fine too with gedit, but not with gvim -f, I get the message: -f unknown variable. -- Gérard
Re: alternate editor ?
On 24 Nov 2007 19:04 +0100, by [EMAIL PROTECTED] (Gerard Robin): On Sat, Nov 17, 2007 at 04:56:13PM +0100, Michelle Konzack wrote: set editor=`if [ ${DISPLAY} = :0.0 ] ; then echo gedit ; else echo vim ; fi` Thanks, it works fine too with gedit, but not with gvim -f, I get the message: -f unknown variable. I am not particularly well-versed in muttrc-language, so the above may be trivial, but what I have done is write a script that is referenced in my muttrc, which in turn launches the editor. Then you can do as many fancy things as you like (I use it to automatically reformat quote marks and remove excess signatures before passing the message to the editor, for example). -- Michael Kjörling .. [EMAIL PROTECTED] .. http://michael.kjorling.se * . No bird soars too high if he soars with his own wings . * * ENCRYPTED email preferred -- OpenPGP key ID: 0x(758F8749)BDE9ADA6 * * ASCII Ribbon Campaign: Against HTML mail, proprietary attachments * pgp9yWghEmYqr.pgp Description: PGP signature
Re: alternate editor ?
On 2007-11-24, Gerard Robin [EMAIL PROTECTED] wrote: On Sat, Nov 17, 2007 at 04:56:13PM +0100, Michelle Konzack wrote: From: Michelle Konzack [EMAIL PROTECTED] To: mutt-users@mutt.org Subject: Re: alternate editor ? Organisation: Michelle's Selbstgebrautes Am 2007-11-11 20:29:01, schrieb Gerard Robin: Hello, is it possible to do write this in the file .muttrc (in muttrc language) : if $DISPLAY=:0.0 then editor=gedit else edtor=vim set editor=`if [ ${DISPLAY} = :0.0 ] ; then echo gedit ; else echo vim ; fi` Thanks, it works fine too with gedit, but not with gvim -f, I get the message: -f unknown variable. You'll get that error if gvim -f is not properly quoted, for example if you try to set 'editor' like this: set editor=gvim -f Try this form instead. set editor=`if [ ${DISPLAY} = :0.0 ] ; then echo 'gvim -f'; else echo vim ; fi` That will make the output of 'echo' be gvim -f which mutt will see as one value for 'editor' instead of just gvim -f which mutt will see as the value gvim for 'editor' followed by another variable to be set, -f. Regards, Gary
Re: alternate editor ?
Am 2007-11-11 20:29:01, schrieb Gerard Robin: Hello, is it possible to do write this in the file .muttrc (in muttrc language) : if $DISPLAY=:0.0 then editor=gedit else edtor=vim set editor=`if [ ${DISPLAY} = :0.0 ] ; then echo gedit ; else echo vim ; fi` Thanks, Greetings and nice Day Michelle Konzack Tamay Dogan Network Open Hardware Developer Debian GNU/Linux Consultant -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ # Debian GNU/Linux Consultant # Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSN LinuxMichi 0033/6/6192519367100 Strasbourg/France IRC #Debian (irc.icq.com) signature.pgp Description: Digital signature
Re: alternate editor ?
See http://wiki.mutt.org/?ConfigTricks and look for Generating a dynamic muttrc file me
Re: alternate editor ?
On Sun, Nov 11, 2007 at 01:23:45PM -0800, Michael Elkins wrote: From: Michael Elkins [EMAIL PROTECTED] To: mutt-users@mutt.org Subject: Re: alternate editor ? See http://wiki.mutt.org/?ConfigTricks and look for Generating a dynamic muttrc file Many thanks its works fine :-) (but all the quotes are simple quote no back-quote ...) -- Gérard