<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #3427: mutt-1.5.20: "reply-hook . set realname=foo" is executed too late



#3427: mutt-1.5.20: "reply-hook . set realname=foo" is executed too late
----------------------------+-----------------------------------------------
  Reporter:  fraff@â        |       Owner:  mutt-dev
      Type:  defect         |      Status:  new     
  Priority:  major          |   Milestone:          
 Component:  mutt           |     Version:          
Resolution:  fixed          |    Keywords:          
----------------------------+-----------------------------------------------
 {{{
 Package: mutt
 Version: 1.5.20
 Severity: normal

 -- Please type your report below this line

 bug also reported to the debian bug tracking system but no update by
 maintainer for months
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565236

 I have the same probleme and manage to reproduce it with the code below,

 reply to test 1, your realname is global realname, then, reply to test 3,
 your realname is set-realname-1.

 you can also reply to test 2 then test 1, realname will be
 set-realname-2 in both cases.


 dir=$(mktemp -d) || exit $?

 mkdir -p $dir/maildir/{tmp,cur,new}

 for i in 1 2 3
 do
     cat << EOF > $dir/maildir/cur/$i:2,S
 From: your friend <any@xxxxxxx>
 To: received-realname-$i <$i@xxxxxxxx>
 Subject: test $i

 test $i
 EOF
 done


 cat << EOF > $dir/muttrc
 set realname="global realname"
 alternates '(1@xxxxxxxx|3@xxxxxxxx)'
 reply-hook . 'set realname="default realname"'
 reply-hook "~t 1@xxxxxxxx" 'set realname = "set-realname-1"'
 reply-hook "~t 2@xxxxxxxx" 'set realname = "set-realname-2"'

 set reverse_name = yes
 set reverse_realname = no

 # useless but much confortable
 set folder = $dir/
 set spoolfile = "=maildir"

 # below is not important but much comfortable
 set abort_nosubject = no
 set abort_unmodified = no
 set postpone = no
 set include = yes
 set fast_reply = yes
 EOF

 mutt -n -F $dir/muttrc

 rm -rf $dir


 -- Build environment information

 (Note: This is the build environment installed on the system
 muttbug is run on.  Information may or may not match the environment
 used to build mutt.)

 - gcc version information
 gcc
 Using built-in specs.
 Target: i486-linux-gnu
 Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
 --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-
 languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-
 system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
 threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
 --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-
 checking=release --build=i486-linux-gnu --host=i486-linux-gnu
 --target=i486-linux-gnu
 Thread model: posix
 gcc version 4.3.2 (Debian 4.3.2-1.1)

 - CFLAGS
 -Wall -pedantic -Wno-long-long -g -O2

 -- Mutt Version Information

 Mutt 1.5.20 (2010-04-22)
 Copyright (C) 1996-2009 Michael R. Elkins and others.
 Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
 Mutt is free software, and you are welcome to redistribute it
 under certain conditions; type `mutt -vv' for details.

 System: Linux 2.6.26-2-xen-686 (i686)
 ncurses: ncurses 5.7.20100313 (compiled with 5.7)
 libidn: 1.15 (compiled with 1.15)
 Compile options:
 -DOMAIN
 -DEBUG
 -HOMESPOOL  +USE_SETGID  +USE_DOTLOCK  +DL_STANDALONE  +USE_FCNTL
 -USE_FLOCK
 -USE_POP  -USE_IMAP  -USE_SMTP
 -USE_SSL_OPENSSL  -USE_SSL_GNUTLS  -USE_SASL  -USE_GSS  -HAVE_GETADDRINFO
 +HAVE_REGCOMP  -USE_GNU_REGEX
 +HAVE_COLOR  +HAVE_START_COLOR  +HAVE_TYPEAHEAD  +HAVE_BKGDSET
 +HAVE_CURS_SET  +HAVE_META  +HAVE_RESIZETERM
 +CRYPT_BACKEND_CLASSIC_PGP  +CRYPT_BACKEND_CLASSIC_SMIME
 -CRYPT_BACKEND_GPGME
 -EXACT_ADDRESS  -SUN_ATTACHMENT
 +ENABLE_NLS  -LOCALES_HACK  +HAVE_WC_FUNCS  +HAVE_LANGINFO_CODESET
 +HAVE_LANGINFO_YESEXPR
 +HAVE_ICONV  -ICONV_NONTRANS  +HAVE_LIBIDN  +HAVE_GETSID  -USE_HCACHE
 -ISPELL
 SENDMAIL="/usr/sbin/sendmail"
 MAILPATH="/var/mail"
 PKGDATADIR="/usr/local/share/mutt"
 SYSCONFDIR="/usr/local/etc"
 EXECSHELL="/bin/sh"
 -MIXMASTER
 To contact the developers, please mail to <mutt-dev@xxxxxxxx>.
 To report a bug, please visit http://bugs.mutt.org/.
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3427>
Mutt <http://www.mutt.org/>
The Mutt mail user agent