[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16424: 24.3.50; y-or-n-p prompt no more visible in minibuffer
From: |
Drew Adams |
Subject: |
bug#16424: 24.3.50; y-or-n-p prompt no more visible in minibuffer |
Date: |
Sun, 12 Jan 2014 10:22:26 -0800 (PST) |
OT for this bug, but you might (anyway) consider using a different
function for this question about acting on a list of files.
Dired offers some code for this kind of thing. See, for instance,
`dired-map-over-marks-check'. Some of what it does might be
pertinent here.
In Dired+ I have a function `diredp-y-or-n-files-p', which does
just the following, and so is probably more pertinent here (but
it does not log errors as `dired-map-over-marks-check' does):
,----
| diredp-y-or-n-files-p is a compiled Lisp function in `dired+'.
| (diredp-y-or-n-files-p PROMPT FILES &optional PREDICATE)
|
| PROMPT user with a "y or n" question about a list of FILES.
| Return t if answer is "y". Otherwise, return nil.
|
| Like `y-or-n-p', but the user can also hit `l' to display the list of
| files that the confirmation is for, in buffer `*Files'. When
| finished, buffer `*Files*' is killed if it was never shown, or is
| hidden and buried otherwise. Thus, if it was shown then it is still
| available to revisit afterward (even if the user quit using `C-g').
|
| PREDICATE is passed to `diredp-list-files', to list only file names
| for which it returns non-nil.
`----
`diredp-list-files' does this:
,----
| diredp-list-files is a compiled Lisp function in `dired+'.
| (diredp-list-files FILES &optional DIR BUFNAME PREDICATE)
|
| Display FILES, a list of file names. Wildcard patterns are expanded.
| The files are shown in a new buffer, `*Files*' by default.
| Optional arg DIR serves as the default directory for expanding file
| names that are not absolute. It defaults to `default-directory'.
| Optional arg BUFNAME is the name of the buffer for the display.
| It defaults to `*Files*' (or `*Files*<N>' if `*Files*' exists).
`----
These functions are not really Dired-specific, as you can tell from
the descriptions.
HTH. Again, I realize it is OT for the bug.