Gnus development mailing list
 help / color / mirror / Atom feed
* mail-sources strangeness
@ 2000-06-10 21:31 Kai Großjohann
  2000-08-13 18:42 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2000-06-10 21:31 UTC (permalink / raw)
  Cc: Michael Hühne

`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.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-08-14 21:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-10 21:31 mail-sources strangeness Kai Großjohann
2000-08-13 18:42 ` Lars Magne Ingebrigtsen
2000-08-13 19:34   ` Kai Großjohann
2000-08-13 19:43     ` Lars Magne Ingebrigtsen
2000-08-14 12:59       ` Kai Großjohann
2000-08-14 17:11         ` Lars Magne Ingebrigtsen
2000-08-14 21:05           ` Kai Großjohann

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 NNTP newsgroup(s).