Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: nnimap ports and protocols
Date: Fri, 01 Oct 2010 11:45:22 -0500	[thread overview]
Message-ID: <87d3rtyi8t.fsf@lifelogs.com> (raw)
In-Reply-To: <m3vd5lg9rt.fsf@quimbies.gnus.org>

On Fri, 01 Oct 2010 18:25:42 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Ted Zlatanov <tzz@lifelogs.com> writes:
>> My example on extending nnimap-stream could handle this (posted earlier
>> this morning in this thread).

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

I see.  That's reasonable.

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

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

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

OK.

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

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

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

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

That seems like a reinvention of the customize facility.  We can do a
non-interactive customization of `gnus-connection-preferences' for
instance and save the result.  I think that's better.

Also the connection preferences need to be keyed by server name/server
address regex with t as the default.

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

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

LMI> Does this sound halfway sane?

If Customize is inadequate, I would put this in .newsrc.eld, not in a
special new file.  And I would allow `gnus-connection-preferences' to be
a function called with the server name.

Ted




  reply	other threads:[~2010-10-01 16:45 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
2010-10-01 16:45           ` Ted Zlatanov [this message]
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=87d3rtyi8t.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).