From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: npostavs@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#35354: 26.2; `dired-do-query-replace-regexp': How to replace only word-delimited matches? Date: Mon, 29 Apr 2019 15:20:43 -0400 Message-ID: <85d0l4mxdg.fsf@gmail.com> References: <08ee0770-3f50-433e-955e-f8e13547ec21@default> <8f6f6e13-c150-a09f-06e5-aed3bfa21933@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168161"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) Cc: 35354@debbugs.gnu.org, Dmitry Gutov To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 29 21:21:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLBpw-000hbC-RA for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Apr 2019 21:21:12 +0200 Original-Received: from localhost ([127.0.0.1]:34092 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLBpv-0007M1-MT for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Apr 2019 15:21:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLBpn-0007Lt-AR for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2019 15:21:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLBpm-0003oR-Ag for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2019 15:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hLBpm-0003oI-54 for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2019 15:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hLBpl-0005Zs-Uc for bug-gnu-emacs@gnu.org; Mon, 29 Apr 2019 15:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Apr 2019 19:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35354 X-GNU-PR-Package: emacs Original-Received: via spool by 35354-submit@debbugs.gnu.org id=B35354.155656565921408 (code B ref 35354); Mon, 29 Apr 2019 19:21:01 +0000 Original-Received: (at 35354) by debbugs.gnu.org; 29 Apr 2019 19:20:59 +0000 Original-Received: from localhost ([127.0.0.1]:39760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLBpi-0005ZE-Pl for submit@debbugs.gnu.org; Mon, 29 Apr 2019 15:20:59 -0400 Original-Received: from mail-qt1-f174.google.com ([209.85.160.174]:43079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hLBpg-0005Yx-6O for 35354@debbugs.gnu.org; Mon, 29 Apr 2019 15:20:57 -0400 Original-Received: by mail-qt1-f174.google.com with SMTP id g4so13291048qtq.10 for <35354@debbugs.gnu.org>; Mon, 29 Apr 2019 12:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=/6qfFpcg3eKvTSQxdaPAE/hic0jl+CfiANzv4zfShfk=; b=sGhFwlhDhmp2XfYe0XRbec7G8R65vA0OTJt/OHfdYdGeDPEAaUkKL8nybdOM5e7W0S Z9eHrSz7Yl254/0BPACAeI2Gy5Rh7B6DanWKuJgi/jIxlZXeMgQCfa/lLJATdiEhNQON 9GcysvDAahn/F0TGNeCeJQby5yDBdPzmLyUmVqzEd0DAZZvxxMVMVBp7jGW/QDPbrl1A 9GnycU089/j5PpfWdxtpj9lSh3QBFDJ52iGwhAyvk6dJgoCZrol6uTAW4RSFEGlPfxex QRrbgxiq9ATofnk19KFGyBNYS7kq7LE7hXqAA0SaaH6ZfrLlqRtGcBt3KNy0B0tkggPA Jg6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=/6qfFpcg3eKvTSQxdaPAE/hic0jl+CfiANzv4zfShfk=; b=lz1a5yH+8ekRdppUOtIj7uqHOo4VkZwWkFAzASaMUW6w3rcrjI1TNndZgorSZ072UK dMdT0B8bucohb/HI4XMJj1WclIvll0n0FZQnV5lZJsLkk3HkiOoTumJPGjZwohyPmlYX D9pC6OQ1dIZr4ovbi2Tcdv7GlRZB+NCbyWWSZKD6dJVypCCCo78bdaOobJ9VAF3bcgQK PTZb3dPmdI8k9xLqBZupBVcH4bXJuVrq2T1FbkJ+6V8lw6ODUqI+VwSWHeK8KeWCYgah 7/mEAJtR56VHPDoRu4tsXs4BErCAaKZIJWTt/ynY3mIyA1gorAK8I5nutFiOms+C9vAx ZN+Q== X-Gm-Message-State: APjAAAXhciRgFLKJAkioz0toEhxoEErS7FDogYvOd2Nm7h+LwbqikX8I GgIAaGAD9RCrm18qFBLXYuEuIl4n X-Google-Smtp-Source: APXvYqxMCgSUVsNGGuzVvsASNgtXmPf1q5GzvAP1OnRKIWv6nI01TU7FqEI7VY02DmTSD+IHend5rQ== X-Received: by 2002:ac8:35aa:: with SMTP id k39mr38736609qtb.136.1556565650478; Mon, 29 Apr 2019 12:20:50 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.51.196]) by smtp.googlemail.com with ESMTPSA id 8sm20200466qtr.32.2019.04.29.12.20.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Apr 2019 12:20:49 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Sun, 21 Apr 2019 16:57:57 -0700 (PDT)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158443 Archived-At: >>>>> "Drew" == Drew Adams writes: >>>>> "Dmitry" == Dmitry Gutov writes: Drew> I was expecting that it would do all that the latter does plus Drew> more. Dmitry> I don't really understand how we can both expect FROM to be a Dmitry> regexp and have a separate argument DELIMITED. Drew> Why is that a problem? It seems to give some possibly unexpected results. For example, with this buffer contents: word fooooo bar word word foo bar word C-u C-M-% foo.*bar RET replaces only the "foo bar" on the second line, not the "fooooo bar" on the first line. That is to say, it's unclear (to me at least) what DELIMITED means for regexps which can match both word and non-word characters. Drew> How does a user use `dired-do[-find]-query-replace-regexp' to replace Drew> only word-delimited matches? Dmitry> How about \? Drew> How do you specify delimited _replacement_? I understand how the match can be delimited, but I don't understand how the replacement can be delimited. Dmitry> Is there a practical difference between this and Dmitry> using a regexp with word boundaries as FROM? Drew> See `query-replace-regexp'. Why do you think it has argument Drew> DELIMITED? I think it might be just to save the user from typing `\<' and `\>'. Did you have another reason in mind? If so, please say it plainly, thanks.