universal-ctags / citre

A superior code reading & auto-completion tool with pluggable backends.
GNU General Public License v3.0
326 stars 26 forks source link

Error in post-command-hook (citre-peek--update-display): (void-variable start) #98

Closed e665107 closed 2 years ago

e665107 commented 2 years ago

hi, friend! How do i avoid this question? When i open a declaration of a variable, emacs will pop up this error. But not all!

AmaiKinono commented 2 years ago

Please give a minimal example that can reproduce the problem. If you can't, enable debug-on-error, and when the problem happens, type M-x eval-expression RET (citre-peek--update-display), and Emacs should show you a backtrace, paste it here.

e665107 commented 2 years ago

Debugger entered--Lisp error: (void-variable citre-peek--update-display) eval(citre-peek--update-display t) eval-expression(citre-peek--update-display nil nil 127) funcall-interactively(eval-expression citre-peek--update-display nil nil 127) call-interactively(eval-expression record nil) command-execute(eval-expression record)

f(compiled-function () #<bytecode 0x51a8985>)()

funcall(#f(compiled-function () #<bytecode 0x51a8985>)) helm-M-x(nil #("eval-expression" 0 15 (match-part "eval-expression"))) funcall-interactively(helm-M-x nil #("eval-expression" 0 15 (match-part "eval-expression"))) call-interactively(helm-M-x nil nil) command-execute(helm-M-x) Above is the backtrace!

e665107 commented 2 years ago

When i use citre to read the linux kernel code , i have come cross this problem! The file is stm32-ipcc.c: line: .send_data = stm32_ipcc_send_data. When i look up the definition of stm32_ipcc_send_data, it appears!

AmaiKinono commented 2 years ago

I haven't get a clue from the backtrace.

Debugger entered--Lisp error: (void-variable citre-peek--update-display)

  1. This treats citre-peek--update-display as a variable. It should be a function.
  2. This is not the same error you reported (in the title).
  3. We do byte compilation in our CI on major Emacs versions, so void-variable error is not likely to happen.

My guess is helm is doing something wrong, or you didn't follow my instruction exactly. Since this:

funcall-interactively(eval-expression citre-peek--update-display nil nil 127)

Should look like this:

funcall-interactively(eval-expression (citre-peek--update-display) nil nil 127)

That's what I meant by "citre-peek--update-display is treated as a variable".

When i use citre to read the linux kernel code , i have come cross this problem! The file is stm32-ipcc.c: line: .send_data = stm32_ipcc_send_data.

It works for me

image

I'd suggest you:

  1. Update Citre to the latest version.
  2. Try it in $ emacs -Q.
  3. If it still happens, give an example or get a backtrace.
e665107 commented 2 years ago

Can you chow me your ctags command! Following is mine! ctags -o .tags --languages=verilog,systemverilog,c,c++ --kinds-all= --fields= --extras=* -R

AmaiKinono commented 2 years ago

No... that tags file was created long time ago, before Citre introduces the recipe system. So the command has gone with the wind.

e665107 commented 2 years ago

All right! Everything is incomplete! Gtags and ctags work with each other help a lot!