counsel-describe-function and `...' quoted stuff #126

tsdh opened this Issue Jun 1, 2015 · 3 comments


None yet

2 participants

tsdh commented Jun 1, 2015

I use counsel-describe-function and counsel-describe-variable as drop-in replacements for the standard commands. However, there's one thing where the standard ones work better.

When point is somewhere in ``some-command-name'and you doC-h f`, then `some-command-name` is used as default value. With the counsel variants, the quoting with ` and ' prevents that (actually, it's the trailing single quote which is the problem).

abo-abo commented Jun 1, 2015

When point is somewhere in `some-command-name' and you do C-h f, then some-command-name is used as default value.

I don't have this problem - it works as expected for me. Can you reproduce with emacs -Q? Note that the function at point must be interned - that threw me off when I tested just now with emacs -Q. After interning the function, it worked fine.

tsdh commented Jun 2, 2015

I just found out it is mode-specific (most probably syntax-table specific).

With emacs -Q in an elisp-mode buffer, it works as expected.
With emacs -Q in a message-mode-buffer, (thing-at-point 'symbol) somewhere inside ``insert'results ininsert'` (note that the trailing ' is considered part of the symbol). It's the same in text-mode. So at least text- and message-mode give ' a word syntax. That's probably for making `it's` a word which makes sense.

@abo-abo abo-abo added a commit that closed this issue Jun 2, 2015
@abo-abo Handle symbol-at-point better in non-Elisp buffers
* counsel.el (counsel-symbol-at-point): New defun.
(counsel-describe-variable): Update.
(counsel-describe-function): Update.

Fixes #126
@abo-abo abo-abo closed this in 8212110 Jun 2, 2015
abo-abo commented Jun 2, 2015


@tsdh tsdh added a commit to tsdh/swiper that referenced this issue Aug 12, 2015
@tsdh tsdh Fix #126 again.
After #126 has been solved, the regexp has been changed to


where the trailing ' is optional ("'?").  However, the preceeding
"\\(.*\\)" group will already capture the trailing ' because .* is
greedy.  Now I've replaced it with the non-greedy .*? which makes it
work again.
@tsdh tsdh referenced this issue Aug 12, 2015

Fix #126 again. #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment