From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#31796: 27.1; dired-do-find-regexp-and-replace fails to find multiline regexps Date: Mon, 23 Nov 2020 08:16:26 -0800 (PST) Message-ID: <91c98791-9df2-43ee-9aac-205c5b0de9c2@default> References: <10120030-8b8d-b702-add4-8f099f934ed5@chalmers.se> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18574"; mail-complaints-to="usenet@ciao.gmane.io" To: Andreas Abel , 31796@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 23 17:19:15 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khEYc-0004hL-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 17:19:14 +0100 Original-Received: from localhost ([::1]:37960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khEYb-0007F7-P7 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 23 Nov 2020 11:19:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khEYQ-0007EV-GG for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 11:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khEYQ-0003Sb-9b for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 11:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khEYQ-0005HG-63 for bug-gnu-emacs@gnu.org; Mon, 23 Nov 2020 11:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Nov 2020 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31796 X-GNU-PR-Package: emacs Original-Received: via spool by 31796-submit@debbugs.gnu.org id=B31796.160614832920254 (code B ref 31796); Mon, 23 Nov 2020 16:19:02 +0000 Original-Received: (at 31796) by debbugs.gnu.org; 23 Nov 2020 16:18:49 +0000 Original-Received: from localhost ([127.0.0.1]:50838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khEYC-0005Gc-T1 for submit@debbugs.gnu.org; Mon, 23 Nov 2020 11:18:49 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:45886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khEY9-0005GN-St for 31796@debbugs.gnu.org; Mon, 23 Nov 2020 11:18:48 -0500 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANGIWJN106158; Mon, 23 Nov 2020 16:18:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=RkJ1fxcLZpVH0NkczpmG40VZP53ix3lOZmHz8l4Qh/s=; b=G/f5+CCl5nGBOjyZSbZFSOwMjh7hPGuFPGss7CbGTb0wrT5b9bwhNinFYpxKPtg32uwk qHof/YwxOltCA9PAloXUpMuubxZGCOiJC4MliMom/9uT7NhkqRgReYMF/VKJqmykTbYE pcDU19RxgT2U4pAmxmd38JYtUXY7ePIKEaPZ2L0ZOwkyBKNfhyUy5xbU7ZdzRPgSP9ET TLtQDaX/WBRCLIKC4V2UvicDvo4xSNnJatZBC4QhZdI99ExT8YALgQRKBAo7nVf3GU4K 6UX2ck/EcgmMBoG8V+1Emj4a/hofQ77N3o3PWeRc/qhGDSsSFK/K80wILA9uMj2HOaRe ow== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 34xtukx10b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Nov 2020 16:18:32 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0ANGFox8134385; Mon, 23 Nov 2020 16:16:31 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 34ycnr4h70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 23 Nov 2020 16:16:31 +0000 Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0ANGGRbx006066; Mon, 23 Nov 2020 16:16:29 GMT In-Reply-To: <10120030-8b8d-b702-add4-8f099f934ed5@chalmers.se> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5071.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9813 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011230110 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9813 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 spamscore=0 mlxscore=0 phishscore=0 clxscore=1011 suspectscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011230110 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193925 Archived-At: > The dired-do-find-regexp-and-replace command does not seem > to parse the regex entered by the user correctly. If the > regex string contains a newline character (^Q^J), it seems > that the parsing stops there. At least I have seen errors > like "unmatched bracket" and the like. >=20 > Anyhow, I did not get it to replace multiline text. > I found an answer here: >=20 > https://emacs.stackexchange.com/questions/30437/dired-search-and-replace-= is-throwing-no-results >=20 > The solution is to manually invoke > dired-do-query-replace-regexp (instead of pressing just Q). > > However, this solution is hard to discover, because it is > unexpected that the official regex-replace feature (key Q) > contains such a blunder. >=20 > - Why isn't the more robust dired-do-query-replace-regexp > bound to Q? It _was_ bound to `Q' - for decades. But the inventor of `dired-do-find-regexp-and-replace' decided to give that binding to his command. (I argued in vain in favor of giving the new command a different binding, keeping `Q' as it was. Similarly for `A'.) > - Why not fix the bug in dired-do-find-regexp-and-replace? > It has been reported for version 26 already, and it is not > a minor issue. Replacing interactively in several files is > an **extremely** useful feature, and I would not want to > do something like that outside of emacs. +1. ___ FWIW, Dired+ binds `dired-do-query-replace-regexp' to `M-q' (respecting the new binding of `Q' to `dired-do-find-regexp-and-replace', though I disagree with it). And Dired+ has both commands on the menus: Multiple > Search > Query Replace Using TAGS Table... M-q Query Replace Using `find'... Q https://www.emacswiki.org/emacs/DiredPlus