Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot insert keybindings into magit-status-jump #192

Open
mmahmoudian opened this issue Oct 1, 2024 · 1 comment
Open

Cannot insert keybindings into magit-status-jump #192

mmahmoudian opened this issue Oct 1, 2024 · 1 comment

Comments

@mmahmoudian
Copy link

Thanks for the useful and handy package and thank you for maintaining it.

I've been lately getting this error when using magit:

Cannot insert [("T" "Todos" magit-todos-jump-to-todos) ("l" "List todos" magit-todos-list)] into magit-status-jump; (0 -1) not found

I checked the existing issues on this repo and considering that no one else have reported this, it might mean that something is wrong with my config, although that is not very likely as my config is fairly minimal. The following is my magit and magit-todos config:

(use-package magit
  :ensure t
  :defer t
  :config
  (defun mm/magit-kill-buffers ()
    "Restore window configuration and kill all Magit buffers.

-------
Author: Manuel Uberti
Date of post: 2018-02-17
URL of post: https://manueluberti.eu/2018/02/17/magit-bury-buffer.html
Date of adoption: 2023-03-29T18:18:39+03:00
-------
"
    (interactive)
    (let ((buffers (magit-mode-get-buffers)))
      (magit-restore-window-configuration)
      (mapc #'kill-buffer buffers)))
  (bind-key "q" #'mm/magit-kill-buffers magit-status-mode-map)
  
  :hook (
         (magit-status-mode . (lambda () (setq
                                   show-trailing-whitespace nil      ; disable the highlighting of trailing whitespace
                                   indicate-empty-lines nil          ; remove the glyph for showing the end of buffer
                                   indicate-buffer-boundaries nil    ; remove the glyphs to show buffer boundaries
                                   )))
        )
  )

(use-package magit-todos
  :ensure t
  :defer t
  :config
    (setq magit-todos-depth 21
          magit-diff-refine-hunk 'all
          ;magit-todos-rg-extra-args " --max-filesize 50K "
          )
    (setq magit-todos-exclude-globs
          (append magit-todos-exclude-globs
                  (list
                   ".git/"
                   "elpy/" "venv/" "bootstrap/"                      ; library folders
                   "*.json" "*.csv" ".xml"                           ; data files
                   "*.zip" "*.tar" "*.gz" "*.xz"                     ; compressed files
                   "*.old" "*.bk"                                    ; backup files
                   "*.log"                                           ; log files
                   "*.js.map"
                   )))
  :hook (
         (magit-mode . magit-todos-mode)
         ))

I would be thankful if you kindly point me to the right direction regarding this issue. If you need further information, I'll be happy to provide them.

@alphapapa
Copy link
Owner

Hi,

Thanks for the useful and handy package and thank you for maintaining it.

Thanks for the kind words. I'm glad it's useful to you.

I've been lately getting this error when using magit:

Please try to reproduce the problem in a clean Emacs config with the latest versions of relevant packages. You might use this script to make that easier: https://github.com/alphapapa/with-emacs.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants