all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#31646: 25.3; dired gets confused if filename contains linefeed char (\u000a) or (0x0a)
@ 2018-05-29 17:11 Blaubogi
  2018-05-29 17:59 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Blaubogi @ 2018-05-29 17:11 UTC (permalink / raw)
  To: 31646

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

Hello,

If a filename contains a linefeed character, dired does not escape it. Instead dired shows it in the buffer which make the remaining characters of the name appear on the beginning of the next line. (using linefeed with code 0x0A or unicode \u000a)

  -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 ffff
  -rwxrwxrwx 1 root    4 29.05.2018 18:42:22 test
test
  -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 vtvt

This causes all kinds of trouble:
- file can't be deleted
- regular expression for file recognition doesn't work any longer:
'no file on this line'
- hide-details mode does not show ANY files in this dir
- probably more

System:
In GNU Emacs 25.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.20.10)
of 2018-05-25 built on lamb08
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description: openSUSE Leap 42.3

ext4 filesystem.

To reproduce:
Using ruby I created a file like this:

dir = "/mnt/loop0/test"
fname = "test" + "\u000a" + "test"
File.open(File.join(dir, fname), "w") { |fd| fd.write("test") }

M-x dired /mnt/loop0/test

I didn't test emacs under Microsoft Windows.
I did test using ntfs filesystem instead of ext4 which makes no difference.

Best regards

Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.

[-- Attachment #2: Type: text/html, Size: 2100 bytes --]

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

* bug#31646: 25.3; dired gets confused if filename contains linefeed char (\u000a) or (0x0a)
  2018-05-29 17:11 bug#31646: 25.3; dired gets confused if filename contains linefeed char (\u000a) or (0x0a) Blaubogi
@ 2018-05-29 17:59 ` Eli Zaretskii
  2020-08-23  1:35   ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2018-05-29 17:59 UTC (permalink / raw)
  To: Blaubogi; +Cc: 31646

> Date: Tue, 29 May 2018 13:11:30 -0400
> From: Blaubogi <blaubogi@protonmail.com>
> 
> If a filename contains a linefeed character, dired does not escape it. Instead dired shows it in the buffer which
> make the remaining characters of the name appear on the beginning of the next line. (using linefeed with code
> 0x0A or unicode \u000a)
> 
>   -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 ffff
>   -rwxrwxrwx 1 root    4 29.05.2018 18:42:22 test
> test
>   -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 vtvt
> 
> This causes all kinds of trouble:
> - file can't be deleted
> - regular expression for file recognition doesn't work any longer:
> 'no file on this line'
> - hide-details mode does not show ANY files in this dir
> - probably more

Did you try adding -b to dired-listing-switches?





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

* bug#31646: 25.3; dired gets confused if filename contains linefeed char (\u000a) or (0x0a)
  2018-05-29 17:59 ` Eli Zaretskii
@ 2020-08-23  1:35   ` Stefan Kangas
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2020-08-23  1:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Blaubogi, 31646-done

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Tue, 29 May 2018 13:11:30 -0400
>> From: Blaubogi <blaubogi@protonmail.com>
>>
>> If a filename contains a linefeed character, dired does not escape it. Instead dired shows it in the buffer which
>> make the remaining characters of the name appear on the beginning of the next line. (using linefeed with code
>> 0x0A or unicode \u000a)
>>
>>   -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 ffff
>>   -rwxrwxrwx 1 root    4 29.05.2018 18:42:22 test
>> test
>>   -rwxrwxrwx 1 root    4 29.05.2018 12:37:14 vtvt
>>
>> This causes all kinds of trouble:
>> - file can't be deleted
>> - regular expression for file recognition doesn't work any longer:
>> 'no file on this line'
>> - hide-details mode does not show ANY files in this dir
>> - probably more
>
> Did you try adding -b to dired-listing-switches?

More information was requested, but none was given within over 2 years,
so I'm closing this bug.  If this is still an issue, please reply to
this email (use "Reply to all" in your email client) and we can reopen
the bug report.

Best regards,
Stefan Kangas





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

end of thread, other threads:[~2020-08-23  1:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-29 17:11 bug#31646: 25.3; dired gets confused if filename contains linefeed char (\u000a) or (0x0a) Blaubogi
2018-05-29 17:59 ` Eli Zaretskii
2020-08-23  1:35   ` Stefan Kangas

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.