From: Leo Liu <sdl.web@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: 13152@debbugs.gnu.org
Subject: bug#13152: 24.2.90; [REGRESSION] dired-get-marked-files changed
Date: Fri, 04 Jan 2013 11:49:59 +0800 [thread overview]
Message-ID: <m27gntd2u0.fsf@gmail.com> (raw)
In-Reply-To: <87a9tf1szv.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 15 Dec 2012 12:59:00 +0200")
On 2012-12-15 18:59 +0800, Juri Linkov wrote:
> 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'.
Ideally, yes. But not common in elisp where stateful is the norm. We
just have to use the least surprise principle.
> 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.
This seems like a good design. Cheers.
Leo
next prev parent reply other threads:[~2013-01-04 3:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 2:23 bug#13152: 24.2.90; [REGRESSION] dired-get-marked-files changed Leo
2012-12-12 2:47 ` Glenn Morris
2012-12-12 5:30 ` Leo
2012-12-12 8:13 ` Glenn Morris
2012-12-12 9:29 ` Juri Linkov
2012-12-12 11:32 ` Leo
2012-12-12 23:11 ` Juri Linkov
2012-12-13 1:20 ` Leo
2012-12-14 0:46 ` Juri Linkov
2012-12-14 3:05 ` Leo
2012-12-14 10:26 ` martin rudalics
2012-12-14 10:43 ` Leo
2012-12-14 10:58 ` martin rudalics
2012-12-14 10:26 ` martin rudalics
2012-12-15 10:59 ` Juri Linkov
2013-01-04 3:49 ` Leo Liu [this message]
2013-01-04 3:46 ` Leo Liu
2013-01-04 7:08 ` martin rudalics
2013-01-07 2:38 ` Leo Liu
2013-01-07 7:43 ` martin rudalics
2013-01-08 11:02 ` Leo Liu
2013-01-08 22:27 ` Glenn Morris
2013-01-08 22:35 ` Glenn Morris
2013-01-09 1:15 ` Leo Liu
2013-01-09 11:07 ` Leo Liu
2013-01-10 0:50 ` Juri Linkov
2013-01-10 1:04 ` Leo Liu
2013-01-18 18:40 ` Leo Liu
2013-01-09 1:19 ` Leo Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27gntd2u0.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=13152@debbugs.gnu.org \
--cc=juri@jurta.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.