[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] image-dired-show-all-from-dir: reuse dired's default directo
From: |
Sacha Chua |
Subject: |
Re: [PATCH] image-dired-show-all-from-dir: reuse dired's default directory |
Date: |
Thu, 02 Jan 2025 17:17:13 -0500 |
Stefan Kangas <stefankangas@gmail.com> writes:
Hello, Stefan!
> Thanks for the patch, and interesting use case.
> I can't find the variable `dired-default-directory`, but I do see that a
> function of that name was removed in Emacs 27. Where did you find that
> variable, and which version of Emacs are you running? Could it be that
> this variable is from a third-party package?
Oh! That's a coincidence, I hadn't known that was used before. We can
call it temp-default-directory or something else if you prefer. I called it
dired-default-directory because I just needed to temporarily store the
default-directory from the dired buffer so that we could copy it to the
image-dired-thumbnail-buffer, which is why it's a let-bound variable.
>> - (let ((files (dired-get-marked-files nil nil nil t)))
>> + (let ((files (dired-get-marked-files nil nil nil t))
>> + (dired-default-directory default-directory))
I'm on GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2025-01-02.
Sacha