From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/31376 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: mail-sources strangeness Date: Sat, 10 Jun 2000 23:31:34 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035167793 13627 80.91.224.250 (21 Oct 2002 02:36:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:36:33 +0000 (UTC) Cc: Michael =?iso-8859-1?q?H=FChne?= Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id BCF52D051E for ; Sat, 10 Jun 2000 17:32:49 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id QAC00479; Sat, 10 Jun 2000 16:32:37 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 10 Jun 2000 16:31:52 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id QAA08349 for ; Sat, 10 Jun 2000 16:31:42 -0500 (CDT) Original-Received: from waldorf.cs.uni-dortmund.de (waldorf.cs.uni-dortmund.de [129.217.4.42]) by mailhost.sclp.com (Postfix) with ESMTP id AA098D051E for ; Sat, 10 Jun 2000 17:32:05 -0400 (EDT) Original-Received: from marcy.cs.uni-dortmund.de (marcy.cs.uni-dortmund.de [129.217.20.159]) by waldorf.cs.uni-dortmund.de with ESMTP id XAA19114; Sat, 10 Jun 2000 23:31:34 +0200 (MES) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.20.160]) by marcy.cs.uni-dortmund.de id XAA00770; Sat, 10 Jun 2000 23:31:34 +0200 (MET DST) Original-Received: (from grossjoh@localhost) by lucy.cs.uni-dortmund.de (8.9.3/8.9.3/Debian 8.9.3-21) id XAA32457; Sat, 10 Jun 2000 23:31:34 +0200 X-Authentication-Warning: lucy.cs.uni-dortmund.de: grossjoh set sender to Kai.Grossjohann@CS.Uni-Dortmund.DE using -f Original-To: ding@gnus.org User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/21.0.90 Original-Lines: 53 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:31376 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:31376 `mail-sources' uses pop3-movemail if nothing is specified, right? So the following two behave the same, right? (setq mail-sources '((pop :user "foo" :server "bar")) (setq mail-sources '((pop :user "foo" :server "bar" :function pop3-movemail)) Wrong. /---- | (setq result | (cond | (program | (mail-source-fetch-with-program | (format-spec | program | (format-spec-make ?p password ?t mail-source-crash-box | ?s server ?P port ?u user)))) | (function | (funcall function mail-source-crash-box)) | ;; The default is to use pop3.el. | (t | (let ((pop3-password password) | (pop3-maildrop user) | (pop3-mailhost server) | (pop3-port port) | (pop3-authentication-scheme | (if (eq authentication 'apop) 'apop 'pass))) | (save-excursion (pop3-movemail mail-source-crash-box)))))) \---- This code binds lots of variables if `:function' isn't present, and does nothing like this if `:function' is present. I think there should be a specified protocol for passing the necessary information to the function: user name, host name, password, port, authentication scheme. It's not clear to me how a function is supposed to get at these values, anyway. (Well, there is `mail-source-bind' which might do this, but it's not easy to understand what that does... Hm. It appears to provide defaults for the colon keywords.) Whichever scheme is chosen, it should be documented, I think. And there should be a function which can be put in like `:function foo' such that the default behavior is chosen. A simple idea would be to merge the `function' and `t' cases in the cond such that pop3-password, ..., pop3-authentication-scheme are always bound and save-excursion is always used to execute the function. kai -- I like BOTH kinds of music.