[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use replace-match in posting-style.

From: Ted Zlatanov
Subject: Re: [PATCH] Use replace-match in posting-style.
Date: Thu, 8 Jul 2010 08:57:17 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Wed, 23 Jun 2010 23:02:16 +0200 Daniel Dehennin <address@hidden> wrote: 

DD> Daniel Dehennin <address@hidden> 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
>> <matched> 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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]