From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: query-replace-regexp: Can't use \0 in TO-STRING Date: Sat, 6 May 2017 14:04:46 +0900 (JST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-859254994-1494047088=:13425" X-Trace: blaine.gmane.org 1494047103 30253 195.159.176.226 (6 May 2017 05:05:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 May 2017 05:05:03 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Tino Calancha , Emacs developers To: zhanghj Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 06 07:04:58 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6rto-0007lW-8Q for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 07:04:56 +0200 Original-Received: from localhost ([::1]:50033 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6rtt-0002jw-Ur for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 01:05:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6rto-0002jq-DW for emacs-devel@gnu.org; Sat, 06 May 2017 01:04:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6rtj-00006M-Cn for emacs-devel@gnu.org; Sat, 06 May 2017 01:04:56 -0400 Original-Received: from mail-pg0-x232.google.com ([2607:f8b0:400e:c05::232]:33199) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d6rtj-00005K-79 for emacs-devel@gnu.org; Sat, 06 May 2017 01:04:51 -0400 Original-Received: by mail-pg0-x232.google.com with SMTP id u187so3274199pgb.0 for ; Fri, 05 May 2017 22:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=4ULoib33RYLnEvwiTmS39yfVg+qAgKuLrf3Pgs6QMFU=; b=q9XVjxfSLTxXHotoaDdZSmrS1vawQTH6Q3ymBeXbYcuwbNAAtU5dHlunSVove16pRk JT5r+zxmFUKssed2U317KIUFzSEQxl1bvHi6FBE7ECuZiZZlP/VYY7LYtz7Cxpzqm6gS VTy2vXzIOePd5ludO7y3wJ5v1KdycOnILiu6//P4IUBZCtmwRP5frtZbbCCR5GOdtRmZ apBAtsmDoMkmtpjTNvQ5cE3/fBDkJ5Y4pUpkQ9Z3SaoJPmj2LLVH8hMXXx5O1ZM0AKOO w/Fy1HKaDn4RJlIcXx0MkdGdGSLuxaRsuJ55uZjYJ2bpyGLxfvJfLx7sMn5YLLGpLWNT VBCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=4ULoib33RYLnEvwiTmS39yfVg+qAgKuLrf3Pgs6QMFU=; b=lJpjyI1wjd7xdJWYOdSNu/hODpBSlaCB7v/xaos1HxZFbDIyjLPrOoPJ2RQ0N3dJsU GZ3dFW56YJFPmTZf97Dwy/stkDuiYtskf7npDtmheM8Dhr5qAlfqm856xZEbDbZ74sPW g2TrXrvsWBLzSTY2pLlWp1RtjQrUjpg8Uo5N/MVFGIPTg+xlwe8OsvK3Dvg1prLBCOkS sYTANOcXZxpaJFvBii8/i5ZSO6DQ+mklXiUeFpw+4/GzfWJ9UDFHqNpzMm0GvV8xHGf/ 0Vr9cfHyLPO0Rfi5eBTeDtIuhEOJSWvQLAbqwL5v4vFUinZAqtp3rc5EaJylvLK5EoFi AUDQ== X-Gm-Message-State: AN3rC/50OC7fzixnhxdI+PRjZrQb+cgVmokC2fPNUBZIHWTz/FThuMcy fKFBHN7K+4akOw== X-Received: by 10.99.120.72 with SMTP id t69mr7466296pgc.64.1494047089955; Fri, 05 May 2017 22:04:49 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id 128sm7229950pgi.49.2017.05.05.22.04.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 May 2017 22:04:48 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214600 Archived-At: --8323329-859254994-1494047088=:13425 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Sat, 6 May 2017, zhanghj wrote: > The doc says: > In TO-STRING, ‘\&’ or ‘\0’ stands for whatever matched the whole of > REGEXP, and ‘\N’ (where N is a digit) stands for whatever matched > the Nth ‘\(...\)’ (1-based) in REGEXP. The ‘\(...\)’ groups are > counted from 1. > > But when using \0, emacs gives the following error message: > match-substitute-replacement: Invalid use of ‘\’ in replacement text > > Using \& is OK. Thanks. The docstring for `query-replace-regexp' was updated in commit 38f4b8ea615 to fix Bug#23884. Apparently, \0 has never referred to the whole match in this command (\& it does), so we might want to skip \0 from this docstring and the manual. Regards, Tino --8323329-859254994-1494047088=:13425--