diff options
| author | Stefan Kangas | 2020-02-05 13:12:01 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2020-02-05 13:18:12 +0100 |
| commit | aea12d4903136c057bb14d3fd7683bf7a4e1eff6 (patch) | |
| tree | 183e578c697d5b95191df9384f714c999f84a7e7 /doc | |
| parent | 196da3017bc9b2fc6fecff0c0ce560e6c46b8a72 (diff) | |
| download | emacs-aea12d4903136c057bb14d3fd7683bf7a4e1eff6.tar.gz emacs-aea12d4903136c057bb14d3fd7683bf7a4e1eff6.zip | |
Add new filter commands to Package Menu (Bug#38424)
* lisp/emacs-lisp/package.el (package-menu-filter-by-version)
(package-menu-filter-by-status, package-menu-filter-by-archive):
New filter commands.
(package-menu--filter-by): New helper function.
(package-menu-filter-by-keyword, package-menu-filter-by-name): Use
the above helper function.
(package-menu-mode-menu):
(package-menu-mode-map): Update menu to include new filter commands.
* doc/emacs/package.texi (Package Menu): Document the new commands and
re-arrange the sort order of commands to be closer to the one in
describe-major-mode.
* etc/NEWS: Announce the new commands.
* lisp/emacs-lisp/package.el (package-menu--display): New function
extracted from....
(package-menu--generate): ...here.
* test/lisp/emacs-lisp/package-tests.el (with-package-menu-test):
New macro.
(package-test-update-listing, package-test-list-filter-by-name)
(package-test-list-filter-clear): Use above macro.
(package-test-list-filter-by-archive)
(package-test-list-filter-by-keyword)
(package-test-list-filter-by-status)
(package-test-list-filter-by-version-=)
(package-test-list-filter-by-version-<)
(package-test-list-filter-by-version->): New tests.
(package-test-filter-by-version): New helper function.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/package.texi | 63 |
1 files changed, 42 insertions, 21 deletions
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index 1cac7f9b4b6..360fc980e4a 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi | |||
| @@ -151,27 +151,6 @@ Refresh the package list (@code{revert-buffer}). This fetches the | |||
| 151 | list of available packages from the package archive again, and | 151 | list of available packages from the package archive again, and |
| 152 | redisplays the package list. | 152 | redisplays the package list. |
| 153 | 153 | ||
| 154 | @item / k | ||
| 155 | @kindex / k @r{(Package Menu)} | ||
| 156 | @findex package-menu-filter-by-keyword | ||
| 157 | Filter the package list by keyword | ||
| 158 | (@code{package-menu-filter-by-keyword}). This prompts for a keyword | ||
| 159 | (e.g., @samp{games}), then shows only the packages that relate to that | ||
| 160 | keyword. | ||
| 161 | |||
| 162 | @item / n | ||
| 163 | @kindex / n @r{(Package Menu)} | ||
| 164 | @findex package-menu-filter-by-name | ||
| 165 | Filter the package list by name (@code{package-menu-filter-by-name}). | ||
| 166 | This prompts for a string, then shows only the packages whose names | ||
| 167 | match a regexp with that value. | ||
| 168 | |||
| 169 | @item / / | ||
| 170 | @kindex / / @r{(Package Menu)} | ||
| 171 | @findex package-menu-clear-filter | ||
| 172 | Clear filter currently applied to the package list | ||
| 173 | (@code{package-menu-clear-filter}). | ||
| 174 | |||
| 175 | @item H | 154 | @item H |
| 176 | @kindex H @r{(Package Menu)} | 155 | @kindex H @r{(Package Menu)} |
| 177 | @findex package-menu-hide-package | 156 | @findex package-menu-hide-package |
| @@ -183,6 +162,48 @@ Permanently hide packages that match a regexp | |||
| 183 | @findex package-menu-toggle-hiding | 162 | @findex package-menu-toggle-hiding |
| 184 | Toggle visibility of old versions of packages and also of versions | 163 | Toggle visibility of old versions of packages and also of versions |
| 185 | from lower-priority archives (@code{package-menu-toggle-hiding}). | 164 | from lower-priority archives (@code{package-menu-toggle-hiding}). |
| 165 | |||
| 166 | @item / a | ||
| 167 | @kindex / a @r{(Package Menu)} | ||
| 168 | @findex package-menu-filter-by-archive | ||
| 169 | Filter package list by archive (@code{package-menu-filter-by-archive}). | ||
| 170 | This prompts for a package archive (e.g., @samp{gnu}), then shows only | ||
| 171 | packages from that archive. | ||
| 172 | |||
| 173 | @item / k | ||
| 174 | @kindex / k @r{(Package Menu)} | ||
| 175 | @findex package-menu-filter-by-keyword | ||
| 176 | Filter package list by keyword (@code{package-menu-filter-by-keyword}). | ||
| 177 | This prompts for a keyword (e.g., @samp{games}), then shows only | ||
| 178 | packages with that keyword. | ||
| 179 | |||
| 180 | @item / n | ||
| 181 | @kindex / n @r{(Package Menu)} | ||
| 182 | @findex package-menu-filter-by-name | ||
| 183 | Filter package list by name (@code{package-menu-filter-by-name}). | ||
| 184 | This prompts for a regular expression, then shows only packages | ||
| 185 | with names matching that regexp. | ||
| 186 | |||
| 187 | @item / s | ||
| 188 | @kindex / s @r{(Package Menu)} | ||
| 189 | @findex package-menu-filter-by-status | ||
| 190 | Filter package list by status (@code{package-menu-filter-by-status}). | ||
| 191 | This prompts for one or more statuses (e.g., @samp{available}), then | ||
| 192 | shows only packages with matching status. | ||
| 193 | |||
| 194 | @item / v | ||
| 195 | @kindex / v @r{(Package Menu)} | ||
| 196 | @findex package-menu-filter-by-version | ||
| 197 | Filter package list by version (@code{package-menu-filter-by-version}). | ||
| 198 | This prompts first for one of the qualifiers @samp{<}, @samp{>} or | ||
| 199 | @samp{=}, and then a package version, and shows packages that has a | ||
| 200 | lower, equal or higher version than the one specified. | ||
| 201 | |||
| 202 | @item / / | ||
| 203 | @kindex / / @r{(Package Menu)} | ||
| 204 | @findex package-menu-filter-clear | ||
| 205 | Clear filter currently applied to the package list | ||
| 206 | (@code{package-menu-filter-clear}). | ||
| 186 | @end table | 207 | @end table |
| 187 | 208 | ||
| 188 | @noindent | 209 | @noindent |