* Re: /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS
[not found] <E1QZ8Jx-0004jB-EC@colonialone.fsf.org>
@ 2011-06-23 0:51 ` Katsumi Yamaoka
2011-06-23 1:03 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Katsumi Yamaoka @ 2011-06-23 0:51 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 764 bytes --]
Lars Magne Ingebrigtsen wrote:
[...]
> --- a/lisp/mail/smtpmail.el 2011-05-30 17:23:47 +0000
> +++ b/lisp/mail/smtpmail.el 2011-06-21 21:10:52 +0000
[...]
> + (setq result
> + (open-network-stream
> + "smtpmail" process-buffer host port
> + :type smtpmail-stream-type
> + :return-list t
I've been using smtpmail with replacing `open-network-stream' with
`my-open-network-stream'. That does login to the remote host by
ssh and connects to the smtp port of the host using netcat. For
the recent change (adding :return-list t), I've modified my function
so as to return (PROCESS :greeting "200 Ok") rather than PROCESS.
If there's a similar old program in the world, the following patch
will help. But please ignore it if it is not worth installing. :)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 749 bytes --]
--- smtpmail.el~ 2011-06-22 22:06:16.593125000 +0000
+++ smtpmail.el 2011-06-23 00:48:05.562125000 +0000
@@ -652,3 +652,3 @@
;; If we couldn't access the server at all, we give up.
- (unless (setq process (car result))
+ (unless (setq process (or (car-safe result) result))
(throw 'done "Unable to contact server"))
@@ -658,2 +658,3 @@
+ (when (consp result)
(let* ((greeting (plist-get (cdr result) :greeting))
@@ -664,2 +665,3 @@
(throw 'done (format "Connection not allowed: %s" greeting))))
+ )
@@ -670,3 +672,3 @@
- (let* ((capabilities (plist-get (cdr result) :capabilities))
+ (let* ((capabilities (plist-get (cdr-safe result) :capabilities))
(code (smtpmail-response-code capabilities)))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS
2011-06-23 0:51 ` /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS Katsumi Yamaoka
@ 2011-06-23 1:03 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-06-23 1:03 UTC (permalink / raw)
To: emacs-devel
Katsumi Yamaoka <yamaoka@jpl.org> writes:
>> + (setq result
>> + (open-network-stream
>> + "smtpmail" process-buffer host port
>> + :type smtpmail-stream-type
>> + :return-list t
>
> I've been using smtpmail with replacing `open-network-stream' with
> `my-open-network-stream'.
You had defaliased `open-network-stream' to `my-open-network-stream'?
In that case, wouldn't calling `my-open-network-stream' break here, too,
since the caller now supplies all those extra keywork parameters that
weren't present in the old `open-network-stream'?
Anyway, I think your patch is otherwise fine, but I'm not sure how
needed it is. I mean, anybody who's aliased `open-network-stream' could
be expected to fix the calling sequence and return values. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-23 1:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1QZ8Jx-0004jB-EC@colonialone.fsf.org>
2011-06-23 0:51 ` /srv/bzr/emacs/trunk r104665: Rewritten smtpmail.el to use `open-network-stream' to do STARTTLS Katsumi Yamaoka
2011-06-23 1:03 ` Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).