emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48659: closed (Escapes are deleted after executing "dired-toggle-rea


From: GNU bug Tracking System
Subject: bug#48659: closed (Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer)
Date: Sat, 29 May 2021 13:40:01 +0000

Your message dated Sat, 29 May 2021 15:39:39 +0200
with message-id <87k0nhk6as.fsf@igel.home>
and subject line Re: bug#48659: Escapes are deleted after executing 
"dired-toggle-read-only" in *Find* buffer
has caused the debbugs.gnu.org bug report #48659,
regarding Escapes are deleted after executing "dired-toggle-read-only" in 
*Find* buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48659: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48659
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Date: Tue, 25 May 2021 15:40:21 -0500
* The context

By default, when executing =find-dired=, 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
  
  find finished at Tue May 25 15:25:42
#+END_EXAMPLE

This happens because that's the default behavior of =find= 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 =dired-toggle-read-only= 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
.
├── a
│   ├── bar bar.txt
│   └── foo foo.txt
└── b
    ├── bar bar.txt
    └── foo foo.txt
#+end_example

Let's execute =find-dired= and let's list the files (i.e. =-type
f=). The buffer =*Find*= 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
  
  find finished at Tue May 25 15:30:49
#+end_example

Now, let's toggle a =dired-toggle-read-only= and edit any name (I
appended =test= after the =a/barbar.txt= file).

Now, see what =tree= reports.

#+begin_src bash
tree -a --noreport
#+end_src

#+RESULTS:
#+begin_example
.
├── a
│   ├── barbar.txt-test
│   └── foofoo.txt
└── b
    ├── barbar.txt
    └── foofoo.txt
#+end_example

As you could see, spaces were removed from filenames and I think that
this happens because =find-file= show spaces as escaped characters.



--- End Message ---
--- Begin Message --- Subject: Re: bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Date: Sat, 29 May 2021 15:39:39 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Should be fixed now.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]