From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72409 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap ports and protocols Date: Fri, 01 Oct 2010 11:45:22 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87d3rtyi8t.fsf@lifelogs.com> References: <87mxqyj5iz.fsf@mid.gehheimdienst.de> <87lj6hyky6.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285951546 28715 80.91.229.12 (1 Oct 2010 16:45:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 1 Oct 2010 16:45:46 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M20781@lists.math.uh.edu Fri Oct 01 18:45:45 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P1ijs-0006uR-UG for ding-account@gmane.org; Fri, 01 Oct 2010 18:45:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1P1ijo-0005qM-OL; Fri, 01 Oct 2010 11:45:36 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1P1ijn-0005q5-EL for ding@lists.math.uh.edu; Fri, 01 Oct 2010 11:45:35 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P1ijj-0006S0-A2 for ding@lists.math.uh.edu; Fri, 01 Oct 2010 11:45:35 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P1iji-0005Tt-00 for ; Fri, 01 Oct 2010 18:45:30 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P1iji-0006rU-D6 for ding@gnus.org; Fri, 01 Oct 2010 18:45:30 +0200 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Oct 2010 18:45:30 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 01 Oct 2010 18:45:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 58 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:3YGpF02H++pH15LFgoq2xxg9fQ8= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72409 Archived-At: On Fri, 01 Oct 2010 18:25:42 +0200 Lars Magne Ingebrigtsen wrote: LMI> Ted Zlatanov 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