From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Rodrigo Morales Newsgroups: gmane.emacs.bugs Subject: bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Date: Tue, 25 May 2021 15:40:21 -0500 Message-ID: <87mtsi35u2.fsf@gmail.com> 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="25520"; mail-complaints-to="usenet@ciao.gmane.io" To: 48659@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 22:55:19 2021 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 1lle58-0006Wp-UV for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 22:55:19 +0200 Original-Received: from localhost ([::1]:59218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lle54-0002fK-6x for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 16:55:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lle3v-0001MJ-Hg for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 16:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lle3u-0005Mo-SY for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 16:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lle3u-0002PR-Ro for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 16:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rodrigo Morales Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48659 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16219760029183 (code B ref -1); Tue, 25 May 2021 20:54:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 May 2021 20:53:22 +0000 Original-Received: from localhost ([127.0.0.1]:47171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lle3F-0002O2-RP for submit@debbugs.gnu.org; Tue, 25 May 2021 16:53:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:34196) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lldwI-00014w-VV for submit@debbugs.gnu.org; Tue, 25 May 2021 16:46:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lldwI-0002AH-O2 for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 16:46:10 -0400 Original-Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:39715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lldw9-0000dU-NO for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 16:46:10 -0400 Original-Received: by mail-qv1-xf34.google.com with SMTP id eb9so16749564qvb.6 for ; Tue, 25 May 2021 13:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=oT8OabDJAmhcul2bFeXlBg0hzJzvcm2mLmyVtC5LslQ=; b=MMMuNWBlbdp+sQDMHFjYIsiI9g0SmJhS94/ZF7RLMvjiq9IpLA/w+yDxbFQ4cSLU9O mZg5SrcLgTM1d8XvzbLZJUnpZatMppJTq+jaVGdJsQAJ3h7XKL7KewlZJ3/iZaw1yANd dV9Nl+Nx4EKCQeCmeA5VdaDeFljDUak5b3Or7Obtt7Kc2ocftPxiSEPlEq+BUruVXjOh G5JRLTykfCGSYCx9As8gVG+RUh1AF6HDhUklwkBHv8gtHvEvGHhbSwUWKfeVUio21af8 uqtSyzrlao/LVLmURBNrqVhyKGfpLPRYKn8GnAlbcVpPf323agGJZ9gLJxbKIihn73Zg ifbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=oT8OabDJAmhcul2bFeXlBg0hzJzvcm2mLmyVtC5LslQ=; b=T5KwlVB52qm/xlfFbKBkKMoE6DCGvifdnINDHY0YPDwUQrTdbFVnbG5l3oD8jkReBY 6FJ0BDaieKEN/zc3Q6RccZBqoxtRCz5kYtcY6hWgJPz307kFtCyreOAyEfgdchuj62Hp YcM0hbeTnLX2ZHWVzkkXFnaPTBnoIDNkloJvVHu0LZPP41mzqSFfgOn/QkxyVbnXgEXR GdIcLHXu+aJvS7NzgdyF88vsX67hqPNs5jJ+Hif+kmJtoB+Nyd3LxfEdbRqlx7jXrjbT z2aG51Fl3GeK8D+f/fYKSpDHucezDWvVVG/2PxkE5SAeUybFpf4cX43NtjEGpZQhkFaj acRg== X-Gm-Message-State: AOAM5321dhtyTQpwefRaIF9iGDVktwF3zy5kaEg5Hn4NXFyw4CrBPkG1 E/tKs3pK1RZcrL7GvUtFJIeU9QbNrUbPCQ== X-Google-Smtp-Source: ABdhPJyui0aRpYVQE4mlg4jFKcqeFpD+1tL/Cxm8ZjSrqVjw9NwR+m0QRjOp3f+1ugfqwFucbWEvqg== X-Received: by 2002:a05:6214:250f:: with SMTP id gf15mr39853808qvb.51.1621975560458; Tue, 25 May 2021 13:46:00 -0700 (PDT) Original-Received: from r1 ([190.239.232.58]) by smtp.gmail.com with ESMTPSA id n23sm225272qke.0.2021.05.25.13.45.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 13:45:59 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::f34; envelope-from=moralesrodrigo1100@gmail.com; helo=mail-qv1-xf34.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 25 May 2021 16:53:20 -0400 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:207265 Archived-At: * The context By default, when executing =3Dfind-dired=3D, spaces are escaped (see below) #+BEGIN_EXAMPLE /home/thisisme/e/: find . \( -type f \) -ls 29754046 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 a= /bar\ bar.txt 29753703 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 a= /foo\ foo.txt 29754079 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 b= /bar\ bar.txt 29754078 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 b= /foo\ foo.txt =20=20 find finished at Tue May 25 15:25:42 #+END_EXAMPLE This happens because that's the default behavior of =3Dfind=3D when we execute it in the command-line. #+begin_src bash find . \( -type f \) -ls #+end_src #+RESULTS: #+begin_example 29754078 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 ./b= /foo\ foo.txt 29754079 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 ./b= /bar\ bar.txt 29753703 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 ./a= /foo\ foo.txt 29754046 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:25 ./a= /bar\ bar.txt #+end_example * The issue This is causing =3Ddired-toggle-read-only=3D to remove spaces after finishing editing the buffer. I would consider this a bug, but let me explain this further so that we all can determine whether this is a bug or not. * Minimal reproducible example Let's suppose we have this directory #+begin_src bash mkdir {a,b} && touch {a,b}/{foo\ foo,bar\ bar}.txt #+end_src #+begin_src bash tree -a --noreport #+end_src #+RESULTS: #+begin_example . =E2=94=9C=E2=94=80=E2=94=80 a =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 bar bar.txt =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 foo foo.txt =E2=94=94=E2=94=80=E2=94=80 b =E2=94=9C=E2=94=80=E2=94=80 bar bar.txt =E2=94=94=E2=94=80=E2=94=80 foo foo.txt #+end_example Let's execute =3Dfind-dired=3D and let's list the files (i.e. =3D-type f=3D). The buffer =3D*Find*=3D would show the following #+begin_example /home/thisisme/e/: find . \( -type f \) -ls 29754046 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:30 a= /bar\ bar.txt 29753703 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:30 a= /foo\ foo.txt 29754079 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:30 b= /bar\ bar.txt 29754078 0 -rw-r--r-- 1 thisisme thisisme 0 May 25 15:30 b= /foo\ foo.txt =20=20 find finished at Tue May 25 15:30:49 #+end_example Now, let's toggle a =3Ddired-toggle-read-only=3D and edit any name (I appended =3Dtest=3D after the =3Da/barbar.txt=3D file). Now, see what =3Dtree=3D reports. #+begin_src bash tree -a --noreport #+end_src #+RESULTS: #+begin_example . =E2=94=9C=E2=94=80=E2=94=80 a =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 barbar.txt-test =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 foofoo.txt =E2=94=94=E2=94=80=E2=94=80 b =E2=94=9C=E2=94=80=E2=94=80 barbar.txt =E2=94=94=E2=94=80=E2=94=80 foofoo.txt #+end_example As you could see, spaces were removed from filenames and I think that this happens because =3Dfind-file=3D show spaces as escaped characters.