unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
@ 2021-05-25 20:40 Rodrigo Morales
  2021-05-26 12:14 ` Eli Zaretskii
  2021-05-29 13:39 ` Andreas Schwab
  0 siblings, 2 replies; 24+ messages in thread
From: Rodrigo Morales @ 2021-05-25 20:40 UTC (permalink / raw)
  To: 48659


* 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.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-25 20:40 bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Rodrigo Morales
@ 2021-05-26 12:14 ` Eli Zaretskii
  2021-05-26 15:16   ` Rodrigo Morales
  2021-05-27 14:01   ` Michael Heerdegen
  2021-05-29 13:39 ` Andreas Schwab
  1 sibling, 2 replies; 24+ messages in thread
From: Eli Zaretskii @ 2021-05-26 12:14 UTC (permalink / raw)
  To: Rodrigo Morales; +Cc: 48659

> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
> Date: Tue, 25 May 2021 15:40:21 -0500
> 
> 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.

I cannot reproduce this.  Which version of Emacs is this, and on what
platform/OS?  Also, does the problem happen for you in "emacs -Q"?





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-26 12:14 ` Eli Zaretskii
@ 2021-05-26 15:16   ` Rodrigo Morales
  2021-05-26 17:18     ` Eli Zaretskii
  2021-05-27 14:01   ` Michael Heerdegen
  1 sibling, 1 reply; 24+ messages in thread
From: Rodrigo Morales @ 2021-05-26 15:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 48659

Eli Zaretskii <eliz@gnu.org> writes:

> I cannot reproduce this.  Which version of Emacs is this, and on what
> platform/OS?  Also, does the problem happen for you in "emacs -Q"?

When I reported the bug, I had only tried it in a running Emacs instance
(i.e. my configurations had been loaded).

However, I've just tried reproducing the issue in "emacs -Q" and I
can reproduce it.

I'm using GNU Emacs 27.2 in Arch Linux.

If you can't reproduce it, I can provide a WEBM, just let me know.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-26 15:16   ` Rodrigo Morales
@ 2021-05-26 17:18     ` Eli Zaretskii
       [not found]       ` <871r9tdp99.fsf@gmail.com>
  2021-05-27  9:14       ` Robert Pluim
  0 siblings, 2 replies; 24+ messages in thread
From: Eli Zaretskii @ 2021-05-26 17:18 UTC (permalink / raw)
  To: Rodrigo Morales; +Cc: 48659

> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
> Cc: 48659@debbugs.gnu.org
> Date: Wed, 26 May 2021 10:16:55 -0500
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I cannot reproduce this.  Which version of Emacs is this, and on what
> > platform/OS?  Also, does the problem happen for you in "emacs -Q"?
> 
> When I reported the bug, I had only tried it in a running Emacs instance
> (i.e. my configurations had been loaded).
> 
> However, I've just tried reproducing the issue in "emacs -Q" and I
> can reproduce it.
> 
> I'm using GNU Emacs 27.2 in Arch Linux.

I tried also Emacs 27.2 on Trisquel.

Can anyone else reproduce this strange problem?  I don't see how we
could debug this without being able to reproduce.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
       [not found]       ` <871r9tdp99.fsf@gmail.com>
@ 2021-05-27  7:04         ` Eli Zaretskii
  2021-05-29  6:29           ` Arthur Miller
  0 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2021-05-27  7:04 UTC (permalink / raw)
  To: Rodrigo Morales; +Cc: 48659

> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
> Cc: 48659@debbugs.gnu.org
> Date: Wed, 26 May 2021 18:55:14 -0500
> 
> > Can anyone else reproduce this strange problem?  I don't see how we
> > could debug this without being able to reproduce.
> 
> Here you have two recordings that might make things clearer. Perhaps, I
> wasn't clear enough in the first messaage I sent and that's why you are
> not able to reproduce it, so I hope these recordings will present more
> context regarding this "possible bug".
> 
> In the following GIF, you can see that spaces are removed after having
> finished editing the dired buffer through "dired-toggle-read-only". This
> can be seen in the output of the "watch" command that is shown in the
> running shell at the right side.

I believe you.  I just don't see this in the GNU/Linux system where I
tried this (and also on MS-Windows, FWIW).  In my testing the file
names remain intact after "C-x C-q", including the space characters.

So either the recipe is not complete, or I somehow didn't follow it
100%, or something else is at work on your system that doesn't happen
on mine.  Thus my question whether someone else sees that who could
then debug the problem.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-26 17:18     ` Eli Zaretskii
       [not found]       ` <871r9tdp99.fsf@gmail.com>
@ 2021-05-27  9:14       ` Robert Pluim
  2021-05-27  9:34         ` Eli Zaretskii
  2021-05-27 13:50         ` Michael Heerdegen
  1 sibling, 2 replies; 24+ messages in thread
From: Robert Pluim @ 2021-05-27  9:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Rodrigo Morales, 48659

>>>>> On Wed, 26 May 2021 20:18:15 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
    >> Cc: 48659@debbugs.gnu.org
    >> Date: Wed, 26 May 2021 10:16:55 -0500
    >> 
    >> Eli Zaretskii <eliz@gnu.org> writes:
    >> 
    >> > I cannot reproduce this.  Which version of Emacs is this, and on what
    >> > platform/OS?  Also, does the problem happen for you in "emacs -Q"?
    >> 
    >> When I reported the bug, I had only tried it in a running Emacs instance
    >> (i.e. my configurations had been loaded).
    >> 
    >> However, I've just tried reproducing the issue in "emacs -Q" and I
    >> can reproduce it.
    >> 
    >> I'm using GNU Emacs 27.2 in Arch Linux.

    Eli> I tried also Emacs 27.2 on Trisquel.

    Eli> Can anyone else reproduce this strange problem?  I don't see how we
    Eli> could debug this without being able to reproduce.

I can reproduce this on Debian 10, with:

find --version
find (GNU findutils) 4.8.0

Something is definitely going wrong, because after exiting read-write
mode with wdired-finish-edit I end up with *Find* buffer containing
only the header lines:

  /tmp/48659:
  789065 4 drwxr-xr-x 4 rpluim rpluim 4096 May 27 10:57 /tmp/48659/

(but this happens even when the file names involved donʼt have spaces,
so perhaps itʼs a more generic issue).

Robert
-- 





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27  9:14       ` Robert Pluim
@ 2021-05-27  9:34         ` Eli Zaretskii
  2021-05-27 13:50         ` Michael Heerdegen
  1 sibling, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2021-05-27  9:34 UTC (permalink / raw)
  To: Robert Pluim; +Cc: moralesrodrigo1100, 48659

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Rodrigo Morales <moralesrodrigo1100@gmail.com>,  48659@debbugs.gnu.org
> Date: Thu, 27 May 2021 11:14:50 +0200
> 
>     Eli> Can anyone else reproduce this strange problem?  I don't see how we
>     Eli> could debug this without being able to reproduce.
> 
> I can reproduce this on Debian 10, with:
> 
> find --version
> find (GNU findutils) 4.8.0
> 
> Something is definitely going wrong, because after exiting read-write
> mode with wdired-finish-edit I end up with *Find* buffer containing
> only the header lines:
> 
>   /tmp/48659:
>   789065 4 drwxr-xr-x 4 rpluim rpluim 4096 May 27 10:57 /tmp/48659/
> 
> (but this happens even when the file names involved donʼt have spaces,
> so perhaps itʼs a more generic issue).

Can you tell which code renames the files?





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27  9:14       ` Robert Pluim
  2021-05-27  9:34         ` Eli Zaretskii
