diff options
| author | Eli Zaretskii | 2020-08-22 19:14:35 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-08-22 19:14:35 +0300 |
| commit | 1002852f1aecb5e2568c91e2ca293f0ebfa1c9c9 (patch) | |
| tree | c828f8e607c22659fd5599762705df8cbadb3af0 | |
| parent | 2e5198781c42385d9c1723e137f3f059b6df363f (diff) | |
| download | emacs-1002852f1aecb5e2568c91e2ca293f0ebfa1c9c9.tar.gz emacs-1002852f1aecb5e2568c91e2ca293f0ebfa1c9c9.zip | |
Fix documentation of a recent change in Dired
* etc/NEWS:
* doc/emacs/dired.texi (Dired Enter): Fix the text describing
'dired-maybe-use-globstar'.
* lisp/dired.el (dired-maybe-use-globstar): Add :version.
| -rw-r--r-- | doc/emacs/dired.texi | 23 | ||||
| -rw-r--r-- | etc/NEWS | 9 | ||||
| -rw-r--r-- | lisp/dired.el | 3 |
3 files changed, 22 insertions, 13 deletions
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 39caab086c2..19aaca962da 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -79,23 +79,28 @@ The former lists all the files with extension @samp{.el} in directory | |||
| 79 | @samp{foo}. The latter lists the files with extension @samp{.el} | 79 | @samp{foo}. The latter lists the files with extension @samp{.el} |
| 80 | in all the subdirectories of @samp{foo}. | 80 | in all the subdirectories of @samp{foo}. |
| 81 | 81 | ||
| 82 | When the system shell supports globstar and it's enabled, then you | 82 | @cindex globstar, in Dired |
| 83 | can use recursive globbing: | 83 | On Posix systems, when the system shell supports @dfn{globstar}, a |
| 84 | recursive globbing feature, and that support is enabled, you can use | ||
| 85 | recursive globbing in Dired: | ||
| 84 | 86 | ||
| 85 | @example | 87 | @example |
| 86 | C-x d ~/foo/**/*.el @key{RET} | 88 | C-x d ~/foo/**/*.el @key{RET} |
| 87 | @end example | 89 | @end example |
| 88 | 90 | ||
| 89 | This command lists all the files with extension @samp{.el} descending | 91 | This command produces a directory listing with all the files with |
| 90 | recursively in all the subdirectories of @samp{foo}. Note that there | 92 | extension @samp{.el}, descending recursively in all the subdirectories |
| 91 | are small differences in the implementation of globstar between shells. | 93 | of @samp{foo}. Note that there are small differences in the |
| 92 | Check your shell manual to know the expected behavior. | 94 | implementation of globstar between different shells. Check your shell |
| 95 | manual to know the expected behavior. | ||
| 93 | 96 | ||
| 94 | @vindex dired-maybe-use-globstar | 97 | @vindex dired-maybe-use-globstar |
| 95 | @vindex dired-enable-globstar-in-shell | 98 | @vindex dired-enable-globstar-in-shell |
| 96 | If the shell supports globstar and disables it by default, you | 99 | If the shell supports globstar, but that support is disabled by |
| 97 | can still enable this feature with @code{dired-maybe-use-globstar} if | 100 | default, you can still let Dired use this feature by customizing |
| 98 | the shell is included in @code{dired-enable-globstar-in-shell}. | 101 | @code{dired-maybe-use-globstar} to a non-@code{nil} value; then Dired |
| 102 | will enable globstar for those shells for which it knows how (see | ||
| 103 | @code{dired-enable-globstar-in-shell} for the list of those shells). | ||
| 99 | 104 | ||
| 100 | The usual history and completion commands can be used in the minibuffer; | 105 | The usual history and completion commands can be used in the minibuffer; |
| 101 | in particular, @kbd{M-n} puts the name of the visited file (if any) in | 106 | in particular, @kbd{M-n} puts the name of the visited file (if any) in |
| @@ -230,9 +230,12 @@ time zones will use a form like "+0100" instead of "CET". | |||
| 230 | 230 | ||
| 231 | +++ | 231 | +++ |
| 232 | *** New user option 'dired-maybe-use-globstar'. | 232 | *** New user option 'dired-maybe-use-globstar'. |
| 233 | If set, enables globstar in shells that support this feature. The new | 233 | If set, enables globstar (recursive globbing) in shells that support |
| 234 | variable 'dired-enable-globstar-in-shell' lists which shells can have | 234 | this feature, but turn it off by default. This allows producing |
| 235 | globstar enabled. | 235 | directory listings with files matching a wildcard in all the |
| 236 | subdirectories of a given directory. The new variable | ||
| 237 | 'dired-enable-globstar-in-shell' lists which shells can have globstar | ||
| 238 | enabled, and how to enable it. | ||
| 236 | 239 | ||
| 237 | +++ | 240 | +++ |
| 238 | *** New user option 'dired-copy-dereference'. | 241 | *** New user option 'dired-copy-dereference'. |
diff --git a/lisp/dired.el b/lisp/dired.el index d22d52ce627..94d3befda85 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -88,7 +88,8 @@ Note that the implementations of globstar have small differences | |||
| 88 | between shells. You must check your shell documentation to see | 88 | between shells. You must check your shell documentation to see |
| 89 | what to expect." | 89 | what to expect." |
| 90 | :type 'boolean | 90 | :type 'boolean |
| 91 | :group 'dired) | 91 | :group 'dired |
| 92 | :version "28.1") | ||
| 92 | 93 | ||
| 93 | (defconst dired-enable-globstar-in-shell | 94 | (defconst dired-enable-globstar-in-shell |
| 94 | '(("ksh" . "set -G") | 95 | '(("ksh" . "set -G") |