Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: auth-source-search
Date: Fri, 04 Mar 2011 08:55:11 -0600	[thread overview]
Message-ID: <87pqq77x68.fsf@lifelogs.com> (raw)
In-Reply-To: <6eoc5r6vrq.fsf@news.eternal-september.org>

(btw, you have the list name as "nognus" but that's only the name of the
current Gnus release)

On Fri, 04 Mar 2011 11:10:49 +0100 Richard Riley <rileyrg@googlemail.com> wrote: 

RR> Since this is probably such a required thing for anything needing
RR> passwords (erc, identica, gnus, git etc etc), would not a

RR> "auth-password" function make sense?

That's what `auth-source-user-or-password' did and it was not so good.
A simple API hides the underlying complexity of the multiple backends
and tokens that auth-source.el supports.  Since the consumers of the
auth-source API are other packages and not the end users, it makes sense
to keep the API flexible and powerful.  There is only one (interactive)
function in auth-source.el (`auth-source-forget-all-cached') currently
and that's intentional.

In your example with org-mode, it's better to add the auth-source query
in org-mode itself instead of asking the user to do the query.  The
complexity can then be hidden and abstracted in whatever way makes sense
for org-mode specifically.  org-mode should not require you, the user,
to do an auth-source query.

So maybe for user convenience I can provide a wrapper like
`auth-source-pick-first-secret' but I am seriously concerned that such a
wrapper will grow in complexity and "convenience" until its complexity
overwhelms its utility.  I would like some more feedback.
 
RR> I struggled for ages to get this to work ;) Its not my code per se above
RR> but the results of collaboration on #emacs where more than one person
RR> other than me was baffled by the complexity of docstring.

Most of the complexity has to do with creation and not searching.  I
will, as I said, provide examples of the common searches.

The #emacs crowd should feel free to submit bug reports or improvement
suggestions/patches.  I promise to consider them carefully, but can't
help anyone if their complaints are on an IRC channel.

RR> Your code above is even more complex from my point of view - and I see
RR> why since you detect the secret type. But the code above would almost
RR> certainly benefit by being part of the API.

My code is also more complex because it doesn't assume anything will
work properly :) It belongs in a package instead of at the user level.

Ted




  reply	other threads:[~2011-03-04 14:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 16:11 auth-source-search Richard Riley
2011-03-03 20:00 ` auth-source-search Richard Riley
2011-03-03 22:14   ` auth-source-search Ted Zlatanov
2011-03-04 10:10     ` auth-source-search Richard Riley
2011-03-04 14:55       ` Ted Zlatanov [this message]
2011-03-05 10:21         ` auth-source-search Lars Magne Ingebrigtsen
2011-03-07 17:44           ` auth-source-search Ted Zlatanov
2011-03-09 15:39             ` auth-source-search Ted Zlatanov
     [not found]               ` <14vczs2spa.fsf@news.eternal-september.org>
2011-03-09 17:38                 ` auth-source-search Ted Zlatanov
2011-03-15 16:41               ` auth-source-search Lars Magne Ingebrigtsen
2011-03-09 15:35         ` auth-source-search Ted Zlatanov

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=87pqq77x68.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /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.
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).