Re: save_history not working
Thus spake Kyle Wheeler [11/04/07 @ 22.26.46 -0600]:
> On Sunday, November 4 at 04:45 PM, quoth dv1445@xxxxxxxxx:
> > The save_history setting is supposed to tell mutt how many things to
> > save in the history_file, right? Save_history is not working for me
> > at all. No matter what I set it to, it only saves 10 commands.
>
> My guess is because you haven't set $history. According to the mutt
> documentation:
>
> history
> Type: number
> Default: 10
>
> This variable controls the size (in number of strings
> remembered) of the string history buffer. The buffer is
> cleared each time the variable is set.
>
> $save_history only affects the limit placed on the file, not the limit
> mutt places on itself. Thus, $save_history is only used if
> $save_history < $history (AND if $save_history > 0, but for an
> entirely different reason).
OK, I will fiddle with $history. I did read that part of the manual, but
$history has been around, while $save_history is new (I think), so I thought
$save_history superceded $history, as a massive improvement (as in, "hey, now
you're not limited to 10 commands, you can have as many as you want"). Also,
the docs say that $history clears itself every time it's set, so I thought that
with "set history=100" in the .muttrc, it would get cleared every time I
started mutt, and would therefore behave exactly as I've been used to before
rather than in the way I thought the new feature would work (i.e., saving as
many commands as you want even when you quit mutt and start up again).
> > mutt says that save_history=0. But it's not zero, it's 10, and it's
> > also not what I told it to be. Am I doing something wrong? I
> > checked the manual and the wiki, no dice.
>
> Ah, well, the thing the documentation leaves out here is that if
> $save_history is 0, there is no limit to the size of the $history_file
> (I think). Probably worth checking by setting save_history to 1, but I
> *think* that's the way it works.
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.
-G