@ 2021-05-27 13:50         ` Michael Heerdegen
  1 sibling, 0 replies; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 13:50 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Rodrigo Morales, 48659

Robert Pluim <rpluim@gmail.com> writes:

> I can reproduce this on Debian 10, with:
>
> find --version
> find (GNU findutils) 4.8.0
>
> Something is definitely going wrong, because after exiting read-write
> mode with wdired-finish-edit I end up with *Find* buffer containing
> only the header lines:
>
>   /tmp/48659:
>   789065 4 drwxr-xr-x 4 rpluim rpluim 4096 May 27 10:57 /tmp/48659/
>
> (but this happens even when the file names involved donʼt have spaces,
> so perhaps itʼs a more generic issue).

I think it's a different issue.  AFAIR reverting a find-dired buffer
after making changes with wdired never worked correctly, the buffer
contents never reflected the changes correctly, at least in the last
years.

But nevertheless I use this feature combination myself regularly, and I
never saw wdired performing unintended operations.

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-26 12:14 ` Eli Zaretskii
  2021-05-26 15:16   ` Rodrigo Morales
@ 2021-05-27 14:01   ` Michael Heerdegen
  2021-05-27 14:04     ` Eli Zaretskii
  1 sibling, 1 reply; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 14:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Rodrigo Morales, 48659

Eli Zaretskii <eliz@gnu.org> writes:

> I cannot reproduce this.  Which version of Emacs is this, and on what
> platform/OS?  Also, does the problem happen for you in "emacs -Q"?

I can reproduce the issue with my Emacs master built as described by the
OP using emacs -Q.

For me only file names that were actually edited get the space char
removed (master may behave differently here because wdired had been
changed recently to avoid the initial delay in large dired buffers when
entering wdired, that may have an effect, but I don't expect it's
related otherwise).

If I have a file line

 a\ b

and change it to

 aa\ b

and confirm, the resulting name will be

 aab

with the space removed.  It's not only the buffer where the name is
printed incorrectly - the file name has indeed been changed incorrectly.

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 14:01   ` Michael Heerdegen
@ 2021-05-27 14:04     ` Eli Zaretskii
  2021-05-27 14:16       ` Michael Heerdegen
  2021-05-27 15:38       ` Andreas Schwab
  0 siblings, 2 replies; 24+ messages in thread
From: Eli Zaretskii @ 2021-05-27 14:04 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: moralesrodrigo1100, 48659

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: Rodrigo Morales <moralesrodrigo1100@gmail.com>,  48659@debbugs.gnu.org
> Date: Thu, 27 May 2021 16:01:49 +0200
> 
> For me only file names that were actually edited get the space char
> removed (master may behave differently here because wdired had been
> changed recently to avoid the initial delay in large dired buffers when
> entering wdired, that may have an effect, but I don't expect it's
> related otherwise).

So the problem is somewhere in wdired.  Analysis and patches are welcome.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 14:04     ` Eli Zaretskii
@ 2021-05-27 14:16       ` Michael Heerdegen
  2021-05-27 14:48         ` Andreas Schwab
  2021-05-27 15:04         ` Andreas Schwab
  2021-05-27 15:38       ` Andreas Schwab
  1 sibling, 2 replies; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 14:16 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Andreas Schwab, moralesrodrigo1100, 48659

Eli Zaretskii <eliz@gnu.org> writes:

> So the problem is somewhere in wdired.  Analysis and patches are
> welcome.

It's `wdired-get-filename' that returns the file-name with the space
chars removed, and that seems to be due to this commit:

  02bf7cc463, Properly handle unquoting in wdired (bug 22938)

CC'ing the author Andreas Schwab.


Regards,

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 14:16       ` Michael Heerdegen
@ 2021-05-27 14:48         ` Andreas Schwab
  2021-05-27 15:04         ` Andreas Schwab
  1 sibling, 0 replies; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 14:48 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: moralesrodrigo1100, 48659

On Mai 27 2021, Michael Heerdegen wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> So the problem is somewhere in wdired.  Analysis and patches are
>> welcome.
>
> It's `wdired-get-filename' that returns the file-name with the space
> chars removed, and that seems to be due to this commit:
>
>   02bf7cc463, Properly handle unquoting in wdired (bug 22938)
>
> CC'ing the author Andreas Schwab.

Looks like a bug in dired-get-filename.

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 14:16       ` Michael Heerdegen
  2021-05-27 14:48         ` Andreas Schwab
@ 2021-05-27 15:04         ` Andreas Schwab
  2021-05-27 15:31           ` Michael Heerdegen
  1 sibling, 1 reply; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 15:04 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: moralesrodrigo1100, 48659

On Mai 27 2021, Michael Heerdegen wrote:

>   02bf7cc463, Properly handle unquoting in wdired (bug 22938)

