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

dired-subtree-insert doesn't work when cursor on '.' or '..' (with fix) #164

Open
notuntoward opened this issue Nov 21, 2019 · 2 comments
Open

Comments

@notuntoward
Copy link

On line 489 of dired-subtree.el, the code:

(let* ((dir-name (dired-get-filename nil))

should be:

(let* ((dir-name (dired-get-filename nil t))

If 't' is included in the arguments of dired-get-filename then dired-subtree-insert works when the cursor is on '.' or '..'. Without the 't', it errors out.

The call to dired-get-filename is correct elsewhere.

@Fuco1
Copy link
Owner

Fuco1 commented Nov 21, 2019

Is that a desirable behaviour? Maybe testing if a nil wasn't returned would be better. Is there a practical use-case for inserting a subtree for .? If you think there is I don't object much, but to me I don't see it.

I actually use a filter to hide . and .. in dired, never used them in the last 5 or so years I wrote dired-filter.

@notuntoward
Copy link
Author

notuntoward commented Nov 22, 2019

Thanks for the response. Actually, I'm may not need this code change, but making the change anyway wouldn't hurt anything, and would avoid the risk more issue reports from people like me.

My original idea was to use dired-subtree-toggle to toggle .. , which doesn't work with the current version of dired-subtree-insert. However, after I changed dired-subtree-insert to make this possible, and then used my .. displaying dired for a couple days, I decided that I didn't love it.

Also, I'll have a look at dired-filter.

@Fuco1 Fuco1 added this to Triage Mar 18, 2024
@github-project-automation github-project-automation bot moved this to To triage in Triage Mar 18, 2024
@Fuco1 Fuco1 moved this from To triage to Backlog in Triage Mar 18, 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

2 participants