Closed e665107 closed 3 years ago
How large the tags file is?
No tags file in the current directory!
You can install the tramp, and have a try!
Hi.
First, I don't have a remote machine to work with, so I opened files on my own machine (by /sshx:localhost:/path/to/file
).
I intentionally picked directories that don't contain a tags file. Unfortunately I can't reproduce the bug. The file just opens smoothly.
For now I can only guess the reason:
:defer t
and (require 'citre-config)
in your config, and give it another try.I also suggest you try to reproduce it using $ emacs -Q
(and follow the instructions in README to manually load Citre). Sometimes it's not the package you suspect that causes the problems.
Yes, When i comment the :defert and (require 'citre-config), it works well! I think this issue has been sovled!Thanks a lot,friend!
I think this issue has been sovled
No. This line:
(add-hook 'find-file-hook #'citre-auto-enable-citre-mode)
in citre-config.el
causes the problem. If you remove (require 'citre-config)
, then citre-mode
won't be automatically enabled when a tags file could be found.
First, I still suspect it's projectile's problem. If you open the file that has the problem, then eval (projectile-project-root)
, how is the speed?
If it's fast, then it's Citre's problem. If you are interested in the problem, I'd like you to do a little more tests:
:defer t
and (require 'citre-config)
back to your ocnfiguration.We have 4 variables: citre-tags-file-alist
(nil by default), citre-tags-file-global-cache-dir
, citre-tags-file-per-project-cache-dir
, and citre-tags-files
. If anyone of them is nil
, certain procedures are skipped when finding a tags file.
I'd like you to set one of them to nil
(one at a time), reopen the file, and see which one causes the problem.
It works well now,after the .tags has been generated, the citre-jump and citre-peek can be exectued as usual! But after question comes: Error in post-command-hook (citre-peek--update-display): (void-variable start), when i use the citre-peek mode, but citre-jump is ok!
Let's focus on one problem in one issue.
For the original problem: if you are still interested in it, please, do the test I described. but it's ok if you think it's solved, then please close this issue.
For the citre-peek
problem: I can't understand why this happens, but you can open a new issue for it. Open debug-on-error
(by M-x toggle-debug-on-error
. After you've encounterd the problem, eval (citre-peek--update-display)
and paste the backtrace there.
When i use tramp in the dired mode, press the 'v' to open a file, it will be stopped, my friend, you can have a try. eg: Tramp: Inserting ‘/ssh:root@192.168.100.140:/root/gmssl/gmssl/GmSSL-master/apps/asn1pars.c’...done
My config code as follow: (use-package citre :defer t :init (require 'citre-config) (defun prog-mode-citre-bindings() (local-set-key (kbd "C-c j") 'citre-jump) (local-set-key (kbd "C-c l") 'citre-jump-back) (local-set-key (kbd "C-SPC o") 'citre-peek) (local-set-key (kbd "C-c i") 'custom-citre-completion-at-point) ) (defun prog-mode-citre-c-bindings() (local-set-key (kbd "C-SPC o") 'citre-peek) (local-set-key (kbd "C-SPC i") 'citre-peek-through) (local-set-key (kbd "C-SPC f") 'citre-peek-chain-forward) (local-set-key (kbd "C-SPC j") 'citre-peek-chain-backward) (local-set-key (kbd "C-SPC p") 'citre-peek-next-definition) (local-set-key (kbd "C-SPC n") 'citre-peek-prev-definition) (local-set-key (kbd "C-c i") 'custom-citre-completion-at-point) ) (add-hook 'verilog-mode-hook 'prog-mode-citre-bindings) (add-hook 'c-mode-hook 'prog-mode-citre-c-bindings) (setq ;; Set these if readtags/ctags is not in your path. ;; citre-readtags-program "/path/to/readtags" ;; citre-ctags-program "/path/to/ctags" ;; Set this if you use project management plugin like projectile. It's ;; used for things like displaying paths relatively, see its docstring. citre-project-root-function #'projectile-project-root ;; Set this if you want to always use one location to create a tags file. citre-default-create-tags-file-location 'global-cache ;; See the "Create tags file" section above to know these options citre-use-project-root-when-creating-tags t citre-prompt-language-for-ctags-command t) ) Please give a advice on this problem! Thank you!