Why do you think this commit has any influence?

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 15:04         ` Andreas Schwab
@ 2021-05-27 15:31           ` Michael Heerdegen
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 15:31 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: moralesrodrigo1100, 48659

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Mai 27 2021, Michael Heerdegen wrote:
>
> >   02bf7cc463, Properly handle unquoting in wdired (bug 22938)
>
> Why do you think this commit has any influence?

It was a guess, and I thought I had verified that guess, but it seems my
testing was too much in a hurry and I was wrong.

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 14:04     ` Eli Zaretskii
  2021-05-27 14:16       ` Michael Heerdegen
@ 2021-05-27 15:38       ` Andreas Schwab
  2021-05-27 15:47         ` Michael Heerdegen
                           ` (2 more replies)
  1 sibling, 3 replies; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 15:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Heerdegen, moralesrodrigo1100, 48659

wdired-normalize-filename doesn't handle "\\ ".

(read "\"\\ \"") => ""

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 15:38       ` Andreas Schwab
@ 2021-05-27 15:47         ` Michael Heerdegen
  2021-05-27 15:57           ` Andreas Schwab
  2021-05-27 15:56         ` Andreas Schwab
  2021-05-27 18:49         ` Michael Heerdegen
  2 siblings, 1 reply; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 15:47 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: moralesrodrigo1100, 48659

Andreas Schwab <schwab@linux-m68k.org> writes:

> wdired-normalize-filename doesn't handle "\\ ".
>
> (read "\"\\ \"") => ""

