From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: return of replace-match Date: Tue, 04 Mar 2014 14:42:48 +0000 Message-ID: <87txbe58k7.fsf@newcastle.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393944209 7747 80.91.229.3 (4 Mar 2014 14:43:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Mar 2014 14:43:29 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 04 15:43:37 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WKqZF-0006Y0-3E for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 15:43:37 +0100 Original-Received: from localhost ([::1]:45587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKqZE-00069g-Mg for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Mar 2014 09:43:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKqYy-00068u-W9 for Help-gnu-emacs@gnu.org; Tue, 04 Mar 2014 09:43:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKqYs-00013F-Ua for Help-gnu-emacs@gnu.org; Tue, 04 Mar 2014 09:43:20 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:59548) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKqYs-00012X-OZ for Help-gnu-emacs@gnu.org; Tue, 04 Mar 2014 09:43:14 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129]) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1WKqYn-0002nU-Fs for Help-gnu-emacs@gnu.org; Tue, 04 Mar 2014 14:43:09 +0000 Original-Received: from localhost (jangai.ncl.ac.uk [10.66.67.223]) (authenticated bits=0) by smtpauth-vm.ncl.ac.uk (8.13.8/8.13.8) with ESMTP id s24Eh94i015971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 4 Mar 2014 14:43:09 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96253 Archived-At: I've been trying out "replace-match". The elisp manual says.... -- Function: replace-match replacement &optional fixedcase literal string subexp This function performs a replacement operation on a buffer or string. If you did the last search in a buffer, you should omit the STRING argument or specify `nil' for it, and make sure that the current buffer is the one in which you performed the last search. Then this function edits the buffer, replacing the matched text with REPLACEMENT. It leaves point at the end of the replacement text, and returns `t'. However, if I eval the progn below (with bob where it says) (progn (re-search-forward "bob") (replace-match "fred")) bob point gets moved to the end of "bob" (now "fred") but "nil" is returned. The docstring doesn't say anything at all about return types (unless operating over a string. Am I doing something wrong? Phil