[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Updating movemail in Emacs
From: |
Kevin Rodgers |
Subject: |
Re: Updating movemail in Emacs |
Date: |
Thu, 18 Nov 2004 12:49:03 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
Sergey Poznyakoff wrote:
> The attached patch automatically detects which flavor of movemail
> is in use: native Emacs or GNU mailutils. Unless the variable
> rmail-movemail-program is set, it looks for the movemail program
> in a list of directories composed of rmail-movemail-search-path,
> exec-path and exec-directory.
I think it should search for rmail-movemail-program in those directories
even if it's set (to a non-absolute name):
(defcustom rmail-movemail-program "movemail"
"If non-nil, name of program for fetching new mail."
:group 'rmail-retrieve
:type 'string)
(defun rmail-autodetect ()
(if (file-name-absolute-p rmail-movemail-program)
(rmail-probe rmail-movemail-program)
(let ((exec-path (append rmail-movemail-search-path
exec-path
(list exec-directory))))
(rmail-probe (setq rmail-movemail-program
(executable-find rmail-movemail-program))))))
...
> @@ -3841,12 +3917,15 @@ TEXT and INDENT are not used."
> (setq rmail-pop-password nil)
> (setq rmail-encoded-pop-password nil)))
>
> -(defun rmail-get-pop-password ()
> - "Get the password for retrieving mail from a POP server. If none
> +(defun rmail-get-pop-password (imap)
> + "Get the password for retrieving mail from a POP or IMAP server.
If none
> has been set, then prompt the user for one."
> (if (not rmail-encoded-pop-password)
> (progn (if (not rmail-pop-password)
> - (setq rmail-pop-password (read-passwd "POP password: ")))
> + (setq rmail-pop-password
> + (read-passwd (if imap
> + "IMAP password: "
> + "POP password: "))))
> (rmail-set-pop-password rmail-pop-password)
> (setq rmail-pop-password nil)))
> (rmail-encode-string rmail-encoded-pop-password (emacs-pid)))
Wouldn't it be cleaner to name this function rmail-get-remote-password
and the variable rmail-remote-password? (If not, at least make the IMAP
argument to rmail-get-pop-password &optional).
Even better, maintain both rmail-pop-password and rmail-imap-password so
the user can access multiple remote mailboxes.
--
Kevin Rodgers