From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60390 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: ldap cert retrieval and pem encoding Date: Tue, 31 May 2005 14:07:50 +0200 Message-ID: References: <87wtpkbzyz.fsf@arnested.dk> <874qcnh9kb.fsf@arnested.dk> <87y89vrb7r.fsf@seamus.arnested.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1117541239 19891 80.91.229.2 (31 May 2005 12:07:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 May 2005 12:07:19 +0000 (UTC) Cc: Arne =?iso-8859-1?Q?J=F8rgensen?= , ding@gnus.org Original-X-From: ding-owner+M8917@lists.math.uh.edu Tue May 31 14:07:15 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dd5Vk-0004uM-61 for ding-account@gmane.org; Tue, 31 May 2005 14:06:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1Dd5Xb-0002V0-00; Tue, 31 May 2005 07:08:15 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1Dd5XW-0002Uv-00 for ding@lists.math.uh.edu; Tue, 31 May 2005 07:08:10 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by util2.math.uh.edu with esmtp (Exim 4.30) id 1Dd5XV-0004cR-K7 for ding@lists.math.uh.edu; Tue, 31 May 2005 07:08:09 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Dd5XO-0005Gt-00 for ; Tue, 31 May 2005 14:08:02 +0200 Original-Received: from latte.josefsson.org (c494102a.s-bi.bostream.se [217.215.27.65]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-1) with ESMTP id j4VC7q6E021126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 31 May 2005 14:07:53 +0200 Original-To: Ulf Stegemann OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:050531:ding@gnus.org::JZoAxif8WpObeBEh:05mb X-Hashcash: 1:21:050531:ulf@zeitform.de::Jh2coJH9sHfplY6n:3WgO X-Hashcash: 1:21:050531:arne@arnested.dk::fOzQ5avlA1r3Dcbr:5fIc In-Reply-To: (Ulf Stegemann's message of "Tue, 31 May 2005 14:01:07 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=failed version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -4.9 (----) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60390 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:60390 Ulf Stegemann writes: > Simon Josefsson wrote: > > [...] > >> Applied to CVS. > > [...] > >>> (replace-in-string >>> (cadaar ldapresult) >>> "\\(\n\\|\r\\|-----BEGIN CERTIFICATE-----\\|-----END CERTIFICATE-----\\)" >>> "" t)) >> >> This one too, let me know whether it works now. > > Yes, it works for xemacs. I think emacs will need the original > replace-regexp-in-string instead. My emacs does not know replace-in-string. Well, we want something that works in both. Perhaps we could duplicate the stuff from gnus-util.el in smime.el? Renaming it to smime-replace-in-string first, of course. Better ideas welcome; I'll install the best idea tomorrow, unless someone beats me to it. (eval-and-compile (cond ((fboundp 'replace-in-string) (defalias 'gnus-replace-in-string 'replace-in-string)) ((fboundp 'replace-regexp-in-string) (defun gnus-replace-in-string (string regexp newtext &optional literal) "Replace all matches for REGEXP with NEWTEXT in STRING. If LITERAL is non-nil, insert NEWTEXT literally. Return a new string containing the replacements. This is a compatibility function for different Emacsen." (replace-regexp-in-string regexp newtext string nil literal)))))