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

Re: save_history not working



Thus spake Kyle Wheeler [11/05/07 @ 12.02.04 -0600]:
> > 
> > I also noticed that not only does :set &save_history ?save_history 
> > return 0 when I set it to 100, but also, :set $history returns 10 
> > even when I set it to 100.  Either I've screwed up or mutt isn't 
> > reporting values correctly.
> 
> Just what do you think ":set &save_history" does? Just FYI, that's the 
> same as ":reset save_history". It sets the variable back to the 
> default value. So whenever you do ":set &save_history ?save_history" 
> mutt is going to first set $save_history to its default value (0) and 
> then print whatever $save_history is set to, namely, the default value 
> (0). In other words this sequence of commands:
> 
>      :set save_history=100
>      :set &save_history ?save_history
> 
> Is exactly equivalent to this sequence of commands:
> 
>      :set save_history=100
>      :reset save_history
>      :set ?save_history
> 
> The default value of $history is 10. Thus, if you do this:
> 
>      :set history=100
>      :set &history ?history
> 
> Then OF COURSE it's going to tell you that $history is 10, because you 
> just told mutt to reset it back to its default value.
> 
> To find out what a variable is set to, all you need to do is this:
> 
>      :set ?history

(Sorry for you getting this twice Kyle.)

OK, I thought that what I had been typing was a command to reveal the value of 
a variable.  Apparently it is not, and I'm glad to know the right way to do it 
now!  For the record, I used the ":set &blah ?blah" construct because in an 
earlier thread about charsets, I was asked what my mutt thought its charset 
was, and was told that ":set &charset ?charset" would tell me this.  Which, I 
guess, it *did*.  But I had no idea that such a construction was a reset 
command, since that's the only time I had ever heard of it and its purpose then 
was informing me rather than resetting.
 -G