Eli Zaretskii writes: >> Cc: Juri Linkov >> Date: Fri, 22 Aug 2025 17:20:13 -0400 >> From: Spencer Baugh via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> Rather than using minibuffer-with-setup-hook and >> minibuffer-default-add-function, just pass the list of default >> file names as a regular argument to read-file-name. This >> behaves better with various customizations, and also allows the >> normal abbreviate-file-name logic in read-file-name to run. > > "Behaves better" in what sense? > > Would you please show examples of commands where the patched version > behaves better, including the effect of the abbreviate-file-name > logic? Because from your OP it is unclear to me what, if any, will be > the user-facing effects of the new behavior in the relevant Dired > commands. Both before and after my change: 1. M-: (read-file-name ":" nil (expand-file-name "~")) 2. M-n 3. Observe ~/ in the minibuffer This is because read-file-name calls abbreviate-file-name on the default argument. Before my change: 1. C-x C-f ~/ 2. R (or Y or H) 3. M-n 4. Observe the minibuffer starts with /home/user After my change: 1. C-x C-f ~/ 2. R (or Y or H) 3. M-n 4. Observe the minibuffer starts with ~/ as usual for read-file-name Juri may also have some comments about why the code was written in this way, as the original author of both this code and other code in dired which uses minibuffer-with-setup-hook. Also, attached is an updated version of the patch which reflects the fact that the "default" variable actually was unused before, only "defaults" was used.