-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix(dired-noselect): Support both lists and strings #257
base: main
Are you sure you want to change the base?
Conversation
This will fix #249 |
Dired supports both strings and lists in dired-noselect. oantolin/embark#701
I've pushed a revised solution as both the car of the list and the list itself are sometimes required depending on the function in the question. |
64464df
to
8d047a2
Compare
((functionp dired-auto-revert-buffer) | ||
(when (funcall dired-auto-revert-buffer dir) (revert-buffer)))) | ||
((functionp dired-auto-revert-buffer) | ||
(when (funcall dired-auto-revert-buffer dir) (revert-buffer)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whitespace change is perhaps a little overzealous. I can remove if preferred.
"Return buffer for DIR with FLAGS, FN is `dired-noselect'." | ||
(let* ((key (file-name-as-directory (expand-file-name dir))) | ||
(let* ((dir (if (consp dir-or-list) (car dir-or-list) dir-or-list)) | ||
(key (file-name-as-directory (expand-file-name dir))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call to expand-file-name
expects a string.
Dired supports both strings and lists in dired-noselect.
oantolin/embark#701