|
From: | Juri Linkov |
Subject: | bug#13152: 24.2.90; [REGRESSION] dired-get-marked-files changed |
Date: | Sat, 15 Dec 2012 12:59:00 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
> But FUNCTION "should not manipulate files, just read input > \(an argument or confirmation)." so I don't see why this matters. I agree it shouldn't matter in which buffer FUNCTION is called. The problem is caused by the flawed design of dired-x where `dired-guess-default' doesn't propagate the value of `files' to the evaluated expressions in `dired-guess-shell-alist-default'. Also note how `dired-guess-shell-alist-default' is forced to use the dynamically bound variable `file'. The proper fix would be to redesign `dired-guess-shell-alist-default' to funcall lambdas with one arg `files' instead of using `eval'. So instead of (setq dired-guess-shell-alist-user '(("." (let ((files (dired-get-marked-files t current-prefix-arg))) (let (dired-guess-shell-alist-user) (dired-guess-default files)))))) Leo would be able to use (setq dired-guess-shell-alist-user '(("." (lambda (files) (let (dired-guess-shell-alist-user) (dired-guess-default files)))))) This could help to move useful features from dired-x.el to dired-aux.el.
[Prev in Thread] | Current Thread | [Next in Thread] |