Build mutt-sidebar by default

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Build mutt-sidebar by default

Andreas Bihlmaier-2
Hello ports@,

since I personally enjoy mutt's sidebar FLAVOR and it might be used by
(many) others would it be possible to always build a mutt-sidebar
package? There is already a -compressed and -hcache pkg.

Regards,
ahb

Reply | Threaded
Open this post in threaded view
|

Re: Build mutt-sidebar by default

Marco Peereboom
If anything the sidebar needs to be fixed with IMAP...

Andreas Bihlmaier wrote:
> Hello ports@,
>
> since I personally enjoy mutt's sidebar FLAVOR and it might be used by
> (many) others would it be possible to always build a mutt-sidebar
> package? There is already a -compressed and -hcache pkg.
>
> Regards,
> ahb
>

Reply | Threaded
Open this post in threaded view
|

Re: Build mutt-sidebar by default

Andreas Bihlmaier-2
On Sun, Nov 05, 2006 at 07:00:31PM -0600, Marco Peereboom wrote:
> If anything the sidebar needs to be fixed with IMAP...

I'm using it with IMAP right now. What needs to be fixed? I did notice
that it doesn't show new mails until you open the box, but it is still
faster to hit <some-mapping-to-move-down-in-sidebar> +
<some-mapping-to-open>, than 'c' + '?' + <up> + ...

> Andreas Bihlmaier wrote:
> >Hello ports@,
> >
> >since I personally enjoy mutt's sidebar FLAVOR and it might be used by
> >(many) others would it be possible to always build a mutt-sidebar
> >package? There is already a -compressed and -hcache pkg.

Regards,
ahb

Reply | Threaded
Open this post in threaded view
|

Re: Build mutt-sidebar by default

Marco Peereboom
Andreas Bihlmaier wrote:
> On Sun, Nov 05, 2006 at 07:00:31PM -0600, Marco Peereboom wrote:
>> If anything the sidebar needs to be fixed with IMAP...
>
> I'm using it with IMAP right now. What needs to be fixed? I did notice
> that it doesn't show new mails until you open the box, but it is still

Isn't this the whole point of the sidebar?  So that one could use it
with lets say procmail or something.

> faster to hit <some-mapping-to-move-down-in-sidebar> +
> <some-mapping-to-open>, than 'c' + '?' + <up> + ...

Reply | Threaded
Open this post in threaded view
|

Patch to make mutt-sidebar work with IMAP [WAS: Re: Build mutt-sidebar by default]

Andreas Bihlmaier-2
On Mon, Nov 06, 2006 at 06:17:21AM -0600, Marco Peereboom wrote:
> Andreas Bihlmaier wrote:
> >On Sun, Nov 05, 2006 at 07:00:31PM -0600, Marco Peereboom wrote:
> >>If anything the sidebar needs to be fixed with IMAP...
> >
> >I'm using it with IMAP right now. What needs to be fixed? I did notice
> >that it doesn't show new mails until you open the box, but it is still
>
> Isn't this the whole point of the sidebar?  So that one could use it
> with lets say procmail or something.

I pretty much use it for faster navigation only, _but_ you do have a
valid point there.

> >faster to hit <some-mapping-to-move-down-in-sidebar> +
> ><some-mapping-to-open>, than 'c' + '?' + <up> + ...

After using google, I found:
http://lunar-linux.org/index.php?page=mutt-sidebar

Especially:
<quote>
Updated patch for pristine mutt-1.5.12 source package. Incorporated a
patch from Charles Killian for better refresh of IMAP folder message
counts.
<\quote>

This led to:
http://lunar-linux.org/~tchan/mutt/patch-1.5.13.sidebar.20061023.txt

After ripping out some stuff and adjusting lines:

#--------------- patch-mutt-snapshot-sidebar ----------------------------------#
diff -N -c -r imap/imap.c imap/imap.c
*** imap/imap.c 2006-07-11 10:01:04.000000000 -0500
--- imap/imap.c 2006-08-04 23:18:48.000000000 -0500
***************
*** 1466,1472 ****
      }
     
      imap_munge_mbox_name (munged, sizeof (munged), name);
!     snprintf (command, sizeof (command), "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN)", munged);
 
      if (imap_cmd_queue (idata, command) < 0)
      {
--- 1466,1472 ----
      }
     
      imap_munge_mbox_name (munged, sizeof (munged), name);
