Tag Archives: emacs

reading and writing mails from rmail in Emacs

Its been a long search for me to get this thing working. Not because of dearth of sample settings around, but because it took me a while to get my search terms right.

;; settings for reading mails
(setq rmail-pop-password-required t)
(setq rmail-primary-inbox-list (quote ("pop://user@domain.com")))
(setq user-mail-address "your email address")
;; (setq rmail-preserve-inbox t)
;; (setq rmail-movemail-flags nil)
;; (setq rmail-movemail-program "/usr/lib/emacs/22.1/i486-linux-gnu/movemail")
;; (setq rmail-pop-password "guess my password")

;; settings to handle attachments in rmail
(defun metamail-message ()
(metamail-buffer (get-buffer-create "*Metamail output*")))

;; settings for sending mails
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
smptmail-starttls-credentials '(("smtp.server" 25 nil nil))
'(("smtp.server" 25 "email address" nil))
;; (expand-file-name "~/.authinfo")
;; must learn to properly setup ~/.authinfo soon
smtpmail-default-smtp-server "smtp.vsnl.net"
smtpmail-smtp-server "smtp.vsnl.net"
;; smtpmail-smtp-service 25 ;; defaults to 25
smtpmail-debug-info t)
(require 'smtpmail)

hm, still, I seem to be missing something or the other in the ~/.authinfo entries. Every entry that I saw on the Internet, I tried that out. I should be missing on some format of the entry to be made, I suppose.

Next, gotta see how to setup IMAP with RMAIL.

Then there is gnus to be conquered. But that will wait for a while. Gotta get other things straight here.

Since a few seniors such as RMS intend to use RMAIL and don’t intend to change to any other mail reader, gotta see what is in RMAIL. But a very simple mail reader, RMAIL is.


Gotta be careful what to put in load-path

Rmail was giving out a backtrace. I had nothing relevant to rmail in my .emacs file. So I was inclined to think that rmail was at fault. I pasted the backtrace on #emacs@freenode.net’s paste. Only to discover that rmail was added with a hook that none of the regulars had ever come across.

Looking at its definition, I soon discovered that shebang.el was the file that containing the hook that was creating the problem. Upon removing the hook and disabling the file from being loaded automatically, I got rmail working properly.

So, who had added thee offending file? I was suspecting my sister would have added since she had used Emacs a few times. But turns out that she knows nothing about adding things to load-path. So, I must have put that file in the load-path for whatever reason. heh, gotta watchout for what I put into the load-path from next time on.

Emacs (and Vi) automatically make scripts executable

http://www.debian-administration.org/articles/571 shows the how to. I have installed shebang.el. This entry here is to help me find it easier when I’m actually looking for it.

Interestingly, the same post explains how to achieve this with Vi as well. So, I’d better keep a reference to that post here.

An Emacs vulnerabitily..


Only a few days now I was discussing about enable-local-variables with one of the regulars at #emacs on freenode. He advised me not to enable local variables all the time, warning it might lead to vulnerabilities. Now someone has discovered such a vulnerability. Looks like this vulnerability is only Ubuntu specific.

Learning curves

http://bc.tech.coop/blog/060302.html shows the learning curves of a few common editors. I love this! Learning never ends with Emacs. An amusing post as well.

Emacs as a regex IDE

This blog shows a regex tool to make Emacs an IDE of sorts for regular expressions.


An Emacs dot-file

I think I’m getting obssessed with this Emacs. But it is not a harmful one. At least it hasn’t harmed me so far. So, here’s a .emacs file. I will pick bits from this file that I like.