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

Comments

Projects
None yet
2 participants
@tsdh
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Jun 1, 2015

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@tsdh

tsdh Jun 2, 2015

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Jun 2, 2015

Owner

Thanks.

Owner

abo-abo commented Jun 2, 2015

Thanks.

tsdh added a commit to tsdh/swiper that referenced this issue Aug 12, 2015

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

Merged

Fix #126 again. #196

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