!     snprintf (command, sizeof (command), "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN MESSAGES)", munged);
 
      if (imap_cmd_queue (idata, command) < 0)
      {
diff -N -c -r imap/command.c imap/command.c
*** imap/command.c 2006-08-11 04:04:36.000000000 -0500
--- imap/command.c 2006-08-28 11:42:36.000000000 -0500
***************
*** 861,866 ****
--- 861,873 ----
          /* forced back to keep detecting new mail until the mailbox is opened */
          status->uidnext = oldun;
 
+         /* Added to make the sidebar show the correct numbers */
+         if (status->messages)
+         {
+           inc->msgcount = status->messages;
+           inc->msg_unread = status->unseen;
+         }
+
          FREE (&value);
          return;
        }
#------------------------------------------------------------------------------#

DISCLAIMER:
IMHO that is the only relevant part of the original patch (see link
above), but I'm not 100% *sure*.

Apply by:
# cd /usr/ports/mail/mutt/snapshot
# env FLAVOR=sidebar make patch
# cd w-mutt-1.5.12-sidebar/mutt-1.5.12/
# patch < patch-mutt-snapshot-sidebar
# cd -
# env FLAVOR=sidebar make install

Could somebody please test it, because if it works, well it works :)

Regards,
ahb

Reply | Threaded
Open this post in threaded view
|

Re: Patch to make mutt-sidebar work with IMAP [WAS: Re: Build mutt-sidebar by default]

Marco Peereboom
Now that I'd like to see incorporated.  Jolan?

On Mon, Nov 06, 2006 at 04:06:38PM +0100, Andreas Bihlmaier wrote:

> On Mon, Nov 06, 2006 at 06:17:21AM -0600, Marco Peereboom wrote:
> > Andreas Bihlmaier wrote:
> > >On Sun, Nov 05, 2006 at 07:00:31PM -0600, Marco Peereboom wrote:
> > >>If anything the sidebar needs to be fixed with IMAP...
> > >
> > >I'm using it with IMAP right now. What needs to be fixed? I did notice
> > >that it doesn't show new mails until you open the box, but it is still
> >
> > Isn't this the whole point of the sidebar?  So that one could use it
> > with lets say procmail or something.
>
> I pretty much use it for faster navigation only, _but_ you do have a
> valid point there.
>
> > >faster to hit <some-mapping-to-move-down-in-sidebar> +
> > ><some-mapping-to-open>, than 'c' + '?' + <up> + ...
>
> After using google, I found:
> http://lunar-linux.org/index.php?page=mutt-sidebar
>
> Especially:
> <quote>
> Updated patch for pristine mutt-1.5.12 source package. Incorporated a
> patch from Charles Killian for better refresh of IMAP folder message
> counts.
> <\quote>
>
> This led to:
> http://lunar-linux.org/~tchan/mutt/patch-1.5.13.sidebar.20061023.txt
>
> After ripping out some stuff and adjusting lines:
>
> #--------------- patch-mutt-snapshot-sidebar ----------------------------------#
> diff -N -c -r imap/imap.c imap/imap.c
> *** imap/imap.c 2006-07-11 10:01:04.000000000 -0500
> --- imap/imap.c 2006-08-04 23:18:48.000000000 -0500
> ***************
> *** 1466,1472 ****
>       }
>      
>       imap_munge_mbox_name (munged, sizeof (munged), name);
> !     snprintf (command, sizeof (command), "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN)", munged);
>  
>       if (imap_cmd_queue (idata, command) < 0)
>       {
> --- 1466,1472 ----
>       }
>      
>       imap_munge_mbox_name (munged, sizeof (munged), name);
> !     snprintf (command, sizeof (command), "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN MESSAGES)", munged);
>  
>       if (imap_cmd_queue (idata, command) < 0)
>       {
> diff -N -c -r imap/command.c imap/command.c
> *** imap/command.c 2006-08-11 04:04:36.000000000 -0500
> --- imap/command.c 2006-08-28 11:42:36.000000000 -0500
> ***************
> *** 861,866 ****
> --- 861,873 ----
>           /* forced back to keep detecting new mail until the mailbox is opened */
>           status->uidnext = oldun;
>  
> +         /* Added to make the sidebar show the correct numbers */
> +         if (status->messages)
> +         {
> +           inc->msgcount = status->messages;
> +           inc->msg_unread = status->unseen;
> +         }
> +
>           FREE (&value);
>           return;
>         }
> #------------------------------------------------------------------------------#
>
> DISCLAIMER:
> IMHO that is the only relevant part of the original patch (see link
> above), but I'm not 100% *sure*.
>
> Apply by:
> # cd /usr/ports/mail/mutt/snapshot
> # env FLAVOR=sidebar make patch
> # cd w-mutt-1.5.12-sidebar/mutt-1.5.12/
> # patch < patch-mutt-snapshot-sidebar
> # cd -
> # env FLAVOR=sidebar make install
>
> Could somebody please test it, because if it works, well it works :)
>
> Regards,
> ahb
>