abo-abo / oremacs

My Emacs config
https://oremacs.com/
296 stars 33 forks source link

About the rebinding of SPC to close the company popup in ora-company.el. #36

Open hongyi-zhao opened 3 years ago

hongyi-zhao commented 3 years ago

Based on your wonderful blog here, I find your very distinctive company configuration, i.e., ora-company.el. But I've some questions about the configuration used in this file, as described below:

  1. In the above configuration, you use the following setting for remapping SPC to close the company popup:

https://github.com/abo-abo/oremacs/blob/d2b2cd8371b94f35a42000debef1c2b644cb9472/modes/ora-company.el#L49-L52

But based on my tries, the following configuration for company will achieve the same purpose:

  :bind
  ( :map company-active-map
    ("SPC" . company-complete-selection))

So, I want to know why you use this more complicated code snippet.

  1. Why do you unbind RET with the following code?

https://github.com/abo-abo/oremacs/blob/d2b2cd8371b94f35a42000debef1c2b644cb9472/modes/ora-company.el#L53

  1. Is it possible to implement a regexp based candidates selection algorithm/feature for the entries shown on the company popup?

Regards, HY