[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult eacc143a44 2/2: Deprecate consult-apropos
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult eacc143a44 2/2: Deprecate consult-apropos |
Date: |
Thu, 1 Dec 2022 14:57:24 -0500 (EST) |
branch: externals/consult
commit eacc143a4439a394b5da2124e2550816c66c6d41
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Deprecate consult-apropos
`consult-apropos' isn't a well-behaving command. Completion is used to
select a
symbol, which is then passed to the `apropos' function. The `apropos'
function
takes a regular expression as argument (but not a symbol). This mismatch
leads
to two problems:
- The list of matches shown in the apropos buffer does not correspond to the
list of completion candidates.
- When entering a regular expression as input, the input is not passed to
`apropos' as long as the user does not explicitly submit the input via
`exit-minibuffer' or `vertico-exit-input'.
Therefore `consult-apropos' will be deprecated from now on. We have better
tools
at our disposable via Embark. Try these command sequences:
- Export symbols to apropos: M-x describe-symbol <something> M-x
embark-export
- Call apropos on selection: M-x describe-symbol <something> M-x embark-act
a
---
CHANGELOG.org | 1 +
README.org | 5 -----
consult.el | 11 ++++++++---
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 752ae2aa28..4a66b95298 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -15,6 +15,7 @@
- Emacs 29: Support =outline-search-function=
- Org 9.6: Support new =org-fold-core= API (both overlays and text-properties)
- Support abbreviated file names in =recentf-list=, see
=recentf-filename-handler=.
+- Deprecate =consult-apropos=
* Version 0.20 (2022-10-16)
diff --git a/README.org b/README.org
index 38dfb091a3..88f5edcb0c 100644
--- a/README.org
+++ b/README.org
@@ -341,16 +341,12 @@ their descriptions.
:description: Various other useful commands
:end:
-#+findex: consult-apropos
#+findex: consult-file-externally
#+findex: consult-completion-in-region
#+findex: consult-theme
#+findex: consult-man
#+findex: consult-preview-at-point
#+findex: consult-preview-at-point-mode
-- =consult-apropos=: Replacement for =apropos= with completion. As a better
- alternative, you can run =embark-export= from commands like =M-x= or
- =describe-symbol=.
- =consult-man=: Find Unix man page, via Unix =apropos= or =man -k=.
=consult-man= opens
the selected man page using the Emacs =man= command.
- =consult-file-externally=: Select a file and open it externally, e.g. using
@@ -774,7 +770,6 @@ configuration examples.
("C-M-#" . consult-register)
;; Other custom bindings
("M-y" . consult-yank-pop) ;; orig. yank-pop
- ("<help> a" . consult-apropos) ;; orig. apropos-command
;; M-g bindings (goto-map)
("M-g e" . consult-compile-error)
("M-g f" . consult-flymake) ;; Alternative:
consult-flycheck
diff --git a/consult.el b/consult.el
index 9f5cdb7d90..a80d545738 100644
--- a/consult.el
+++ b/consult.el
@@ -456,7 +456,6 @@ Used by `consult-completion-in-region', `consult-yank' and
`consult-history'.")
(defvar consult--find-history nil)
(defvar consult--man-history nil)
(defvar consult--line-history nil)
-(defvar consult--apropos-history nil)
(defvar consult--theme-history nil)
(defvar consult--minor-mode-menu-history nil)
(defvar consult--kmacro-history nil)
@@ -3739,15 +3738,21 @@ alternative, you can run `embark-export' from commands
like `M-x' and
(let ((pattern
(consult--read
obarray
- :prompt "Apropos: "
+ :prompt "consult-apropos (obsolete): "
:predicate (lambda (x) (or (fboundp x) (boundp x) (facep x)
(symbol-plist x)))
- :history 'consult--apropos-history
:category 'symbol
:default (thing-at-point 'symbol))))
(when (string= pattern "")
(user-error "No pattern given"))
(apropos pattern)))
+(make-obsolete
+ #'consult-apropos
+ "consult-apropos has been deprecated in favor of Embark actions:
+M-x describe-symbol <regexp> M-x embark-export
+M-x describe-symbol <regexp> M-x embark-act a"
+ "0.20")
+
;;;;; Command: consult-complex-command
;;;###autoload