Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move directory and file in dired-collapse #144

Open
azzamsa opened this issue Jan 30, 2019 · 5 comments
Open

Move directory and file in dired-collapse #144

azzamsa opened this issue Jan 30, 2019 · 5 comments

Comments

@azzamsa
Copy link

azzamsa commented Jan 30, 2019

Hi

2019-01-30-20 59 15

In the example above: 'gitlab-api' directory & 'tlsqlite-directory' only contain one file, so that dired-collapse collapse it. But not 'mwe' because it contains more than one files.

If we perform dired-ranger-copy in 'gitlab-api' only the file that copied, so we have to move the file and dir one by one. then re-arrange the structure again ('gitlab-api/file') in the destination dir.

Can we perform copy its directory/andfile when directory collapsed (like default behavior in ordinary / non collapsed dir ) ?

Thanks.

@Fuco1
Copy link
Owner

Fuco1 commented Jan 30, 2019

I think it might be too aggresive to work on the whole tree. Sometimes people just want to remove the file and keep the hierarchy intact.

To be fair I almost never want to do that... so maybe we could bite the bullet and implement the agressive version by default. Deleting empty directories is not something people can't easily recover from after all.

@azzamsa
Copy link
Author

azzamsa commented Jan 30, 2019

Sure, thanks :)

I think it might be too aggresive to work on the whole tree. Sometimes people just want to remove the file and keep the hierarchy intact.

I mean, isn't this the default dired behavior ? When user doing 'ranger-copy' on parent dir, the child content and the parent should copied too, not only the content.

My current workflow is: to disable collapse-mode before doing ranger-copy.

I see you did use dired-collapse, So how do you handle this situation ? did you disable dired-collapse before copying ?

@azzamsa
Copy link
Author

azzamsa commented Jan 30, 2019

I will add the example here, I am worried of miscommunication.

foo/foofile.org    <- collapsed
bar/barfile1.org barfile2.org    <- uncollapsed

If we do ranger-copy in bar the whole structure including bar are copied to kill ring, then ranger-paste will paste the whole structure in destination dir. I think this also the default behaviour in vanilla dired when we do move operation.

But why when dired-collapse activated, then we do dired-copy in foo, only foofile.org is copied, not including foo. So we have to copy/move one-by-one (copy foofile, move it, copy foo, move foo), it's also apply to deletion (delete under foo point, foofile deleted, but not foo).

Hope this will make my current situation clear :)

@cpitclaudel
Copy link

This is a great suggestion (for move, but for delete as well); maybe it could be made a setting or C-u could be used as a switch.

@Fuco1 Fuco1 self-assigned this Feb 26, 2019
@Fuco1 Fuco1 removed their assignment Mar 25, 2024
@Fuco1
Copy link
Owner

Fuco1 commented Apr 3, 2024

This is duplicate of #93

@Fuco1 Fuco1 added the duplicate label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

3 participants