universal-ctags / citre

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

Couldn't jump to the new buffer #144

Closed AllTheLife closed 1 year ago

AllTheLife commented 1 year ago

Configurations:

(require-package 'citre)
(setq citre-default-create-tags-file-location 'global-cache)
(setq citre-use-project-root-when-creating-tags t)
(setq citre-prompt-language-for-ctags-command t)
(setq citre-enable-capf-integration t)
(require 'citre-config)

(require-package 'ggtags)

Now if I press C-x C-f to create a new c++ file with lsp-bridge, I won't jump to the new buffer although the file has been created correctly by lsp-bridge.

AmaiKinono commented 1 year ago

I don't know if C-x C-f has anything to do with lsp-bridge. I don't use ggtags or lsp-bridge. I don't know the other parts of your configuration. And, what does it mean by "won't jump to the new buffer"? Did Emacs throw an error? or it's just like nothing happens?

Maintainers can't just look at a bug report like this and guess where the problem exist. Please, provide a recipe to reproduce using $ emacs -Q.

AllTheLife commented 1 year ago

This is a citre and other package conflict issue, I will close this issue first as it cannot be reproduced stably.

AllTheLife commented 1 year ago

Ha, I found out it. citre is not compatible with (desktop-save-mode 1)

masatake commented 1 year ago

citre is not compatible with (desktop-save-mode 1)

Why do you think so?

AllTheLife commented 1 year ago

I found it through binary debugging.

masatake commented 1 year ago

binary debugging? Do you mean attaching gdb to your emacs?

AmaiKinono commented 1 year ago

I think @AllTheLife means consecutively commenting out half of init.el.

We've got bug report about desktop-save-mode in https://github.com/universal-ctags/citre/issues/142, but I can't reproduce it.

Knowing Citre conflicts with desktop-save-mode is useful, but not enough. I'd like a "steps to reproduce" using $ emacs -Q or a minimal init.el, together with:

AllTheLife commented 1 year ago
  1. Install lsp-bridge from https://github.com/manateelazycat/lsp-bridge and load it
  2. (require 'citre) (require 'citre-config) (add-hook 'c++-mode-hook 'citre-mode)
  3. (desktop-save-mode 1)
  4. Open any new c++ file, then you can reproduce the problem
AmaiKinono commented 1 year ago

I didn't encounter any problems using the recipe. I'm on Archlinux, Emacs 28.2 and global 6.6.9. My steps:

(add-to-list 'load-path "") (require 'citre) (require 'citre-config) (add-hook 'c++-mode-hook 'citre-mode)

(desktop-save-mode 1)


  and `eval-buffer`.
- `C-x C-f` and create a new cpp file. The file is opened, `citre-mode` is enabled automatically, and `lsp-bridge` reports that clangd is started.

Am I doing anything wrong?
AllTheLife commented 1 year ago

This doesn't seem to be an issue with Citre. Reproducing this problem requires many packages. So I guess this is caused by conflicts between packages.

Sorry for wasting your time. Thank you for your help.