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

Re: canonicalizing and de-canonicalizing



* Thu Oct 30 2008 Kyle Wheeler <kyle-mutt-dev@xxxxxxxxxxxxxx>
> Is there some reason that the mutt buffy list is all in canonicalized  
> full-url form? As a bit of a screen real estate hawk, it seems a bit  
> wasteful that when I press 'y', I get a screen full of  
> "imaps://kyle@xxxxxxxxxxxxxxxxxxx/INBOX/..." - how hard would it be to  
> replace that big long prefix with = ?

I think it takes just a few lines if you set
folder=imaps://kyle@xxxxxxxxxxxxxxxxxxx/INBOX/

diff -r 5ea9f336dd60 browser.c
--- a/browser.c Mon Oct 20 11:50:38 2008 -0700
+++ b/browser.c Fri Oct 31 00:44:58 2008 +0900
@@ -443,14 +443,18 @@
     if (mx_is_imap (tmp->path))
     {
       imap_mailbox_state (tmp->path, &mbox);
-      add_folder (menu, state, tmp->path, NULL, mbox.new);
+      strfcpy (buffer, NONULL(tmp->path), sizeof (buffer));
+      mutt_pretty_mailbox (buffer, sizeof (buffer));
+      add_folder (menu, state, buffer, NULL, mbox.new);
       continue;
     }
 #endif
 #ifdef USE_POP
     if (mx_is_pop (tmp->path))
     {
-      add_folder (menu, state, tmp->path, NULL, tmp->new);
+      strfcpy (buffer, NONULL(tmp->path), sizeof (buffer));
+      mutt_pretty_mailbox (buffer, sizeof (buffer));
+      add_folder (menu, state, buffer, NULL, tmp->new);
       continue;
     }
 #endif

-- 
tamo