Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tsdh opened this issue Jun 1, 2015 · 3 comments
Closed

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

tsdh opened this issue Jun 1, 2015 · 3 comments

Comments

@tsdh
Copy link
Contributor

@tsdh 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
Copy link
Owner

@abo-abo 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
Copy link
Contributor Author

@tsdh 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 closed this in 8212110 Jun 2, 2015
@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Jun 2, 2015

Thanks.

tsdh added a commit to tsdh/swiper that referenced this issue Aug 12, 2015
After abo-abo#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 mentioned this issue Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants