Skip to main content
1 of 4
oOosys
  • 505
  • 3
  • 12

Interactive call aware function test problem ( Wrong type argument: commandp )

Below what the `Messages" buffer tells me:

Unable to activate package ‘helm’.
Required package ‘helm-core-3.9.0’ is unavailable
  .emacs  file HERE ...
Loading /A/su/txtEditors/emacs/setup-init/neo-emacs-init.el (source)...
  neo-emacs-init.el  file HERE ...
interactive-aware-fun called-interactively-p : nil
Unable to activate package ‘helm’.
Required package ‘helm-core-3.9.0’ is unavailable
neo-emacs-init.el HERE, setting background to green
neo-emacs-init.el HERE, after setting background to green
 ...  neo-emacs-init.el LAST STATEMENT
Loading /A/su/txtEditors/emacs/setup-init/neo-emacs-init.el (source)...done
 ...  .emacs  AFTER (load-file ...)
Wrote /home/neo/.emacs.d/.emacs.desktop.lock
Desktop: 1 frame, 4 buffers restored.
For information about GNU Emacs and the GNU system, type SPC h C-a.
command-execute: Wrong type argument: commandp, interactive-aware-fun
Mark set

Here the excerpt from the initialization file:

(defun interactive-aware-fun ()
    (message "interactive-aware-fun called-interactively-p : %s" (called-interactively-p))
)
(interactive-aware-fun)
(global-set-key (kbd "<f9>") 'interactive-aware-fun)

Why does a F9 press give me the message:

command-execute: Wrong type argument: commandp, interactive-aware-fun

? I am doing similar things in the initialization file and all work ok. This one gives me this message instead of the output the function provides if called from the initialization file.

oOosys
  • 505
  • 3
  • 12