OK thanks Dirk, 

For future readers, in the end I just counted the lines in the queue 
"index" file.

This is my setup I use to display mail counts on my stumpwm mode-line

;; mu4e
(defun mail-new-status ()
  "Print number of new mails."
    (string-trim '(#\Newline)
                 (run-shell-command "mu find flag:new 
--muhome='~/shoebox/system/mu' | wc -l" t)))

(defun mail-queue-status ()
  "Print number of queued mails."
    (string-trim '(#\Newline)
                 (run-shell-command "wc -l < 
~/shoebox/system/mail/queue/index" t)))

And then... 

(setq *screen-mode-line-format* (list "[%n] %W ^> %N | %B | "
                                '(:eval (git-status))" | "
                                '(:eval (dropbox-status))" | "
                                '(:eval (mail-new-status))" : "
'(:eval (mail-queue-status))" | "
                                '(:eval (run-shell-command "date '+%R %F 
%a'|tr -d [:cntrl:]" t))" "))


On Tuesday, 13 May 2014 20:49:15 UTC+1, djcb wrote:
>
> Hi, 
>
> On Tuesday May 13 2014, Thomas 'Mash Herbert 
> <[email protected]<javascript:>> 
> wrote: 
>
> > I have the typical setup for queuing mail per the documentation, but 
> > wondered if it is possible to list/find/count the queued mail? 
> > 
> > The mail is queued correctly and listed in my set queue directory... 
> > 
> > mash@tzara:~/shoebox/system/mail/queue$ ls 
> > 2014-05-13_16:08:29_1  2014-05-13_16:08:29_1.el  cur  index  new  tmp 
> > 
> > And it is correctly flushed and sent via mu4e when I action, but I 
> wanted 
> > to be able to see what mail is queued. 
> > 
> > If I set a "mu4e-maildir-shortcut", "("/queue" . ?q)", I assumed I would 
> > see the mails queued but this is not the case. 
> > 
> > Anyone actually doing this already somehow? 
>
> The thing is that the queue is not a norma maildir with messages, but 
> something specific to the part of gnus take we're reusing for this; so 
> you might want to look there. 
>
> Cheers, 
> Dirk. 
>
>
>
>
>
>
>
> -- 
> Dirk-Jan C. Binnema                  Helsinki, Finland 
> e:[email protected] <javascript:>           w:www.djcbsoftware.nl 
> pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C 
>

-- 
You received this message because you are subscribed to the Google Groups 
"mu-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to