Gnus development mailing list
 help / color / mirror / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: ding@gnus.org
Subject: Re: nnimap ports and protocols
Date: Fri, 01 Oct 2010 18:25:42 +0200	[thread overview]
Message-ID: <m3vd5lg9rt.fsf@quimbies.gnus.org> (raw)
In-Reply-To: <87lj6hyky6.fsf@lifelogs.com>

Ted Zlatanov <tzz@lifelogs.com> writes:

> My example on extending nnimap-stream could handle this (posted earlier
> this morning in this thread).

Yes, that would work, but I find that variables that have complex
syntaxes (and we have enough of them) are something users fiddle with
and complain when they break, so if that could be avoided, it would be a
plus. 

> Yet another is to save a "nnimap-stream" token in the netrc file.

This is my current idea I had like five minutes ago, so it should be
great.  :-)  To take nnimap-stream as the example:

1) we'd change the default to nil, signalling that we want Gnus to
figure it out on its own.  If it has a value, then the user has
obviously chosen it, which makes the rest of the stuff irrelevant.

2) if it's nil, then we're in DWIM mode.  We then call
(nnimap-guess-connection-method server).  It'd try the stuff we talked
about earlier, and return its result.

3) this is saved in a new Gnus/Emacs file, called...  er...
~/emacs.d/emacs-memoize, which would have a format like

(nnimap connection-method ("imaps" ssl))

one per line, so that the user can edit it by hand, if necessary.  The
meaning here would be DOMAIN (so that many different packages can use
the same mechanism), TOKEN (that has some meaning in that domain), and
the VALUE.

4) nnimap would call this with the macro
(gnus-memoize 'nnimap 'connection-method
  (nnimap-guess-connection-method server))

So it's like a normal memoizer, only it saves stuff to a file, too.

Does this sound halfway sane?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen




  reply	other threads:[~2010-10-01 16:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30 22:55 Lars Magne Ingebrigtsen
2010-10-01  1:00 ` Daniel Pittman
2010-10-01 13:43   ` Ted Zlatanov
2010-10-01 14:52     ` Ted Zlatanov
2010-10-01 15:19 ` Lars Magne Ingebrigtsen
2010-10-01 15:29   ` Frank Schmitt
2010-10-01 15:34     ` Lars Magne Ingebrigtsen
2010-10-01 15:46       ` Ted Zlatanov
2010-10-01 16:25         ` Lars Magne Ingebrigtsen [this message]
2010-10-01 16:45           ` Ted Zlatanov
2010-10-01 18:29             ` Lars Magne Ingebrigtsen
2010-10-01 18:41               ` Ted Zlatanov
2010-10-01 18:47                 ` Lars Magne Ingebrigtsen
2010-10-01 19:05                   ` Ted Zlatanov
2010-10-01 19:17                     ` Lars Magne Ingebrigtsen
2010-10-01 19:44                       ` Ted Zlatanov
2010-10-01 18:18           ` Sivaram Neelakantan

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=m3vd5lg9rt.fsf@quimbies.gnus.org \
    --to=larsi@gnus.org \
    --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).