From: Darlan Cavalcante Moreira <darcamo@gmail.com>
To: Matt Price <matt.price@utoronto.ca>
Cc: emacs-orgmode@gnu.org
Subject: Re: [OT] Emacs for email?
Date: Thu, 03 Dec 2009 18:55:54 -0300 [thread overview]
Message-ID: <4b1834be.0407c00a.11d4.7158@mx.google.com> (raw)
In-Reply-To: <1259859194.3851.2175.camel@gont>
[-- Attachment #1: Type: text/plain, Size: 162 bytes --]
Sorry for the delay, but It took some time to organize the wanderlust
configuration. I'm sending an org file with it as an attachment.
- Darlan Cavalcante
[-- Attachment #2: wlconfiguration.org --]
[-- Type: application/octet-stream, Size: 11536 bytes --]
Configuration for wanderlus
The configuration is spread into three files:
- One part in the .emacs file (or a file loaded in the .emacs file)
- Most of the configuration is in the .wl file -> Emacs only read this file
when wanderlust is loaded
- The folders definitions is in the .folders file
* Configuration in my .emacs file
#+begin_src lisp
;; Tell Emacs my E-Mail address
;; Without this Emacs thinks my E-Mail is something like <myname>@ubuntu-asus
(setq user-mail-address "<user>@gmail.com")
;; Uncomment the line below if you have problems with accented letters
;; (setq-default mime-transfer-level 8) ;; default value is 7
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-other-frame "wl" "Wanderlust on new frame." t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
;; Most of the configuration for wanderlust is in the .wl file. The line below
;; makes sure it will be opened with emacs-lisp-mode
(add-to-list 'auto-mode-alist '("\.wl$" . emacs-lisp-mode))
#+end_src
* Configuration in the .wl file
#+begin_src lisp
(setq wl-insert-message-id nil) ; let the SMTP servers handle the message-id and stop warning from wanderlust
;; I don't know why I need this
(setq elmo-imap4-use-modified-utf7 t)
;; xxxxxxxxxxxxxxx Set the templates xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(setq wl-template-alist
'(
("gmail" ; Gmail
(wl-from . "MY FULL NAME <USERNAME@gmail.com>")
("From" . wl-from)
(wl-smtp-connection-type . 'starttls)
(wl-smtp-posting-port . 587)
(wl-smtp-authenticate-type . "plain")
(wl-smtp-posting-user . "USERNAME")
(wl-smtp-posting-server . "smtp.gmail.com")
(wl-local-domain . "gmail.com")
(signature-file-name . "~/.signature")
)
("Work"
(wl-from . "MY FULL NAME <USERNAME@work.something>")
("From" . wl-from)
(wl-smtp-connection-type . nil)
(wl-smtp-posting-port . nil)
(wl-smtp-authenticate-type . "login") ; change if necessary
(wl-smtp-posting-user . "USERNAME")
(wl-smtp-posting-server . "smtp.work.something")
(wl-local-domain . "work.something")
("Organization" . "COMPANY NAME")
(signature-file-name . "~/.signature_work")
)
("Work-From-Home"
(wl-from . "MY FULL NAME <USERNAME@work.something>")
("From" . wl-from)
(wl-smtp-connection-type . nil)
(wl-smtp-posting-port . 9025) ; I need to open an ssh tunnel to redirect this port in my local computer to port 25 in my work
(wl-smtp-authenticate-type . "login")
(wl-smtp-posting-user . "USERNAME")
(wl-smtp-posting-server . "localhost")
(wl-local-domain . "work.something")
("Organization" . "COMPANY NAME")
(signature-file-name . "~/.signature_work")
)
))
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
;; Automatically select the correct template based on which folder I'm visiting
(setq wl-draft-config-matchone t) ;; If non-nil, applied only one element of `wl-draft-config-alist'.
(setq wl-draft-config-alist
'(
( ; If I start a draft from my work e-mail folder and I'm using my
; personal computer (from home) use the template "Work-From-Home". I
; use a two different templates for my work E-Mail because I don't
; have access to the smtp server of my work when I'm at home. But
; since I can ssh to it i redirect a port to be able to sent e-mail
; from home though the smtp server of my work
(and (string-match ".*work" wl-draft-parent-folder) (string-match "laptop" system-name))
(template . "Work-From-Home")
)
( ; If I start a draft from my work e-mail folder and I'm using my
; work computer, use the "Work" template
(and (string-match ".*work" wl-draft-parent-folder) (string-match "work-computer" system-name))
(template . "Work")
)
( ;; If I start a draft from any other folder, use the "gmail" template.
(not (string-match ".*work" wl-draft-parent-folder))
(template . "gmail")
)
))
;; Apply wl-draft-config-alist as soon as you enter in a draft buffer. Without
;; this wanderlust would apply it only when actually sending the e-mail.
(add-hook 'wl-mail-setup-hook 'wl-draft-config-exec)
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
;; If you want to manually change the template use C-c C-j in a draft buffer
;; (wl-template-select). The four lines below allow changint the template with
;; the arrow keys
(define-key wl-template-mode-map (kbd "<right>") 'wl-template-next)
(define-key wl-template-mode-map (kbd "<left>") 'wl-template-prev)
(define-key wl-template-mode-map (kbd "<up>") 'wl-template-next)
(define-key wl-template-mode-map (kbd "<down>") 'wl-template-prev)
(autoload 'wl-user-agent-compose "wl-draft" nil 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))
;; xxxxxxxxxxxxxxx General configurations xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(setq
wl-forward-subject-prefix "Fwd: " ) ;; use "Fwd: " not "Forward: "
;; You should set this variable if you use multiple e-mail addresses.
(setq wl-user-mail-address-list (quote ("USERNAME@work.something" "USERNAME@gmail.com")))
;; Setting as "t" means that wanderlust should use a new frame for the draft
(setq wl-draft-use-frame t)
;; Proportion of the summary and message windows
(setq wl-message-window-size '(3 . 7))
;; Fields in the e-mail header that I do not want to see (regexps)
(setq wl-message-ignored-field-list (quote (".*Received:" ".*Path:" ".*Id:" "^References:" "^Replied:" "^Errors-To:" "^Lines:" "^Sender:" ".*Host:" "^Xref:" "^Content-Type:" "^Precedence:" "^Status:" "^X-VM-.*:" "^List-*" "^Authentication-Results*" "^X-*" "^Received-SPF*" "^DKIM-Signature:" "^DomainKey-Signature:" "^X-Mailman-Version:")))
;; Fields in the e-mail header that I want to see even if they match the regex in wl-message-ignored-field-list
(setq wl-message-visible-field-list (quote ("^Dnas.*:" "^Message-Id:" "^X-Mailer:" "^X-Mailman-Version:")))
;; Enables auto-fill-mode in the draft buffer
(add-hook 'wl-mail-setup-hook 'auto-fill-mode)
;; Use orgstruct++-mode in the draft buffer
;; (add-hook 'mail-mode-hook 'turn-on-orgstruct)
(add-hook 'mail-mode-hook 'turn-on-orgstruct++)
;; Set the key "f" to browse-url when I'm reading an E-mail. If instead of an url I have an HTML code I can simple select the code and hit "F"
(add-hook 'mime-view-mode-hook
(lambda ()
(local-set-key "f" 'browse-url)
(local-set-key "F" 'browse-url-of-region)))
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
;; Auto-refile With this wanderlust suggests folders to refile a message when I
;; press the "o" in the summary. Then I can simple press ENTER to accept or
;; write (with TAB completion) the folder I want to refile the message For
;; instance, if I want wanderlus to suggest the gmail trash folder when I refile
;; an E-mail from launchpad about a bug or an E-mail from the org-mode list I
;; may use
(setq wl-refile-rule-alist '(
("To" ("emacs-orgmode@gnu.org" . "%[Gmail]/Lixeira:\"USERNAME@gmail.com\"/clear@imap.gmail.com:993!"))
("Subject" ("\\[Bug [0-9]*\\]" . "%[Gmail]/Lixeira:\"USERNAME@gmail.com\"/clear@imap.gmail.com:993!")) ; E-Mails do Launchpad
)) ; Notice that the folders must match what I have used in the .folders file
;; xxxxxxxxxxxxxxx Integration with bbdb xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(require 'bbdb-wl)
(bbdb-wl-setup)
(setq bbdb-use-pop-up nil ;; disable pop-ups
;; bbdb-pop-up-target-lines 5 ; only useful if pop-ups are enabled
)
;; Set bbdb-user-mail-names with a regex that matches both of my e-mail accounts
;; Pra que serve bbdb-user-mail-names?
(setq bbdb-user-mail-names (regexp-opt '("USERNAME@gmail.com" "USERNAME@work.something")))
;; auto collection
(setq bbdb/mail-auto-create-p 'prompt) ;; bbdb asks me if I want to save an E-mail
;; exceptional folders against auto collection. The regex must match all folders that we do not want auto-colection. This is what I use
(setq bbdb-wl-ignore-folder-regexp "^@\\|Org-Mode\\|Muse\\|Doxygen\\|Launchpad")
(setq bbdb-north-american-phone-numbers-p nil)
;; shows the name of bbdb in the summary. Default value of this variable is
;; wl-summary-default-from which does not use bbdb, but the wanderlust address
;; book instead
(setq wl-summary-from-function 'bbdb-wl-from-func)
;; Using BBDB for pet names in wanderlust
(setq wl-summary-get-petname-function 'bbdb-wl-get-petname)
;; You can complete address with BBDB by `M-TAB' in draft buffer.
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
;; xxxxxxxxxxxxxxx Spam check xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
(setq elmo-spam-scheme 'bogofilter) ;; sa for spamassassin, see the elmo-spam-scheme
;; docs for alternatives
(require 'wl-spam)
(setq wl-spam-folder "spam folder as defined in the .folders file")
;; Automatically check for spam in the folders that match the regex
(setq wl-spam-auto-check-folder-regexp-list '("regex here"))
;; Folders that should not be checked for spam. Since gmail already has spam checking I make the regex match it
(setq wl-spam-ignored-folder-regexp-list
(list (regexp-opt (list wl-draft-folder
wl-trash-folder
wl-queue-folder
"my_gmail_username"
"Gmail"
"gmail"))))
;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#+end_src
* Configuration of the .folders file
#+begin_example
+trash "Trash"
+draft "Drafts"
WORK{
%inbox:USERNAME/clear@imap.work.something:143 "Caixa de Entrada"
%inbox.Archived:USERNAME/clear@imap.work.something:143 "Archived"
%inbox.Junk:USERNAME/clear@imap.work.something:143 "Spam"
%inbox.Sent:USERNAME/clear@imap.work.something:143 "Sent"
%inbox.Trash:USERNAME/clear@imap.work.something:143 "Trash"
}
Gmail{
%inbox:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "Inbox"
Labels{
%[Gmail]/Trash:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "Trash"
%[Gmail]/Star:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "With a Star"
%[Gmail]/Sent:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "Sent"
%[Gmail]/Draft:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "Draft"
%[Gmail]/All E-Mails:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "All E-Mails"
}
%Org-Mode:"USERNAME@gmail.com"/clear@imap.gmail.com:993! "Org-Mode"
}
#+end_example
[-- Attachment #3: Type: text/plain, Size: 2006 bytes --]
At Thu, 03 Dec 2009 11:53:14 -0500,
Matt Price <matt.price@utoronto.ca> wrote:
>
> On Wed, 2009-12-02 at 22:04 +0100, David Maus wrote:
> > At Wed, 02 Dec 2009 08:43:51 -0500,
> > Matt Price wrote:
> > >
> > > [1 <multipart/signed (7bit)>]
> > > [1.1 <text/plain; UTF-8 (quoted-printable)>]
> > > On Tue, 2009-12-01 at 20:57 -0300, Darlan Cavalcante Moreira wrote:
> > > > I use wanderlust for email (including this list) and it works really well with
> > > > imap. I was somewhat hard to configure, but now that everything is working I
> > > > don't feel like going back to my previous e-mail client (evolution).
> > > >
> > >
> > > darlan, would you be willing to share your config for wl? i can't seem
> > > to make any headway with it at all. i'm just looking for a light
> > > emacs-based mail reader/imap client on my aging laptop, which is mostly
> > > an emacs machine now. GNUS can see my mail, but it's just so heavy for
> > > what i'm looking for, and also doesn't seem to want to honor the imap
> > > conventions in terms of hiding deleted messages, which is sort of
> > > essential for me as things stand.
> >
> > Just pushed my Wanderlust configuration to github:
> >
> > http://github.com/dmj/dotfiles/blob/master/.wl
> >
> > A simple configuration: I use a local imap server to access my mails
> > and gmail to send. What helped me to get in touch with Wanderlust
> > after an unsuccessful attempt was this blog posting:
> >
> > http://emacs-fu.blogspot.com/2009/06/e-mail-with-wanderlust.html
> >
> > - describing a setup with a local maildir storage.
> >
>
> thanks david, and also to eric, who sent me his. With both your help I
> have wanderlust up and running, though still with some confusions (how
> do I hide read or deleted messages? why won't wl actually send any
> mail? etc.). I'm sure i'll be able to clear those up soon, though.
>
> Anyway, thanks.
>
> matt
>
> > Regards,
> >
> > -- David
> >
>
>
> --
> Matt Price
> matt.price@utoronto.ca
[-- Attachment #4: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next prev parent reply other threads:[~2009-12-03 21:59 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 21:34 [OT] Emacs for email? Keith Lancaster
2009-12-01 22:59 ` Ben Finney
2009-12-02 7:59 ` Tassilo Horn
2009-12-02 8:31 ` Ben Finney
2009-12-02 9:23 ` bluedian
2009-12-01 23:28 ` David Bremner
2009-12-01 23:36 ` Nick Dokos
2009-12-01 23:57 ` Darlan Cavalcante Moreira
2009-12-02 0:39 ` Keith Lancaster
2009-12-02 14:22 ` Leo
2009-12-02 18:38 ` David Neu
2009-12-02 22:48 ` Eric Schulte
2009-12-02 23:08 ` Keith Lancaster
2009-12-03 5:21 ` Rémi Vanicat
2009-12-02 13:43 ` Matt Price
2009-12-02 21:04 ` David Maus
2009-12-03 16:53 ` Matt Price
2009-12-03 21:55 ` Darlan Cavalcante Moreira [this message]
2009-12-02 0:40 ` Matt Lundin
2009-12-02 1:02 ` Henri-Paul Indiogine
2009-12-02 8:03 ` Tassilo Horn
2009-12-02 2:15 ` Dan Davison
2009-12-02 2:56 ` Russell Adams
2009-12-02 6:36 ` Manuel Hermenegildo
2009-12-02 6:39 ` Gour
2009-12-03 7:05 ` Russell Adams
2009-12-03 6:38 ` Rémi Vanicat
2009-12-03 8:22 ` Ulf Stegemann
2009-12-03 11:25 ` Matt Lundin
2009-12-03 10:53 ` Bernt Hansen
2009-12-02 6:30 ` Xavier Maillard
2009-12-02 9:37 ` Eric S Fraga
2009-12-02 11:01 ` jemarch
2009-12-02 14:24 ` Eric S Fraga
2009-12-02 16:31 ` jemarch
2009-12-02 20:30 ` David Maus
2009-12-02 17:31 ` Rémi Vanicat
2009-12-02 18:33 ` Eric Schulte
2009-12-02 19:03 ` Matt Lundin
2009-12-02 17:00 ` Russell Adams
2009-12-02 12:58 ` Otto Diesenbacher
2009-12-03 17:10 ` Henri-Paul Indiogine
2009-12-03 17:51 ` Matt Lundin
2009-12-03 19:53 ` Enrico Indiogine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b1834be.0407c00a.11d4.7158@mx.google.com \
--to=darcamo@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=matt.price@utoronto.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).