From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neon Absentius Newsgroups: gmane.emacs.help Subject: replace-regexp question Date: Wed, 26 Oct 2005 17:15:57 +0000 Message-ID: <20051026171557.GA8593@SDF.LONESTAR.ORG> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130347259 19735 80.91.229.2 (26 Oct 2005 17:20:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Oct 2005 17:20:59 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 26 19:20:55 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUosw-0006Dy-1y for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Oct 2005 19:16:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUosv-0001Qi-3E for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Oct 2005 13:16:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUosj-0001QS-CN for help-gnu-emacs@gnu.org; Wed, 26 Oct 2005 13:16:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUosh-0001QG-Tr for help-gnu-emacs@gnu.org; Wed, 26 Oct 2005 13:16:09 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUosh-0001QD-QL for help-gnu-emacs@gnu.org; Wed, 26 Oct 2005 13:16:07 -0400 Original-Received: from [192.94.73.21] (helo=sdf.lonestar.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EUosh-0003fX-KB for help-gnu-emacs@gnu.org; Wed, 26 Oct 2005 13:16:07 -0400 Original-Received: from sdf.lonestar.org (IDENT:absent@norge.freeshell.org [192.94.73.3]) by sdf.lonestar.org (8.13.1/8.12.10) with ESMTP id j9QHFvFr011854 for ; Wed, 26 Oct 2005 17:15:57 GMT Original-Received: (from absent@localhost) by sdf.lonestar.org (8.13.1/8.12.8/Submit) id j9QHFvQX009718 for help-gnu-emacs@gnu.org; Wed, 26 Oct 2005 17:15:57 GMT Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Neon Absentius , help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30588 Archived-At: Is there a way to use the command replace-regexp to replace a number with that number increased, say, by 15? I tried C-M-% -?[0-9]+ RET (number-to-string (+ (string-to-number "\&") 15)) RET but it doesn't work because emacs interprets the second input to be a string and so it doesn't evaluate it. So I guess the question is how can we use the result of evaluating a sexp for replacement text? Any help and/or pointers to documentation will be greatly appreciated. -- There is no national science just as there is no national multiplication table; what is national is no longer science. -- Anton Checov