alphapapa / org-rifle

Rifle through your Org-mode buffers and acquire your target
GNU General Public License v3.0
504 stars 30 forks source link

Pluggable abbreviations #38

Open codecoll opened 5 years ago

codecoll commented 5 years ago

Org rifle is great, I use it often and it gave me an enhancement idea.

For example, I search my notes for javascript stuff. I find it quickly, but it's annoying to type javascript or even javas often. Why can't I type js instead?

So I'd like to see a pluggable abbreviation feature where I could specify an alist for custom abbreviations.

E.g.

(setq org-rifle-abbrevs '(("js" . "javascript") ("ga" . "google analytics") ...))

With this set I could search for "js timer" and it would return "javascript timer" entries too. (And also the original "js" matches in case one wants to search for the original input, not the expanded abbreviation.)

alphapapa commented 5 years ago

Sorry, I don't think this would be a good idea. It would make the searching code more complicated for little benefit.

For abbreviations and expansions, there are several built-in packages in Emacs. I use hippie-expand and dabbrev. You can use them in the minibuffer when typing a query.