Indeed:

  (wdired-normalize-filename "a\\ b" 'unquotep) ==> "ab"

- that's the culprit.

But now I don't understand why `read' behaves that way.


Regards,

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 15:38       ` Andreas Schwab
  2021-05-27 15:47         ` Michael Heerdegen
@ 2021-05-27 15:56         ` Andreas Schwab
  2021-05-27 18:49         ` Michael Heerdegen
  2 siblings, 0 replies; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 15:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Michael Heerdegen, moralesrodrigo1100, 48659

This is really the same as bug#10469.

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 15:47         ` Michael Heerdegen
@ 2021-05-27 15:57           ` Andreas Schwab
  0 siblings, 0 replies; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 15:57 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: moralesrodrigo1100, 48659

On Mai 27 2021, Michael Heerdegen wrote:

> But now I don't understand why `read' behaves that way.

It follows Lisp rules.

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 15:38       ` Andreas Schwab
  2021-05-27 15:47         ` Michael Heerdegen
  2021-05-27 15:56         ` Andreas Schwab
@ 2021-05-27 18:49         ` Michael Heerdegen
  2021-05-27 19:11           ` Andreas Schwab
  2 siblings, 1 reply; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 18:49 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: moralesrodrigo1100, 48659

Andreas Schwab <schwab@linux-m68k.org> writes:

> wdired-normalize-filename doesn't handle "\\ ".

I have two questions:

(1) Although a comment before `wdired-normalize-filename' tells that
"This code is a copy of some dired-get-filename lines.", the unquoting
stuff seems to be implemented differently than in `dired-get-filename'.
Could we reuse the code from that function?  `dired-get-filename'
doesn't seem to delete the spaces from the file names.

(2) AFAICT your commit (that I had cited above) addressed the comment
from Stefan he had added to the definition of
`wdired-normalize-filename':

   ;; FIXME: shouldn't we check for a `b' argument or somesuch
   ;; before doing such unquoting?  --Stef

Can we delete that comment?  That check is performed now and the
function receives the result as an argument UNQUOTEP now.


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 18:49         ` Michael Heerdegen
@ 2021-05-27 19:11           ` Andreas Schwab
  2021-05-27 20:38             ` Michael Heerdegen
  0 siblings, 1 reply; 24+ messages in thread
From: Andreas Schwab @ 2021-05-27 19:11 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: moralesrodrigo1100, 48659

See bug#10469.

Andreas.

-- 
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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27 19:11           ` Andreas Schwab
@ 2021-05-27 20:38             ` Michael Heerdegen
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-27 20:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: moralesrodrigo1100, 48659

Andreas Schwab <schwab@linux-m68k.org> writes:

> See bug#10469.

Thanks.  I'm sure that report includes the answer to my question, but
I'm not so sure where.

I mean - that had been fixed, at least the reported issue - it's now
possible to visit files whose names include spaces in find-dired
buffers.

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-27  7:04         ` Eli Zaretskii
@ 2021-05-29  6:29           ` Arthur Miller
  0 siblings, 0 replies; 24+ messages in thread
From: Arthur Miller @ 2021-05-29  6:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Rodrigo Morales, 48659

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
>> Cc: 48659@debbugs.gnu.org
>> Date: Wed, 26 May 2021 18:55:14 -0500
>> 
>> > Can anyone else reproduce this strange problem?  I don't see how we
>> > could debug this without being able to reproduce.
>> 
>> Here you have two recordings that might make things clearer. Perhaps, I
>> wasn't clear enough in the first messaage I sent and that's why you are
>> not able to reproduce it, so I hope these recordings will present more
>> context regarding this "possible bug".
>> 
>> In the following GIF, you can see that spaces are removed after having
>> finished editing the dired buffer through "dired-toggle-read-only". This
>> can be seen in the output of the "watch" command that is shown in the
>> running shell at the right side.
>
> I believe you.  I just don't see this in the GNU/Linux system where I
> tried this (and also on MS-Windows, FWIW).  In my testing the file
> names remain intact after "C-x C-q", including the space characters.
>
> So either the recipe is not complete, or I somehow didn't follow it
> 100%, or something else is at work on your system that doesn't happen
> on mine.  Thus my question whether someone else sees that who could
> then debug the problem.

If it is of any worth, I am using 27.1 on Win 10 and 28.0.50 compiled on
27th march on Arch Linux and I can't reproduce either. Spaces in names
seems correctly preserved on my machine.





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-25 20:40 bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Rodrigo Morales
  2021-05-26 12:14 ` Eli Zaretskii
@ 2021-05-29 13:39 ` Andreas Schwab
  2021-05-29 23:09   ` Michael Heerdegen
  1 sibling, 1 reply; 24+ messages in thread
From: Andreas Schwab @ 2021-05-29 13:39 UTC (permalink / raw)
  To: Rodrigo Morales; +Cc: 48659-done

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."





^ permalink raw reply	[flat|nested] 24+ messages in thread

* bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer
  2021-05-29 13:39 ` Andreas Schwab
@ 2021-05-29 23:09   ` Michael Heerdegen
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Heerdegen @ 2021-05-29 23:09 UTC (permalink / raw)
  To: 48659; +Cc: schwab, moralesrodrigo1100

Andreas Schwab <schwab@linux-m68k.org> writes:

> Should be fixed now.

I can confirm that it's fixed on master.  Thanks Andreas!

Michael.





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-05-29 23:09 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-25 20:40 bug#48659: Escapes are deleted after executing "dired-toggle-read-only" in *Find* buffer Rodrigo Morales
2021-05-26 12:14 ` Eli Zaretskii
2021-05-26 15:16   ` Rodrigo Morales
2021-05-26 17:18     ` Eli Zaretskii
     [not found]       ` <871r9tdp99.fsf@gmail.com>
2021-05-27  7:04         ` Eli Zaretskii
2021-05-29  6:29           ` Arthur Miller
2021-05-27  9:14       ` Robert Pluim
2021-05-27  9:34         ` Eli Zaretskii
2021-05-27 13:50         ` Michael Heerdegen
2021-05-27 14:01   ` Michael Heerdegen
2021-05-27 14:04     ` Eli Zaretskii
2021-05-27 14:16       ` Michael Heerdegen
2021-05-27 14:48         ` Andreas Schwab
2021-05-27 15:04         ` Andreas Schwab
2021-05-27 15:31           ` Michael Heerdegen
2021-05-27 15:38       ` Andreas Schwab
2021-05-27 15:47         ` Michael Heerdegen
2021-05-27 15:57           ` Andreas Schwab
2021-05-27 15:56         ` Andreas Schwab
2021-05-27 18:49         ` Michael Heerdegen
2021-05-27 19:11           ` Andreas Schwab
2021-05-27 20:38             ` Michael Heerdegen
2021-05-29 13:39 ` Andreas Schwab
2021-05-29 23:09   ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).