>> So dired-dwim-target could have a similar defcustom >> with choices for recent/next window. > > There are lots of imaginable user preferences, so I would prefer a > solution where one can specify a function. Would you want to use > `dired-dwim-target' for that? This would be a natural choice, indeed. Please try this patch: