Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* batch email reading?
@ 2006-05-16 12:22 jacques.wainer
  2006-05-16 12:41 ` Katsumi Yamaoka
  2006-05-16 13:43 ` Karl Kleinpaste
  0 siblings, 2 replies; 3+ messages in thread
From: jacques.wainer @ 2006-05-16 12:22 UTC (permalink / raw)


Anyone has a batch email reading function for gnus? (So gnus will read
and classify  the 100+ emails a day I receive before I get to work?)
The gnus-batch-kill function does not read email, and I tried to use it
as a base for a batch mail reader but it seems that I call a function
that generates an error while in batch.

thanks

j.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch email reading?
  2006-05-16 12:22 batch email reading? jacques.wainer
@ 2006-05-16 12:41 ` Katsumi Yamaoka
  2006-05-16 13:43 ` Karl Kleinpaste
  1 sibling, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2006-05-16 12:41 UTC (permalink / raw)


>>>>> In <1147782145.394634.8030@v46g2000cwv.googlegroups.com>
>>>>>	"jacques.wainer@gmail.com" <jacques.wainer@gmail.com> wrote:

> Anyone has a batch email reading function for gnus? (So gnus will read
> and classify  the 100+ emails a day I receive before I get to work?)
> The gnus-batch-kill function does not read email, and I tried to use it
> as a base for a batch mail reader but it seems that I call a function
> that generates an error while in batch.

I use the following crontab entry which runs before I get to work:

15 6 * * * rm -f ~/#.newsrc-dribble# ~/.newsrc-dribble; /usr/local/bin/emacs -batch -u yamaoka --eval '(gnus 1)' -f gnus-group-quit

`-u yamaoka' is necessary to let Emacs load my ~/.emacs file (my
account name is "yamaoka").  `1' means to make Gnus check only
mail groups (I've set the group levels to 1 for all mail groups).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: batch email reading?
  2006-05-16 12:22 batch email reading? jacques.wainer
  2006-05-16 12:41 ` Katsumi Yamaoka
@ 2006-05-16 13:43 ` Karl Kleinpaste
  1 sibling, 0 replies; 3+ messages in thread
From: Karl Kleinpaste @ 2006-05-16 13:43 UTC (permalink / raw)


"jacques.wainer@gmail.com" <jacques.wainer@gmail.com> writes:
> Anyone has a batch email reading function for gnus?

Assuming your Gnus is left running overnight, then the gnus-daemon
functions will do what you want.

;; automatic group re-scan without manual effort.
;; assumes: mail groups, level <= 2; nntp groups, level >= 3.
;; look up arg interpretation for gnus-demon-add-handler.
;; overall meaning: check mail every 5 regardless, and
;; check nntp every 20 iff idle for 20.
;;
;; level-specified group scanner.
(defun gnus-demon-scan-mail-or-news-and-update (level)
"Scan for new mail, updating the *Group* buffer."
  (let ((win (current-window-configuration)))
    (unwind-protect
        (save-window-excursion
          (save-excursion
            (when (gnus-alive-p)
              (save-excursion
                (set-buffer gnus-group-buffer)
                (gnus-group-get-new-news level)))))
      (set-window-configuration win))))
;;
;; level 2: only mail groups are scanned.
(defun gnus-demon-scan-mail-and-update ()
"Scan for new mail, updating the *Group* buffer."
  (gnus-demon-scan-mail-or-news-and-update 2))
(gnus-demon-add-handler 'gnus-demon-scan-mail-and-update 5 nil)
;;
;; level 3: mail and local news groups are scanned.
(defun gnus-demon-scan-news-and-update ()
"Scan for new mail, updating the *Group* buffer."
  (gnus-demon-scan-mail-or-news-and-update 3))
(gnus-demon-add-handler 'gnus-demon-scan-news-and-update 20 20)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-05-16 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-16 12:22 batch email reading? jacques.wainer
2006-05-16 12:41 ` Katsumi Yamaoka
2006-05-16 13:43 ` Karl Kleinpaste

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).