On Thursday, November 12 at 11:40 PM, quoth Robert Holtzman:
The only reason I'm running the sidebar is that I'm used to pine/alpine where the mailbox list is a click away.
Understood. Personally, I find the mailbox list rather annoying. I have lots of rarely-used mailboxes (for grouping messages about subjects that I rarely talk about, or mailing lists that I monitor and only check up on once or twice a week) that usually end up cluttering up such interfaces. I like that in mutt I can simply use tab-completion to navigate to my folders. (You *can* get a list of folders... but you aren't forced to use it if you don't want to.)
Educate me (as if you haven't been doing that so far). Why "ick"?
Well, this comes up every so often, so I'll copy what I've said before about it. Mainly, I quoted one of the guiding lights of mutt development (and the man to whom mutt 1.6 will probably be dedicated), Rocco Rutte, who wrote (http://marc.info/?l=mutt-dev&m=112133798519807&w=2):
For example, the sidebar patch available for mutt looks to work at first sight but there're many things just heavily broken or things you really don't want to stay in the code (like using snprintf() and strlen() to "calculate" the amount of digits of a number.)The sidebar patch is much larger than it needs to be, and affects large portions of the mutt codebase that have nothing to do with showing a sidebar (for example, if memory serves, the sidebar patch changes mbox handling in some weird way). Generally speaking, despite its popularity and its apparent continued development, the developers of the sidebar patch do not maintain a presence on this mailing list, do not have their own mailing list, and (to my knowledge) do not provide any kind of support for either users of their patch or for people interested in cleaning it up such that it might become palatable to the mainline mutt developers.
And just so you know, Rocco's complaints are still valid. Check out this example function from the current sidebar patch (published July 19th, 2009):
static int quick_log10(int n) { char string[32]; sprintf(string, "%d", n); return strlen(string); }Just because I was curious, I actually compared this "quick" version of log10 to the real log10 (with the attached small program). Turns out calculating log10 the "quick" way is an order of magnitude slower than doing it the usual way. Doesn't that just scream "this programmer knows what they're doing"?
So... now you know why I say "ick". ~Kyle -- Computers are useless. They can only give you answers. -- Pablo Picasso
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <sys/time.h> #include <math.h> int quick_log10(int n) { char string[32]; sprintf(string, "%d", n); return strlen(string); } int main() { int count, i; const int max = 100000; struct timeval start, stop; int logsum = 0; int *numbers; numbers = malloc(max * sizeof(int)); for (count=0; count<max; count++) { numbers[count] = random(); } gettimeofday(&start,NULL); for (i=0; i<10; i++) { for (count=0; count<max; count++) { logsum += log10(numbers[count]); } } gettimeofday(&stop, NULL); printf("math.h(%i): %f seconds\n", logsum, (stop.tv_sec + stop.tv_usec*1e-6) - (start.tv_sec + start.tv_usec*1e-6)); logsum = 0; gettimeofday(&start,NULL); for (i=0; i<10; i++) { for (count=0; count<max; count++) { logsum += quick_log10(numbers[count]); } } gettimeofday(&stop, NULL); printf("sidebar(%i): %f seconds\n", logsum, (stop.tv_sec + stop.tv_usec*1e-6) - (start.tv_sec + start.tv_usec*1e-6)); return 0; }
pgpbAw6xhSUv3.pgp
Description: PGP signature