Skip to content

File mode specification error: (wrong-number-of-arguments ... #662

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

Closed
sacundim opened this issue May 22, 2015 · 3 comments
Closed

File mode specification error: (wrong-number-of-arguments ... #662

sacundim opened this issue May 22, 2015 · 3 comments

Comments

@sacundim
Copy link

Fresh MELPA install of version 13.12, when attempting to load a .hs file in the same directory that has a .cabal file:

File mode specification error: (wrong-number-of-arguments #[(other-window) "�\203$�\303\304�!!\211�\203��
\203��\305  !\202\"�\306    !\202\"�\307\310�\")\207\307\311!\207" [buffer-file-name cabal-file other-window haskell-cabal-find-file file-name-directory find-file-other-window find-file error "Could not locate \".cabal\" file for %S" "Cannot locate \".cabal\" file for buffers not visiting any file"] 4 ("/Users/sacundim/.emacs.d/elpa/haskell-mode-13.12/haskell-cabal.elc" . 9453) "P"] 0)

Emacs version:

GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org

Haskell mode configuration:

(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

(eval-after-load "haskell-mode"
  '(progn
     (define-key haskell-mode-map (kbd "C-x C-d") nil)
     (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
     (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
     (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch)
     (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
     (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
     (define-key haskell-mode-map (kbd "C-c M-.") nil)
     (define-key haskell-mode-map (kbd "C-c C-d") nil)))

(eval-after-load "haskell-mode"
  (define-key haskell-mode-map (kbd "C-c v c") 'haskell-cabal-visit-file))
@sacundim
Copy link
Author

Removing this bit from the Emacs init file resolves the issue:

(eval-after-load "haskell-mode"
  (define-key haskell-mode-map (kbd "C-c v c") 'haskell-cabal-visit-file))

But I got those lines from the haskell-cabal-mode chapter in the info file that comes with the mode.

@syohex
Copy link
Contributor

syohex commented May 22, 2015

@sacundim You miss quote at 2nd eval-after-load.

(eval-after-load "haskell-mode"
  '(define-key haskell-mode-map (kbd "C-c v c") 'haskell-cabal-visit-file))

@sacundim
Copy link
Author

@syohex Good catch! I copypasted the code from the *info* buffer, but it turns out that the docs were wrong and were only recently fixed:

03d3c7c

I'm closing this issue.

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