reddit / emacs

Projectile--what am I missing?

nmishkin · 2022-09-15 23:24
I just found out about Projectile and decided to try it out. I (think I) followed the instructions in the README correctly but the behavior I'm getting is nothing like I see in the videos. Basically, I do (the bound key for) *projectile-find-file* and then in the minibuffer I start typing the name of a file that's in the current Git tree and...basically nothing interesting happens. No autocomplete, no suggestions; nothing. The prompt is `[xxx] Find file:` (where "xxx" is the name of my Git repo), as I'd expect. (This all is using the Emacs on MacOS that I got from [https://emacsformacosx.com/](https://emacsformacosx.com/) in case that matters.) Can anyone help tell what I'm doing wrong?
lebensterben · 2022-09-15 23:52
you need one of helm ivy vertico selectrum
jimehgeek · 2022-09-16 03:20
What you’re after is a completion UI. Projectile basically just does project related stuff, in the sense of data. It then just triggers emacs’ completion UI with a big list of files (data), and that list is what you’re matching against when you type a file name. However emacs out if the box does not have any fancy completion systems enabled. Hence you’ll want to look into one of `vertico`, `ido`, `selectrum`. `ivy`, or `helm`. There are others too, but those are the most popular. Edit: Fixed typos.
7890yuiop · 2022-09-16 12:18
> No autocomplete, no suggestions; nothing You can get completions in the normal way (e.g. TAB by default), which you'll observe is not simply showing the same offerings that find-file provides. As others have pointed out, other UIs are also available.
nmishkin · 2022-09-17 02:20
Ah, great, thanks! It seems like this is something that could have been called out on the [Projectile main doc page](https://docs.projectile.mx/projectile/index.html) a bit more clearly--i.e., more than just saying "using ivy for minibuffer completion" above the the animated demo and that I'd totally missed :-)
jimehgeek · 2022-09-17 08:12
Yeah, agreed, it could definitely be better for beginners. Emacs can have a steep learning curve in the beginning. Most packages tend to be written to solve a problem or improve upon something, so their docs tend to be based on an assumed amount of pre-existing knowledge about Emacs and other popular packages in the ecosystem. Annoying as it may be, I think it’s kinda understandable that every package doesn’t expand deeper into various not directly related areas of Emacs. Specially as their target audience isn’t people getting started with Emacs. Projectile specifically though is a bit more fundamental and as such naturally gets more exposure to beginners. There are guides and even video series that cover a lot of beginner stuff. [masteringemacs.org](https://www.masteringemacs.org/) has a lot of great articles, and the [System Crafters](https://youtube.com/c/SystemCrafters) YouTube channel has a lot of great looking stuff. [This](https://share.jimeh.me/text-editor-learning-curves-bAO8KYmd1tD5.jpg) meme shows up every now and then, and personally I think it’s funny, reasonably accurate, and also an example of just how flexible and extensible Emacs is. I’ve been using Emacs for 11 years now, and I’m still tweaking, poking, and improving [my config](https://github.com/jimeh/.emacs.d) every few weeks/months when I feel like it.
bozhidarb · 2022-09-17 16:45
Fair point. Please, file a ticket so I won't forget, and I'll mention this prominently in the docs. (I'm Projectile's author)
nmishkin · 2022-09-21 20:28
Yeah, so I've been using Emacs for only \~43 years so I'm sure there's still a lot for me to learn--my Elisp skills are mediocre and I barely know [TECO](https://en.wikipedia.org/wiki/TECO_(text_editor)) at all any more :-)
jimehgeek · 2022-09-21 20:58
Haha… oh boy, only a mere 32 years longer than I’ve been using Emacs, and 7 years longer than I’ve been alive. I’ll simply bow and tip my hat to you, followed by a prompt exit stage left before I embarrass myself any more :D