ahyatt / ekg

The emacs knowledge graph, app for notes and structured data.
GNU General Public License v3.0
224 stars 18 forks source link

How is ekg supposed to autocomplete tags? #137

Closed rbenit68 closed 1 month ago

rbenit68 commented 7 months ago

I have a minimal installation of Emacs, just ekg, and I can't figure out how I should proceed to autocomplete tags, especially in relation to the use of templates. I have manually evaluated with (eval-expression) function (ekg-on-add-tag-insert-template "mytemplate") and it works fine. But I can't activate the insertion using the tag autocompletion because I don't know how to autocomplete (no luck with enter, tab, comma, space, ...).

I hope you can give me some light.

ahyatt commented 7 months ago

It should be that tag completion works when you do complete-symbol. That should bring up some way (exactly how depends on how you have set up emacs) of completing tags. By default, this is bound to C-M-i, and various completion packages do other things to turn on this completion. I use corfu, which has auto-completion, which I turn on with (corfu-auto).

Please let me know if this helps or not.

rbenit68 commented 7 months ago

Thank you, @ahyatt.

It is only now that I have learnt the use of complete-symbol, what a bad thing!

Only in case it matters:

1) if I use complete-symbol without any package, or with corfu or with company, when completing (some already entered characters) a tag (of a template), the tag is correctly completed but the content of the template does not appear automatically.

2) If instead I select the label completely (no entered any character at all) from the options (no package, company or corfu), the label and the content of the template as well are inserted correctly.

3) But installing ivy I can get the tag and the content of the template following the directions of 1). I don't want to use ivy globally because is very intrusive and disturbing in the way I use Emacs; I am now trying some hooks that activate and deactivate ivy.

Best.

ahyatt commented 1 month ago

I think this issue has been resolved, so I'm closing it. If I'm mistaken, please go ahead and re-open.