From: Cesar Crusius <cesar.crusius@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Make `smtpmail-try-auth-method' a generic function.
Date: Thu, 11 Jan 2018 13:36:22 -0800 [thread overview]
Message-ID: <pxwhlgh4m621.fsf@ccrusius.svl.corp.google.com> (raw)
In-Reply-To: <jwvtvvs2nzy.fsf-monnier+gmane.emacs.devel@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1024 bytes --]
On Thu 11 Jan 2018 at 19:33, Stefan Monnier wrote:
>> That will need an upcoming 'auth-source-xoauth2' package, as getting the
>> password involves doing some HTTP fetching. I have the code, just need
>> to find some time to add it to MELPA.
>
> BTW, your library can still work with Emacs-26 (and even Emacs-25) using
> a hack like:
>
> (unless (cl-generic-p 'smtpmail-try-auth-method)
> (let ((f (symbol-function 'smtpmail-try-auth-method)))
> (fset 'smtpmail-try-auth-method nil)
> (cl-generic-define-method 'smtpmail-try-auth-method nil
> '(process mech user password)
> nil f)))
>
> which turns the "regular function" smtpmail-try-auth-method into
> a "generic function".
Yes - and it can also work with Emacs-24 by advising the function
instead, which is probably what I'm going to do: if the cl-* functions
are there, and smtpmail is one, specialize it, otherwise advise it.
--
Cesar Crusius
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]
prev parent reply other threads:[~2018-01-11 21:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 6:18 [PATCH] Make `smtpmail-try-auth-method' a generic function Cesar Crusius
2018-01-11 14:09 ` Stefan Monnier
2018-01-11 14:54 ` Cesar Crusius
2018-01-11 16:11 ` Eli Zaretskii
2018-01-11 16:57 ` Stefan Monnier
2018-01-11 14:42 ` Robert Pluim
2018-01-11 17:00 ` Cesar Crusius
2018-01-11 19:33 ` Stefan Monnier
2018-01-11 21:36 ` Cesar Crusius [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pxwhlgh4m621.fsf@ccrusius.svl.corp.google.com \
--to=cesar.crusius@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.