bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dired-x's overwritten "!" not forthcoming about dired-guess-shell-alist-


From: Dan Jacobson
Subject: dired-x's overwritten "!" not forthcoming about dired-guess-shell-alist-user
Date: 04 Jun 2001 22:53:26 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Let's confuse the user.  The user uses dired-x because someone told
him to.  He notices the neat prompts given for different file types , e.g.,
" ! on taiwan_triangpts.ps: {3 guesses} [ghostview]"
and he says, neat, I want to customize that, so he hits C-h k ! to see
what to do.  Well, he just sees the old standard dired description of
the ! key, with no clue about dired-guess-shell-alist-user, etc.

Why is that?  In dired-x.el it says
;;; `dired-do-shell-command' is bound to `!' by dired.el.
;;;
;;; * Redefine `dired-do-shell-command' so it calls
;;;   `dired-guess-shell-command'.
;;;
;;; * `dired-guess-shell-command' calls `dired-guess-default' with list of
;;;    marked files.

So one would think that if they redefined dired-do-shell-command
they would redefine its docstring too.  However, it seems what they
did in dired-x.el is to redfine an internal part of what the original
! command calls

;;; REDEFINE.
;;; Redefine dired-aux.el's version:
(defun dired-read-shell-command (prompt arg files)
;;  "Read a dired shell command prompting with PROMPT (using read-string).
;;ARG is the prefix arg and may be used to indicate in the prompt which
;;  files are affected.
;;This is an extra function so that you can redefine it, e.g., to use gmhist."

but wait, why when I do (debug-on-entry (quote
dired-do-shell-command)) and hit !, I don't enter the debugger until
after being prompted... even though C-h k ! says that's the command
for that key.

Anyways fellas, I don't know what kind of spaghetti is going on, but
you must admit, by not giving the new details of the new functionality
of "!", you have cut off the main route for the user to figure out how
to customize the things he sees... and what takes the cake is when it
says:
! runs the command dired-do-shell-command
   which is an interactive compiled Lisp function in `dired-aux'.

but if the user goes to dired-aux.el he will be on a ten year wild
goose chase, no?

If you say that the user knowingly used dired-x so he is responsible,
I say one night he stuck the invocation in .emacs and didn't check
back under the hood for years.   All I know is I hit C-h k to learn
about the things around me and this one needs improving.

I mean, look at the tons of help written for
the variable dired-guess-shell-alist-user ... well meaning, but if no
clue is given from C-h k !, then the average user will not necessarily
get to it.

by the way, I see there is no html guesses, so I did
(setq dired-guess-shell-alist-user
      (list (list "\\.html?$" "validate --emacs")))
there ought to be many things one would want to do to a [s]htm[l]
file, there ought to be some dired-guess-shell-alist-default values set.

Also may I suggest for e.g. compressed tar files, add a guess that
will just list their contents.

By the way I see when it encounters  file.tar.bz2 it doesn't
know to ask "tar xvIf" "tar tvIf", etc.
-- 
http://www.geocities.com/jidanni Tel886-4-25854780 e-mail:restore .com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]