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

Re: mutt/2333: wish: display multiple ?variables at once



The following reply was made to PR mutt/2333; it has been noted by GNATS.

From: TAKAHASHI Tamotsu <ttakah@xxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: mutt/2333: wish: display multiple ?variables at once
Date: Sun, 9 Jul 2006 15:02:54 +0900

 * Sat Jul  8 2006 Alain Bench <veronatif@xxxxxxx>
 > 
 >  Hi Tamotsu-san!
 
 Hi Alain,
 Thanks for testing.
 
 
 >   On Friday, July 7, 2006 at 8:05:01 +0200, Tamotsu Takahashi wrote:
 >  
 >  > * Fri Jul  7 2006 Alain Bench <veronatif@xxxxxxx>
 >  >>| :set ?locale locale=new-value ?locale
 >  >>| locale="old-value" locale="new-value"
 >  > http://www10.plala.or.jp/sanrinsha/tamo/multiquery2.diff
 >  
 >      Much thanks! I tried only v2: It works as expected. However there is
 >  a small regression with 2 set commands in a row:
 >  
 >  | :set ?locale ; set locale=fr_FR.euc-jisx0213
 >  
 >      ...does display, but wipes immediatly. While without multiquery2:
 >  
 >  | :set ?locale ; set locale=fr_FR.euc-jisx0213
 >  | locale="C"
 
 Oops, I left an unnecessary line: "*err->data = '\0';" at
 the beginning of parse_set.
 
 
 >      Specifically my <F142> display identity macro example doesn't work
 >  anymore, and may become difficult to write in a portable way. And why
 >  not push the thing further? What about:
 >  
 >  | :set ?realname ; set ?from
 >  | realname="John Doe"; from="johnny@xxxxxxxxxxx"
 >  
 >      ...to behave exactly as "set ?realname ?from" single command? After
 >  all the user entering two echos in one command line logicaly expects
 >  that. Only errors should overwrite:
 >  
 >  | :set ?realname ; set ?typo
 >  | typo: unknown variable
 
 Hmm, you can replace "size_t errlen = 0;" with
 "size_t errlen = mutt_strlen (err->data);"
 
 But I am not sure whether this is correct in any case.
 
 
 >      Unrelated BTW: I just noticed that all Mutts 1.4/1.5 truncate the
 >  display 2 columns before right side (display 78 characters on 80). I
 >  know some terminals may misbahave on the bottom right (not mine), thus
 >  keep 1 free column is safe. But why 2?
 >  
 >  | :set 
 > from=789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.
 >  | 
 > from="789.123456789.123456789.123456789.123456789.123456789.123456789.12345678
 
 I don't know why. But the related code is mutt_curses_message
 (at the line 316 in curs_lib.c):
 |  mutt_format_string (Errorbuf, sizeof (Errorbuf),
 |                      0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf), 0);
                           ^^^^^^
 
 -- 
 tamo