https://github.com/duckwork/hippie-completing-read
hippie-expand, but with completing-read
https://github.com/duckwork/hippie-completing-read
Last synced: about 1 year ago
JSON representation
hippie-expand, but with completing-read
- Host: GitHub
- URL: https://github.com/duckwork/hippie-completing-read
- Owner: duckwork
- License: other
- Created: 2021-10-14T15:59:27.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-26T21:41:31.000Z (almost 4 years ago)
- Last Synced: 2025-04-13T14:11:50.027Z (about 1 year ago)
- Language: Emacs Lisp
- Size: 16.6 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: COPYING
Awesome Lists containing this project
README
#+title: Hippie Completing Read
#+subtitle: toward a unified Emacs completing UI
I use ~completing-read~ in Emacs. I even use it in lieu of popular completion packages like =company= and such, for ~completion-in-region~. The one final thorn in my side was using =hippie-expand=, which completes some things better, or at least … /different-er/, than regular ~completion-in-region~ commands. So I went searching for how to combine both things.
Deep in the back waters of EmacsWiki, I found it: code for an [[https://www.emacswiki.org/emacs/HippieExpand#h5o-11][=ido= interface to =completing-read=]]. It was easy to adapt to ~completing-read~ code, so I did, and here's the package.
* Install
You should honestly know how to install packages in Emacs, but you can use =straight.el=:
#+begin_src emacs-lisp
(straight-use-package
'(hippie-completing-read
:host nil
:repo "https://codeberg.org/acdw/hippie-completing-read.el"))
#+end_src
and you should be good to go.
* Using
=hippie-completing-read= exposes one function, aptly called ~hippie-completing- read~. I bind it thusly:
#+begin_src emacs-lisp
(global-set-key (kbd "M-/") #'hippie-completing-read)
#+end_src
* Customizing
There are a number of customization options available for =hippie-completing- read=, of which this is a not-definitely up-to-date list. For the definitive list, see the Easy Customization group for this package.
- ~hippie-completing-read-prompt~ :: The prompt to display with ~hippie-completing-read-expand-with~. Default: =Hippie:=.
- ~hippie-completing-read-function~ :: Function to use to display and select from ~hippie-expand~ selections. Should be compatible with ~completing-read~. Default: ~completing-read~.
- ~hippie-completing-read-function-parameters~ :: Further parameters to pass to ~hippie-completing-read-function~. By default, add ~he-search-string~ (the thing we're completing) as initial input. This variable is risky, since its values are evaluated when passed to ~hippie-completing-read~.
- ~hippie-completing-read-threshold~ :: Number of expansion candidates needed before using ~completing-read~. The more traditional "cycling" behavior for hippie-complete will be used so long as there are not more completion candidates than in this number.
* Contributing
IDK, open an issue, or whatever.
* License
Copyright (C) 2021--2022 Case Duckworth
Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.
DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.