1

I want to use Wanderlust IMAP client to read my email in Emacs.

However, when configured to use with Gmail account it doesn't update number of new messages correctly. Wanderlust's notification (ws-biff-*) system depends on this - I will get notified only if there're new messages.

For example, in the Folder view:

...
    %INBOX:0/217/49684
...

When I get a new message I should get the following:

...
    %INBOX:1/218/49684
...

However, what I see is the following:

...
    %INBOX:0/218/49684
...

All other functionality of Wanderlust works perfectly and I'd really love to make it handle notifications correctly.

I've installed it using el-get. Emacs version is 24.2.1. Wanderlust version is 2.15.9 (Almost Unreal).

Relevant part of ~/.emacs.d/init.el:

;; wanderlust
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
(autoload 'wl-user-agent-compose "wl-draft" nil t)

~/.wl:

;; IMAP
(setq elmo-imap4-default-server "imap.gmail.com")
(setq elmo-imap4-default-user "my_email_address@gmail.com") 
(setq elmo-imap4-default-authenticate-type 'clear) 
(setq elmo-imap4-default-port '993)
(setq elmo-imap4-default-stream-type 'ssl)

(setq elmo-imap4-set-seen-flag-explicitly t)

;; SMTP
(setq wl-smtp-connection-type 'starttls)
(setq wl-smtp-posting-port 587)
(setq wl-smtp-authenticate-type "plain")
(setq wl-smtp-posting-user "my_email_address@gmail.com")
(setq wl-smtp-posting-server "smtp.gmail.com")
(setq wl-local-domain "gmail.com")
(setq wl-icon-directory "~/.emacs.d/el-get/wanderlust/etc/icons")
(setq wl-default-folder "%inbox")
(setq wl-default-spec "%")
(setq wl-draft-folder "%[Gmail]/Drafts") ; Gmail IMAP
(setq wl-trash-folder "%[Gmail]/Trash")

(setq wl-folder-check-async t) 

(setq elmo-imap4-use-modified-utf7 t)

(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'wl-user-agent))
(if (fboundp 'define-mail-user-agent)
    (define-mail-user-agent
      'wl-user-agent
      'wl-user-agent-compose
      'wl-draft-send
      'wl-draft-kill
      'mail-send-hook))
(require 'tls)
(setq elmo-network-stream-type-alist '(("!" . (ssl ssl open-tls-stream))))

;; ignore  all fields
(setq wl-message-ignored-field-list '("^.*:"))
;; ..but these five
(setq wl-message-visible-field-list
      '("^To:"
        "^Cc:"
        "^From:"
        "^Subject:"
        "^Date:"))

(setq wl-message-sort-field-list
      '("^From:"
        "^Subject:"
        "^Date:"
        "^To:"
        "^Cc:"))
(setq wl-biff-check-folder-list '("%[Gmail]/Important" "%Workrelatedstuff"))
(setq wl-show-plug-status-on-modeline t)

(add-hook 'wl-biff-notify-hook
          (lambda (message &optional header)
            (message
             (format "New mail: %s. %s"
                     header
                     (substring message 0 (min 30 (length message)))))))

~/.folders is just :

%/

How should I configure it to work properly with Gmail? Thanks in advance for any help!

| improve this question | | | | |
0

As Google Mail does not support the \Recent-Flag, Wanderlust is not able to tell apart, if the mail is new. Other mail-clients propably track the new-state for themselve and dont rely on the \Recent-flag (which is not so cool, because the state is not safed server-side).

| improve this answer | | | | |
1

This issue can be solved via wl-strict-diff-folders. This specifies a list of folders for which Wanderlust will use a slower, but more accurate, method of counting messages. For example:

;; Check these folders for new mail
(setq wl-biff-check-folder-list 
  '("%INBOX:\"user@gmail.com\"/clear@imap.gmail.com:993"
    "%INBOX:\"user@other.domain\"/clear@imapserver.other.domain:993"))

;; Use strict diff so wl-biff works with Gmail and others
(setq wl-strict-diff-folders wl-biff-check-folder-list)

Note that the folder names must match the folder names in ~/.wl-folders exactly or updating the counts in the Folder view will not work.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.