From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: [PATCH] Use replace-match in posting-style. Date: Thu, 8 Jul 2010 08:57:17 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87aaq2uldu.fsf@lifelogs.com> References: <87ab3gfb41.fsf@hati.baby-gnu.org> <87r5wrgg8w.fsf@lifelogs.com> <87y6gvwryp.fsf@hati.baby-gnu.org> <87d3y7p1ie.fsf@gnu.org> <87633y7v02.fsf@hati.baby-gnu.org> <87vdbyccgg.fsf@hati.baby-gnu.org> <87eiikdfub.fsf@hati.baby-gnu.org> <87ocf18ntz.fsf@hati.baby-gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: dough.gmane.org 1278597525 10585 80.91.229.12 (8 Jul 2010 13:58:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 8 Jul 2010 13:58:45 +0000 (UTC) Cc: , Emacs Development To: Daniel Dehennin Original-X-From: ding-owner+M18195@lists.math.uh.edu Thu Jul 08 15:58:43 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 1OWrch-00056Y-1n for ding-account@gmane.org; Thu, 08 Jul 2010 15:58:43 +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 1OWrby-00053r-7x; Thu, 08 Jul 2010 08:57:58 -0500 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 1OWrbw-00053g-Ua for ding@lists.math.uh.edu; Thu, 08 Jul 2010 08:57:56 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1OWrbr-0006u9-Om for ding@lists.math.uh.edu; Thu, 08 Jul 2010 08:57:56 -0500 Original-Received: from chirelay1o.jumptrading.com ([38.98.147.153] helo=chirelay1.jumptrading.com) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1OWrbq-00073p-00 for ; Thu, 08 Jul 2010 15:57:50 +0200 Original-Received: from chirelay1.jumptrading.com (unknown [127.0.0.1]) by chirelay1.jumptrading.com (Symantec Mail Security) with ESMTP id 6393C320027 for ; Thu, 8 Jul 2010 08:57:19 -0500 (CDT) X-AuditID: 26629395-a9588bb000004d48-f3-4c35d93fbf5c Original-Received: from chiexchange02.w2k.jumptrading.com (unknown [38.98.147.140]) by chirelay1.jumptrading.com (Symantec Mail Security) with ESMTP id 41C562DC007 for ; Thu, 8 Jul 2010 08:57:19 -0500 (CDT) Original-Received: from internalsmtp.w2k.jumptrading.com (10.2.4.29) by chiexchange02.w2k.jumptrading.com (10.2.4.71) with Microsoft SMTP Server id 8.1.291.1; Thu, 8 Jul 2010 08:57:18 -0500 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com ([10.2.14.81]) by internalsmtp.w2k.jumptrading.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Jul 2010 08:57:18 -0500 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" In-Reply-To: <87ocf18ntz.fsf@hati.baby-gnu.org> (Daniel Dehennin's message of "Wed, 23 Jun 2010 23:02:16 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-OriginalArrivalTime: 08 Jul 2010 13:57:18.0897 (UTC) FILETIME=[7ACE5210:01CB1EA5] X-Brightmail-Tracker: AAAAAA== X-Spam-Score: -0.0 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69805 gmane.emacs.devel:126908 Archived-At: On Wed, 23 Jun 2010 23:02:16 +0200 Daniel Dehennin wrote: DD> Daniel Dehennin writes: >> Ok, looking in elisp manual, I saw nothing to expand positional >> parameters in a string. >> >> I first saw this functionality in nnmail-split-fancy, so I look in the >> code a find the nnmail-expand-newtext in nnmail.el. >> >> I adapt it to my needs, I think such function should be "mainstream". >> >> What do you thing about this: >> >> ;; I need the matched string because I found no way to get it from >> ;; (match-data) >> (defun my-expand (string matched &optional lowercase) >> "Replace positional parameters with the text matched by groups in the >> string. >> If the optional lowercase parameter is set, the matched text by groups >> is forced to lowercase." DD> No feedback about this features? It worries me that we're inventing (yes, including the nnmail-split-fancy usage) something that looks like but isn't at all a real regex positional replacement. Can we find out from emacs-devel if this can be done better through ELisp or even C and then apply the fix both to your code and to nnmail-split-fancy? We'll also need to find out if XEmacs can do something similar, since Gnus supports it as well. I think the description you gave is probably not specific enough to give us the best answers; can you write a more formal definition of how my-expand should behave? Thanks Ted