From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 24 18:57:32 2016 Received: (at submit) by debbugs.gnu.org; 24 Aug 2016 22:57:32 +0000 Received: from localhost ([127.0.0.1]:39462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bch6y-0002DK-5s for submit@debbugs.gnu.org; Wed, 24 Aug 2016 18:57:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcgUk-0001Iq-M0 for submit@debbugs.gnu.org; Wed, 24 Aug 2016 18:18:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcgUe-0004CT-BJ for submit@debbugs.gnu.org; Wed, 24 Aug 2016 18:17:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcgUe-0004C9-7m for submit@debbugs.gnu.org; Wed, 24 Aug 2016 18:17:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcgUb-0006BD-U2 for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 18:17:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcgUW-0004Af-Sh for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 18:17:52 -0400 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:35689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcgUW-0004Ab-Kr for bug-gnu-emacs@gnu.org; Wed, 24 Aug 2016 18:17:48 -0400 Received: by mail-wm0-x231.google.com with SMTP id f65so215516987wmi.0 for ; Wed, 24 Aug 2016 15:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version; bh=t8t6850Ac7A1krdzoUVn9GkZIcE+fpBsILuBz1Rl8K8=; b=xLazfb7kOu7OmNDt6zz4next5qFqjezvtKuWAK72sG+9yD4Yy696GRtciCJVFdfQKG q9ZWFKHuR3ZNm0V0pwa3isFsZ1bT7xhb2KxtEGeyOig9Mk3GUcZHdfZYEqIZrJIckDIC hvfuCrVjRYGotwJuI9kzibP+C/l7sTqRtj2CicWqQbHI6BEIRitWvJs4IRhP4LYrIscy WH/+urQNMh0Ke4GuAPHb9buu8Cfd3dTALENzwht/UWpJmx7/R5FzbpKEuU1PSaYCeiT6 cWWLLOcUPGsX7qXiAZNqrXxHSHGSY46EXSu2IjQWuQk+Xgq4NR+8gUym4R24NWVmUWk2 fssg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=t8t6850Ac7A1krdzoUVn9GkZIcE+fpBsILuBz1Rl8K8=; b=knRVXCaj48/yXMKGuejafbcSp8cQ2lmLGU1zchH+ih49+uFhMLv6SA1M9cueQ9L8Lj EiWd/+wvDIf6uCWzyASvovalFc0kPbP4X6nvU2tIqqDVTYCt/A8h24OMBlVQsho8RC2m BGB1TdEOKtqPcpzXY8+I/gxaXB/ZXVc45KcAlvea7upON7YAhtO7z5uwMaKvAs3F7IIX Y8H/Ontkc7zKqm/I0x03lBNkKEkG8gVxJs+NiV2zVEtF8etZB02BAVirPVWisq12tFUs GaX5HJ0UpbLsifJxAF2//xvTFzUjQQOgIJUVcd6kNx6Sz+EzH/Tr6XaEvjFsiFSexWpm W4vw== X-Gm-Message-State: AEkoous7CLVtd3oJSNMFAS131iUKmS3yDTJnLIERBjxZ1QzZvAXgebpRRIfCXTVWaTNTmA== X-Received: by 10.28.132.195 with SMTP id g186mr18851002wmd.108.1472077066329; Wed, 24 Aug 2016 15:17:46 -0700 (PDT) Received: from blackbox (58.220.24.93.rev.sfr.net. [93.24.220.58]) by smtp.gmail.com with ESMTPSA id i8sm12643035wmg.21.2016.08.24.15.17.44 for (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 24 Aug 2016 15:17:45 -0700 (PDT) From: Max Canal To: bug-gnu-emacs@gnu.org Subject: 25.1; dired can't replace '\n' in file content (dired-do-find-regexp-and-replace) Date: Thu, 25 Aug 2016 00:17:01 +0200 Message-ID: <877fb53j8i.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 24 Aug 2016 18:57:30 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) In GNU Emacs 25.1.2 (x86_64-unknown-linux-gnu) of 2016-08-15 built on blackbox Repository revision: 8d681476bd44a2f843030579a5bbf5a248488afb System Description: Trisquel GNU/Linux 7.0, Belenos Configured using: 'configure --without-sound --without-x --without-xpm --without-jpeg --without-png --without-rsvg --without-imagemagick --without-tiff --without-gif' Configured features: GPM DBUS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 ZLIB Important settings: value of $LC_MONETARY: fr_FR.UTF-8 value of $LC_NUMERIC: fr_FR.UTF-8 value of $LC_TIME: fr_FR.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils regexp-opt dired term/xterm xterm time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify multi-tty make-network-process emacs) Memory information: ((conses 16 87307 7050) (symbols 48 18871 0) (miscs 40 46 88) (strings 32 14467 4505) (string-bytes 1 413195) (vectors 16 9723) (vector-slots 8 380240 16732) (floats 8 148 265) (intervals 56 317 0) (buffers 976 20) (heap 1024 34761 640)) Description: Trying to replace '\n' (inserted with C-q C-j) in Dired mode with Q (dired-do-find-regexp-and-replace) does not work anymore. This was tested in v25.1.2 (rc2) with -Q flag Good luck with that, let me know if you need more infos! :) From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 01:36:09 2016 Received: (at 24305) by debbugs.gnu.org; 25 Aug 2016 05:36:09 +0000 Received: from localhost ([127.0.0.1]:39876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcnKj-0001Zb-8X for submit@debbugs.gnu.org; Thu, 25 Aug 2016 01:36:09 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:32833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcnKg-0001Z1-Rl for 24305@debbugs.gnu.org; Thu, 25 Aug 2016 01:36:08 -0400 Received: by mail-pf0-f180.google.com with SMTP id y134so14279876pfg.0 for <24305@debbugs.gnu.org>; Wed, 24 Aug 2016 22:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:user-agent:mime-version; bh=Rf9CNqwDUiVwkxHcYmWVnSdBwCECMySQJ5B2ir/dVcE=; b=NHaOMAzsZ6omIB65BtLonlCylbZj8Gt94Tnah3HwvF9N+WgAF5mXszIgMhcmweT/mU de9Ai4EygIMw7Wg4uWOCz6wn/C8IzJZW+Wu9NuP8eRS35Vn8VPPUFxFTkNJaySJaGQUr iHecUMnj9GSsZV6RtGVTMRz6URsEq6WR7JjDn3xowsfBYmAY7TSzriIoAJ16nSzI7LmL AS0lIwXoqdCEh4SgDXGLl1rplvGtH7VB/kY6H4lKvupMCLe/Psbq6pgJPkhflUkw+Psi MvWG0ilvUeVnUAlWjNLY1EZr1lBcQm1/ORd+8RoyZGkzxfgNMTT/GzBBzt1+0eq5QLxb pZpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:user-agent :mime-version; bh=Rf9CNqwDUiVwkxHcYmWVnSdBwCECMySQJ5B2ir/dVcE=; b=dkX8WMSHT3KWiuHJg3Efe3t1iqDb2eYE2h2Us9mXG5vRbtK7UdDidmPwdai+cCxW++ 4ynIpgETHZkDFNxl1hSZBJuamvY3GJ0XwEHdY46QhPsW8ov9tigJ/wu8BoQhI5inLNSb oo6WX4h/OrUr+fm2kGmc7NYM4LVEIp+9UQ/uKeAn77cs5ZAl0rGRuV8Qo9XZjtJbqbDY i7O5I6DtoV1jJRRqC122tccHyk2P/Uw9ch4Oa9gR3By2i1tcTvyxuWxC9Vb/v0pMCscv xYYx62M5DL+eOU4D1KgBFzUMtWH+yD5S7TI0UIlFgSCOnUjSjIj+ModBNcY4I6xc4H1o F0vw== X-Gm-Message-State: AE9vXwP7Q4tGinslLMVhHSdLCULo6835wZwFLEQbNUMXZUq91GO7qabmHcbtsElivBYeaw== X-Received: by 10.98.56.207 with SMTP id f198mr12856189pfa.83.1472103356315; Wed, 24 Aug 2016 22:35:56 -0700 (PDT) Received: from calancha-pc ([103.5.140.138]) by smtp.gmail.com with ESMTPSA id cp11sm17669607pac.28.2016.08.24.22.35.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2016 22:35:55 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Thu, 25 Aug 2016 14:35:52 +0900 (JST) X-X-Sender: calancha@calancha-pc To: 24305@debbugs.gnu.org Subject: bug#24305: 25.1; dired can't replace '\n' in file content (dired-do-find-regexp-and-replace) Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24305 Cc: mc.maxcanal@gmail.com, tino.calancha@gmail.com, dgutov@yandex.ru X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Thank you for the report. As reported in NEWS file, since Emas 25.1 the key 'Q' is bound to a new command 'dired-do-find-regexp-and-replace'. The key 'A' is also bound to a new command: dired-do-find-regexp. The old commands use Emacs regexp engine, while the new commands use grep: this may cause that regexps which previously matched results, with the new commands don't match anymore. That seems the case in your example: the old command matches '\n', but the new one cannot: ;; old command (let ((file "/tmp/bug24305/file")) (with-temp-file file (insert "\n")) (dired-other-window (file-name-directory file)) (dired-goto-file file) (when (null (dired-do-search "\n")) (message "Found new line!"))) ;; new command (let ((file "/tmp/bug24305/file")) (with-temp-file file (insert "\n")) (dired-other-window (file-name-directory file)) (dired-goto-file file) (save-excursion (dired-mark 1)) (dired-do-find-regexp "\n")) In your example, 'dired-do-find-regexp-and-replace' internally builds the following `find' command (using `xref--rgrep-command'): find /tmp/bug24305 -type f \( -iname file \) -exec grep --color -i -nH -e '\n' {} + As you have noticed, this command fails. Following commands would work: find /tmp/bug24305 -type f \( -iname file \) -exec grep --color -i -nH -e '^$' {} + find /tmp/bug24305 -type f \( -iname file \) -exec grep --color -i -nH -e ' ' {} + Maybe `xref--rgrep-command' might be updated to account for this? In the meantime, as a temporary solution, you might wish to restore the previous bindings. For instance, adding following in your .emacs file: (require 'dired-aux) (define-key dired-mode-map "A" 'dired-do-search) (define-key dired-mode-map "Q" 'dired-do-query-replace-regexp) Tino From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 10:33:53 2016 Received: (at 24305) by debbugs.gnu.org; 25 Aug 2016 14:33:53 +0000 Received: from localhost ([127.0.0.1]:40722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcvj7-0001H5-1V for submit@debbugs.gnu.org; Thu, 25 Aug 2016 10:33:53 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40521) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcvj4-0001Gs-RV for 24305@debbugs.gnu.org; Thu, 25 Aug 2016 10:33:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcviu-0000Yc-6l for 24305@debbugs.gnu.org; Thu, 25 Aug 2016 10:33:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcvie-0000Rq-MH; Thu, 25 Aug 2016 10:33:24 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4369 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bcvid-0004Zf-Me; Thu, 25 Aug 2016 10:33:24 -0400 Date: Thu, 25 Aug 2016 17:33:42 +0300 Message-Id: <83mvk0ex4p.fsf@gnu.org> From: Eli Zaretskii To: Tino Calancha In-reply-to: (message from Tino Calancha on Thu, 25 Aug 2016 14:35:52 +0900 (JST)) Subject: Re: bug#24305: 25.1; dired can't replace '\n' in file content (dired-do-find-regexp-and-replace) References: <877fb53j8i.fsf@gmail.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 24305 Cc: mc.maxcanal@gmail.com, dgutov@yandex.ru, 24305@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) > From: Tino Calancha > Date: Thu, 25 Aug 2016 14:35:52 +0900 (JST) > Cc: mc.maxcanal@gmail.com, dgutov@yandex.ru, tino.calancha@gmail.com > > As reported in NEWS file, since Emas 25.1 the key 'Q' is bound > to a new command 'dired-do-find-regexp-and-replace'. The key 'A' > is also bound to a new command: dired-do-find-regexp. > > The old commands use Emacs regexp engine, while the new commands > use grep: this may cause that regexps which previously > matched results, with the new commands don't match anymore. > > That seems the case in your example: the old command matches '\n', but > the new one cannot: The doc string says: REGEXP should use constructs supported by your local ‘grep’ command. IOW, the '\n' should be replaced by something Grep supports, like $ or some such (I don't think I understand the exact use case to give a 100% accurate advice). In any case, this is a duplicate of bug#23426, which see (well, the beginning, before the discussion went haywire). From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 25 11:34:26 2016 Received: (at control) by debbugs.gnu.org; 25 Aug 2016 15:34:26 +0000 Received: from localhost ([127.0.0.1]:40786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcwfi-0002m3-3W for submit@debbugs.gnu.org; Thu, 25 Aug 2016 11:34:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57127) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bcwfg-0002lp-Q1 for control@debbugs.gnu.org; Thu, 25 Aug 2016 11:34:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bcwfa-0002YL-PL for control@debbugs.gnu.org; Thu, 25 Aug 2016 11:34:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bcwfa-0002Xx-MS for control@debbugs.gnu.org; Thu, 25 Aug 2016 11:34:18 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1bcwfZ-0004vS-Bk for control@debbugs.gnu.org; Thu, 25 Aug 2016 11:34:17 -0400 Subject: control message for bug 24305 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Thu, 25 Aug 2016 11:34:17 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) unarchive 23426 forcemerge 23426 24305 From unknown Tue Jun 17 22:24:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 23 Sep 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator