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

`ivy-thing-at-point` cannot be extended or customized #1594

Closed
FelipeLema opened this issue May 24, 2018 · 3 comments

Comments

@FelipeLema
Copy link

commented May 24, 2018

Right now, I'd like to customize the behaviour of ivy-thing-at-point and I can't do it without changing/forking the original code.

My main concern with ivy-thing-at-point is that it captures the string in the string-match clause (in it's cond block) with text properties, whereas I'd like it to capture it without these properties. Perhaps have a ivy-thing-at-point-getter (customizable) variable.

I know performance is a main concern for @abo-abo, but this would be a one-time call at the start of an ivy command, so the earlier shouldn't impacted.

(thanks for doing a great job here, btw).

@basil-conto

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2018

Right now, I'd like to customize the behaviour of ivy-thing-at-point and I can't do it without changing/forking the original code.

If this is for your own purposes, then there's always function advice; see (elisp) Advising Functions. For example:

(advice-add 'ivy-thing-at-point :filter-return #'substring-no-properties)

My main concern with ivy-thing-at-point is that it captures the string in the string-match clause (in it's cond block) with text properties, whereas I'd like it to capture it without these properties.

Is there any significance to those text properties @abo-abo?

@abo-abo abo-abo closed this in 6169b5d Jun 13, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Jun 13, 2018

Thanks, the text properties are now stripped. I'm not opposed to making ivy-thing-at-point customizable. But only if needed, and your concern appears to be addressed now.

@FelipeLema

This comment has been minimized.

Copy link
Author

commented Jun 13, 2018

it is. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.