Re: problems with quotes in send-hook lines within .muttrc

2000-06-19 Thread Gary Johnson

On Sun, Jun 18, 2000 at 11:36:34PM +0200, [EMAIL PROTECTED] wrote:

 In my .muttrc, I've put a line in the way to set my editor:
 set editor="vi -c 'set wrap' -c 'set textwidth=0' -c 'set linebreak'"
 
 It works fine. But in some mailing-lists, one asked me to limit the
 length of my messages at 72 characters, because his mail reader didn't
 wrap correctly too long lines.

It's generally considered good netiquette to limit the line lengths in
mailing list and Usenet postings to 72 characters.

 I've tried to put in my muttrc one of these lines :
 
 send-hook '~t linux-bruxelles' set editor="vi +set textwidth=72"
 send-hook '~t linux-bruxelles' set editor="vi '+set textwidth=72'"
 send-hook '~t linux-bruxelles' set editor='vi +set textwidth=72'
 send-hook '~t linux-bruxelles' set editor='vi "+set textwidth=72"'
 send-hook '~t linux-bruxelles' set editor='vi "+set textwidth=72"'
 
 (this way of setting the option to vim avoids to use the
  form -c "set  textwidth=72") 
 
 but in doing so, I always get the message '+set textwidth=72 unknown option'

I don't really understand the rules, but here is one solution:

send-hook '~t linux-bruxelles' 'set editor="vi \"+set textwidth=72\""'

You may already know to do this, but just in case you don't:  You will
need to add another send-hook to reset your editor back to your
preferred settings for the other mailing lists.  Otherwise, once you
send a message to linux-bruxelles, your editor will remain
'vi "+set textwidth=72"'.  So, put a default send-hook like this
somewhere before the '~t linux-bruxelles' send-hook:

send-hook . 'set editor="vi -c \"set wrap textwidth=0 linebreak\""'

Note that you don't need a separate -c option for each setting.

Regards,
Gary

-- 
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | RF Communications Product Generation Unit
 | Spokane, Washington, USA



Re: problems with quotes in send-hook lines within .muttrc

2000-06-19 Thread clemensF

 [EMAIL PROTECTED]:

 send-hook '~t linux-bruxelles' set editor="vi +set textwidth=72"

what about set editor="vi \"+set textwidth=72\""?

clemens



Re: problems with quotes in send-hook lines within .muttrc

2000-06-19 Thread Suresh Ramasubramanian

clemensF proclaimed on mutt-users that: 

 [EMAIL PROTECTED]:

 send-hook '~t linux-bruxelles' set editor="vi +set textwidth=72"

what about set editor="vi \"+set textwidth=72\""?

Put this in your .vimrc

set tw=72

-- 
Suresh Ramasubramanian + [EMAIL PROTECTED]
Five is a sufficiently close approximation to infinity.
-- Robert Firth



Re: problems with quotes in send-hook lines within .muttrc

2000-06-19 Thread Ronny Haryanto

On 18-Jun-2000, [EMAIL PROTECTED] wrote:
 In my .muttrc, I've put a line in the way to set my editor:
 set editor="vi -c 'set wrap' -c 'set textwidth=0' -c 'set linebreak'"

I personally separate my vimrc for general editing and for mail
editing. Hence in mutt I put:
set editor = "vi -u ~/.vimrc-mutt"

And in ~/.vimrc-mutt I put:

source ~/.vimrc
set textwidth=70
set ts=8 sw=8 sts=0
"del sig
au BufRead * normal :g/^ -- $/,/^$/-1d
gg

Cheers,

Ronny



Re: problems with quotes in send-hook lines within .muttrc

2000-06-19 Thread Dirk Ruediger

Hi all,

On Mon, 19 Jun 2000, Ronny Haryanto wrote:

 On 18-Jun-2000, [EMAIL PROTECTED] wrote:
  In my .muttrc, I've put a line in the way to set my editor:
  set editor="vi -c 'set wrap' -c 'set textwidth=0' -c 'set linebreak'"
 
 I personally separate my vimrc for general editing and for mail
 editing. Hence in mutt I put:
 set editor = "vi -u ~/.vimrc-mutt"
 
 And in ~/.vimrc-mutt I put:
 
   source ~/.vimrc
   set textwidth=70
   set ts=8 sw=8 sts=0
   "del sig
   au BufRead * normal :g/^ -- $/,/^$/-1d
gg

It's even easier to source ~/.vimrc-mutt:
include this line in your ~/.vimrc

au BufRead /tmp/mutt*  source $HOME/.vimrc-mutt

and change your entry in ~/.muttrc to

set editor="vim +/^$/ %s"

("+/^$/" brings your cursor to the first line after the mail header--
that's only usefull, if you have "set edit_headers" in ~/.muttrc)

Ciao for now, Dirk
-- 
Dirk Ruediger, Rostock, Germany