Subject: bug#2030: 23.0.60; doc string of dired-guess-shell-alist-user

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Mon, 11 Jul 2011 15:48:52 +0200

"Drew Adams" <[email-masked]> writes:

> The doc string should suggest that users use Customize. It should not
> use a complex `setq' example as its only illustration:
>
> (setq dired-guess-shell-alist-user
>       (list (list "\\.foo\\'" "FOO-COMMAND");; fixed rule
>              ;; possibly more rules ...
>              (list "\\.bar\'";; rule with condition test
>                    '(if condition
>                          "BAR-COMMAND-1"
>                        "BAR-COMMAND-2"))))

I think complicated variables are best served with non-Customize
examples.

I've rewritten it to use a quote instead of all the `list' operations,
which should make it clearer.

> This example is in any case incorrect - "\\.bar\'" should be "\\.bar\\'".

This was apparently fixed already.

> If it's felt that an example of a _value_ for this option is needed,
> then it's OK to show that directly:
>
> (("\\.foo\\'" "foo-command") ; unconditional rule
>  ("\\.bar\\'"                ; conditional rule
>   (if (some-sexp) "bar-command-1" "bar-command-2")))
>
> But there is absolutely no reason to show setting the value using
> `setq', especially since the expression evaluated by `setq' is 100%
> constant.

I disagree.  A complete `setq' is convenient to cut and paste.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/