I would expect the counsel replacements to be at least as smart as the builtin commands they purport to supersede, but they're not (in this respect at least).
E.g., the builtin find-function guesses the right default anywhere inside the function call. Counsel had better make use of the preexisting and well-tried builtin guessing functions, e.g. the patch below seems to fix the find-function case. There are equivalents for find-variable, find-library...
diff --git a/counsel.el b/counsel.el
index 6bd25a7..3ec8c6e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -524,7 +524,8 @@ (defun counsel-describe-function ()
(push (symbol-name x) cands))))
cands)
:keymap counsel-describe-map
- :preselect (ivy-thing-at-point)
+ :preselect (when-let (fn (function-called-at-point))
+ (symbol-name fn))
:history 'counsel-describe-symbol-history
:require-match t
:sort t
I would expect the counsel replacements to be at least as smart as the builtin commands they purport to supersede, but they're not (in this respect at least).
E.g., the builtin
find-functionguesses the right default anywhere inside the function call. Counsel had better make use of the preexisting and well-tried builtin guessing functions, e.g. the patch below seems to fix thefind-functioncase. There are equivalents forfind-variable,find-library...