From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68130 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: Sun, 11 Jan 2009 19:04:22 +0100 Organization: Probably a good idea Message-ID: References: <833ahh3nud.fsf@torus.sehlabs.com> <877i6th1uo.fsf@mocca.josefsson.org> <87zljpidgh.fsf@hjemme.hjemme.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1231697159 9167 80.91.229.12 (11 Jan 2009 18:05:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Jan 2009 18:05:59 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16574@lists.math.uh.edu Sun Jan 11 19:07:11 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 1LM4hr-0005Lg-Fg for ding-account@gmane.org; Sun, 11 Jan 2009 19:06:39 +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 1LM4gC-0000u5-HA; Sun, 11 Jan 2009 12:04:56 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1LM4gB-0000tg-1m for ding@lists.math.uh.edu; Sun, 11 Jan 2009 12:04:55 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LM4g8-0000sq-7x for ding@lists.math.uh.edu; Sun, 11 Jan 2009 12:04:54 -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 1LM4gP-0001kT-00 for ; Sun, 11 Jan 2009 19:05:09 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LM4g6-00016I-Qp for ding@gnus.org; Sun, 11 Jan 2009 18:04:50 +0000 Original-Received: from cm-84.208.204.180.getinternet.no ([84.208.204.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Jan 2009 18:04:50 +0000 Original-Received: from sb by cm-84.208.204.180.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 11 Jan 2009 18:04:50 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 37 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.204.180.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (windows-nt) Cancel-Lock: sha1:YH6YIJATByYp6UmfVrhOI6wXV6c= X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68130 Archived-At: >>>>> Steinar Bang : > I'm probably running a hook that us run too late...? It's now running > in gnus-started-hook. I tried gnus-open-hook and gnus-starting-hook, > but both are too late. > Does anyone know of a good hook candidate for me to use...? I'm now running it from gnus-load-hook, and have added a (require 'imap) to ensure that imap-ssl-program is defined before running the function that modifies the list elements. Then it works for the initial Gnus startup as well. The code now looks like this: (if windows-emacs (progn (defun use-cygwin-openssl-for-nnimap () (let ((cygwin-openssl "C:\\cygwin\\bin\\openssl.exe")) (if (file-exists-p cygwin-openssl) (progn (require 'imap) (setq imap-ssl-program (mapcar '(lambda (element) (let ((newelement element)) (if (string-match "openssl " element) (setq newelement (replace-match (concat cygwin-openssl " ") t t element)) newelement))) imap-ssl-program)))))) (add-hook 'gnus-load-hook 'use-cygwin-openssl-for-nnimap))) The windows-emacs variable is defined like this: (defvar windows-emacs (string-match "mingw" (emacs-version)) "Hold a numerical value if this is an Emacs running on Windows, and nil if this isn't windows")