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

Using abbrev-mode in helm-org-ql #97

Open
akirak opened this issue Feb 25, 2020 · 3 comments
Open

Using abbrev-mode in helm-org-ql #97

akirak opened this issue Feb 25, 2020 · 3 comments
Labels

Comments

@akirak
Copy link
Contributor

akirak commented Feb 25, 2020

It would be nice if there were a way to quickly type certain queries in helm-org-ql.

For example, I maintain information on languages with each in one Org file and add language tag to them. Thus

tags:language level:1

in a helm-org-ql session (via this package) displays a list of languages I am interesed in, and I can narrow them down by name.

It would be convenient to define the above query as lang using abbrev-mode. It's composable, which means I won't have to define several ql-views containing the same query.

How can I enable abbrev-mode in helm-org-ql? Is it possible to define abbreviations specific to helm-org-ql?

@alphapapa
Copy link
Owner

Hi Akira,

That sounds like a nice idea. I don't use abbrev-mode, so I can't offer much help with it. The Emacs manual makes it sound simple enough to use, since it's a buffer-local minor mode. I guess you can enable it in the minibuffer using one of the Helm hooks, but I'm not sure how minor modes work with regard to the minibuffer.

@akirak
Copy link
Contributor Author

akirak commented Mar 10, 2020

I have read the definition of helm-source class, and now I think a better way to implement the feature, i.e. custom query abbreviation, would be to set :pattern-transformer. I will try out the idea soon.

@alphapapa
Copy link
Owner

That's an interesting idea. Thanks.

However, please consider whether the query abbreviation feature could be useful outside of the Helm source. Not that I'm opposed to that idea, but a more general solution could be useful in other contexts as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants