redguardtoo / company-ctags

Fastest Emacs auto-completion using Company and Ctags
GNU General Public License v3.0
56 stars 3 forks source link

Company: An error occurred in auto-begin #15

Closed RTCFoundation closed 2 years ago

RTCFoundation commented 2 years ago

你好,我使用company-ctags时,messages窗口报 Company: An error occurred in auto-begin Wrong type argument: hash-table-p, nil

然后,M-x toggle-debug-on-error,打印的下面的错误,请问是怎么回事呢 1 Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) 2 gethash(#("MyServiceWithStream" 0 19 (company-backend company-ctags)) nil) 3 company-statistics-score-calc-heavy(#("MyServiceWithStream" 0 19 (company-backend company-ctags))) 4 #f(compiled-function (cand1 cand2) #<bytecode 0xc24191>)(#("MyServiceWithStream" 0 19 (company-backend company-ctags)) "MyServiceWithStream") 5 sort(("MyServiceWithStream") #f(compiled-function (cand1 cand2) #<bytecode 0xc24191>)) 6 company-sort-by-statistics(("MyServiceWithStream")) 7 company--transform-candidates(("MyServiceWithStream")) 8 company--postprocess-candidates(("MyServiceWithStream" #("MyServiceWithStream" 0 19 (company-backend company-ctags)))) 9 company-calculate-candidates(#("MyServic" 0 7 (fontified t) 7 8 (ws-butler-chg chg fontified t)) nil) 10 company--begin-new() 11 company--perform() 12 company-auto-begin() 13 company-idle-begin(# #<window 1 on test_streaming_rpc.cpp> 1104 935) 14 apply(company-idle-begin (# #<window 1 on test_streaming_rpc.cpp> 1104 935)) 15 timer-event-handler([t 25099 4008 78867 nil company-idle-begin (# # <window 1 on test_streaming_rpc.cpp> 1104 935) nil 85000])

redguardtoo commented 2 years ago

Have you built the TAGS file? Run ctags -e -R . in source directory to create TAGS file first.

RTCFoundation commented 2 years ago

我是使用cousel-etags 命令产生的tags文件,可以代码导航。现在就是补全有点问题

RTCFoundation commented 2 years ago

Message窗口输出: /mnt/test/baidu-rpc/TAGS is loaded. Company: An error occurred in auto-begin Wrong type argument: hash-table-p, nil 可以看出是已经加载了文件了

redguardtoo commented 2 years ago

Maybe it's company-statistics, looks my package is ok.

You can remove ~/.emacs.d/company-statistics-cache.el and restart emacs.

RTCFoundation commented 2 years ago

删掉company-statistics-cache.el 就可以了