rolandwalker / fixmee

Quickly navigate to FIXME notices in Emacs
65 stars 4 forks source link

error when enabling global-fixmee-mode #12

Closed stardiviner closed 4 years ago

stardiviner commented 8 years ago
Symbol's function definition is void: button-lock-parent-modes
Error in post-command-hook (global-fixmee-mode-check-buffers): (void-function button-lock-parent-modes)
rolandwalker commented 8 years ago

Hi!

The button-lock package is a requirement for fixmee-mode. Button-lock can be installed from

or via MELPA. There is also a version on Marmalade, though it is difficult to keep it up-to-date.

stardiviner commented 8 years ago

I did install it on MELPA. But got this error.

stardiviner commented 8 years ago

I did install it on MELPA. But got this error. Here is my config:e

(use-package fixmee
  :ensure t
  :init
  ;; disable fixmee default global keybindings.
  (setq fixmee-smartrep-prefix nil
        fixmee-view-listing-keystrokes nil
        fixmee-goto-nextmost-urgent-keystrokes nil
        fixmee-goto-next-by-position-keystrokes nil
        fixmee-goto-prevmost-urgent-keystrokes nil
        fixmee-goto-previous-by-position-keystrokes nil)

  :config
  (setq fixmee-cache-refresh-interval 30)

  (set-face-attribute 'fixmee-notice-face nil
                      :background "dark orange" :foreground "#222222"
                      :weight 'bold
                      )

  ;; (add-to-list 'fixmee-exclude-modes 'xxx-mode)
  (global-fixmee-mode 1)

  (dolist (hook '(prog-mode-hook
                  ))
    (add-hook hook 'fixmee-mode))

  (define-key my-prog-comment-fixme-map (kbd "l") 'fixmee-view-listing)
  (define-key my-prog-comment-fixme-map (kbd "n") 'fixmee-goto-next-by-position)
  (define-key my-prog-comment-fixme-map (kbd "p") 'fixmee-goto-previous-by-position)
  (define-key my-prog-comment-fixme-map (kbd "N") 'fixmee-goto-nextmost-urgent)
  (define-key my-prog-comment-fixme-map (kbd "P") 'fixmee-goto-prevmost-urgent)
  )
rolandwalker commented 8 years ago

Did you fix this or give up? I do care but am way behind due to travel.

stardiviner commented 8 years ago

When I load global-fixmee-mode manually after Emacs launched. It's find. No error report. But when I put in (use-package) macro, it will produce this error. And I tested with emacs -q. Here is the way to reproduce it:

  1. $ emacs -q
  2. [M-x package-initialize]

Load the bellowing code:

(use-package fixmee
  :ensure t
  :init
  ;; disable fixmee default global keybindings.
  (setq fixmee-smartrep-prefix nil
        fixmee-view-listing-keystrokes nil
        fixmee-goto-nextmost-urgent-keystrokes nil
        fixmee-goto-next-by-position-keystrokes nil
        fixmee-goto-prevmost-urgent-keystrokes nil
        fixmee-goto-previous-by-position-keystrokes nil)

  :config
  (setq fixmee-cache-refresh-interval 30)

  (set-face-attribute 'fixmee-notice-face nil
                      :background "dark orange" :foreground "#222222"
                      :weight 'bold
                      )

  ;; (add-to-list 'fixmee-exclude-modes 'xxx-mode)
  (global-fixmee-mode 1)

  (define-key my-prog-comment-fixme-map (kbd "l") 'fixmee-view-listing)
  (define-key my-prog-comment-fixme-map (kbd "n") 'fixmee-goto-next-by-position)
  (define-key my-prog-comment-fixme-map (kbd "p") 'fixmee-goto-previous-by-position)
  (define-key my-prog-comment-fixme-map (kbd "N") 'fixmee-goto-nextmost-urgent)
  (define-key my-prog-comment-fixme-map (kbd "P") 'fixmee-goto-prevmost-urgent)
  )
gabriel4649 commented 8 years ago

I have the same issue.

zhihuiFan commented 7 years ago

I also run into this issue.
Here is my Environment.

dbbox@ubuntu:~/.emacs.d/elpa$ ls |egrep 'fixmee|button-lock'
button-lock-20150223.554
fixmee-20150223.555

dbbox@ubuntu:~/.emacs.d/elpa$ emacs --version
GNU Emacs 26.0.50.2

By taking the @stardiviner 's suggestion, I added the following code into my .emacs. This helps a lot for my case

(defun turn-on-fixmee () (fixmee-mode 1))
(add-hook 'python-mode-hook 'turn-on-fixmee)

currently I mainly work on python-mode, so this is enough for now.

wendelscardua commented 7 years ago

I had the same error. Calling (require 'button-lock) before (require 'fixmee) fixed it:

(require 'button-lock)
(require 'fixmee)
(global-fixmee-mode 1)
ottopichlhoefer commented 7 years ago

With use-package this worked:

(use-package fixmee
  :init (require 'button-lock)
  :config (global-fixmee-mode 1))