From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68169 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: nnimap with openssl stopping up after connecting in Windows Date: Thu, 15 Jan 2009 13:43:18 +0100 Organization: Probably a good idea Message-ID: References: <833ahh3nud.fsf@torus.sehlabs.com> <877i6th1uo.fsf@mocca.josefsson.org> <87zljpidgh.fsf@hjemme.hjemme.lan> <871vv9pm3i.fsf@marauder.physik.uni-ulm.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1232023484 27142 80.91.229.12 (15 Jan 2009 12:44:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 12:44:44 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16612@lists.math.uh.edu Thu Jan 15 13:45:55 2009 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.50) id 1LNRbd-0000QM-1z for ding-account@gmane.org; Thu, 15 Jan 2009 13:45:53 +0100 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 1LNRZO-0001fg-Cv; Thu, 15 Jan 2009 06:43:34 -0600 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 1LNRZM-0001fS-M8 for ding@lists.math.uh.edu; Thu, 15 Jan 2009 06:43:32 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LNRZJ-0002d5-G6 for ding@lists.math.uh.edu; Thu, 15 Jan 2009 06:43:32 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LNRZa-0003On-00 for ; Thu, 15 Jan 2009 13:43:46 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LNRZH-00066I-Jf for ding@gnus.org; Thu, 15 Jan 2009 12:43:27 +0000 Original-Received: from tide73.microsoft.com ([213.199.128.148]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 12:43:27 +0000 Original-Received: from sb by tide73.microsoft.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 12:43:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: tide73.microsoft.com Mail-Copies-To: never User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (windows-nt) Cancel-Lock: sha1:OhSzrunmjesdQnoJej9vniEB0Kg= X-Spam-Score: -3.5 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68169 Archived-At: >>>>> Steinar Bang : >>>>> Steinar Bang : >>>>> Reiner Steib : >>> Doesn't it work if you put the stuff in ~/.gnus.el? >> Nope. First thing I tried. Undefined imap-ssl-program. > But yes, now that I do (require 'imap) anyway, I guess I could put it > in there, and avoid the hazzle of using a hook. > (one good thing about using the gnus-load-hook like I do now is that > it is done only once, but since the match and replace is already set > up to avoid repeated replacement (that's what the trailing space on > the match is about)) > So yes, I think I'll try that to simplify things. Done. The code looks like this: ; Access cygwin openssl directly, if available (if windows-emacs (let ((cygwin-openssl "C:/cygwin/bin/openssl.exe")) (if (file-exists-p cygwin-openssl) (progn (require 'imap) ; Need this to define the imap-ssl-program variable (setq imap-ssl-program (mapcar '(lambda (element) (let ((newelement element)) (if (string-match "openssl " element) ; NOTE the trailing space in the match avoid repeated replacement of the "openssl" on each Gnus startup (setq newelement (replace-match (concat cygwin-openssl " ") t t element)) newelement))) imap-ssl-program))))))