Hello All,

  Finally, I have the problem solved.  What I wanted to do is to skip
signatures in quoted message while replying.  For those who are
interested, here is how I did it ;-)

  First, I have wrote the perl script (find attached) that removes
signatures from the passed file and saves the resulting file in the same
place.

  Then, I have wrote a shell script, which basically is just a call to my
script, and then a call to my editor.

  Then I have changed "set editor" line in my .muttrc to the path to the
shell script.

  Ok, both scripts are attached, and I hope that the whole thing will work
for you as well, although it works only if you have your indent_str="> "
and reply has a normal signature, which begins with "-- "  ;-)

-- 
 Best regards,
 Leonid Mamtchenkov
 System administrator
 J.F.Services Ltd. (Limassol, Cyprus)
 E-mail: [EMAIL PROTECTED]
#!/usr/bin/perl

# This script removes signatures when quoting e-mail replies.
$filename=shift;           # Mutt will pass it ;-)

# Read all the lines from the file.
open (IN, "<$filename") || die "Could not read from $filename.\n";
@lines=<IN>;
close (IN);

open (OUT, ">$filename") || die "Could not write to $filename.\n";
$sigstarted=0;
foreach $_ (@lines) {
#  chomp $_;
  if (!(/^\>/)) {           # My indent_str is "> "...
    $sigstarted=0;
  }
  elsif ((/^\>/) && (!(/^\>\ -- $/)) && ($sigstarted eq 0)) {
    $sigstarted=0;
  }
  elsif (/^\>\ -- $/) {
    $sigstarted=1;
  }
  if ($sigstarted eq 0) {
    print OUT $_;
  }
}
close (OUT);

mypico.sh

Reply via email to