Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Why
Plain file names in ls -R have stopped to work. I suspect it is
because the file names are not found due to that tab separation is
assumed. I don't know what has changed but in my shell-mode ls -R only
use space between the files.
Removing the special treatment for shell-mode resolves the issue
partially and it is what this PR does. For folders that does not
contain files with names having whitespace this fix works.
Note
As pointed out above there are other issues with ls -R listings. If
there are files with space in their name the quotes produces by ls
causes problems since hpath:delimited-possible-path can't handle
that.
The quotes does further harm in that when clicking on other files the
quote are found by the regexps and we get a list of files instead of
just one file.
The last problematic case is that the ls listing gets indented one
space because of quotes in file names and the current regexp does not
handle that gracefully. (That might be possible to solve locally but
to much for me today. Might give it a try but since it is part of the
quote problem just fixing that might not make sense.)
Reflection
Can it be that this and the related functions have to much
responsibilities? Looking for patterns only seen in info, tex, html
while being in shell-mode seems to be redundant. Can we not make the
task easier by earlier realizing that we are in shell-mode and maybe
use adjusted pathname functions that knows about that!?
Anyway, something to discuss.
I'm submitting this as documentation and as a potential fix for the
case with folders that only contains filenames with no whitespaces. So
a step in the right direction.