FAQ
Hi,

I don't know if I should ask this here or on an emacs group/list. If I choose wrong, please forgive me.

I am trying to run pychecker on the current buffer on python-mode using the py-pychecker-run command, but it fails with the "Symbol's function definition is void: read-shell-command" error. I don't know elisp, but seems this is the point where the error occurs:

;; Pychecker
(defun py-pychecker-run (command)
"*Run pychecker (default on the file currently visited)."
(interactive
(let ((default
(format "%s %s %s" py-pychecker-command
(mapconcat 'identity py-pychecker-command-args " ")
(buffer-file-name)))
(last (when py-pychecker-history
(let* ((lastcmd (car py-pychecker-history))
(cmd (cdr (reverse (split-string lastcmd))))
(newcmd (reverse (cons (buffer-file-name) cmd))))
(mapconcat 'identity newcmd " ")))))

(list
(read-shell-command "Run pychecker like this: "
(if last
last
default)
'py-pychecker-history))))
(save-some-buffers (not py-ask-about-save) nil)
(compile-internal command "No more errors"))

;

And as far as I can understand, seems like my emacs doesn't have the read-shell-command function. If I try to execute or get help on it, it doesn't exist, but there's a shell-command. I tried to change but I still get erros. Is my assumption right ? How can I solve it ?

I am using Gnu Emacs 21.2.2 (Slackware Linux 8.1, full install), python-mode version 4.34 and pychecker 0.8.12

Thanks for any help

Pedro

Search Discussions

  • Skip Montanaro at Aug 18, 2003 at 4:30 pm
    Pedro> I am trying to run pychecker on the current buffer on python-mode
    Pedro> using the py-pychecker-run command, but it fails with the
    Pedro> "Symbol's function definition is void: read-shell-command"
    Pedro> error. I don't know elisp, but seems this is the point where the
    Pedro> error occurs:
    ...
    Pedro> And as far as I can understand, seems like my emacs doesn't have
    Pedro> the read-shell-command function.

    So it would appear. Here's the doc for XEmacs read-shell-command:

    `read-shell-command' is a compiled Lisp function
    -- loaded from "/Users/skip/src/xemacs-21.5.9/lisp/minibuf.elc"
    (read-shell-command PROMPT &optional INITIAL-INPUT HISTORY DEFAULT-VALUE)

    Documentation:
    Just like read-string, but uses read-shell-command-map:

    button2 minibuffer-smart-select-highlighted-completion
    down next-history-element
    linefeed exit-minibuffer
    next Kbd Macro: M-n
    prior Kbd Macro: M-p
    return exit-minibuffer
    tab comint-dynamic-complete
    up previous-history-element
    C-g minibuffer-keyboard-quit
    C-i comint-dynamic-complete
    C-j exit-minibuffer
    C-m exit-minibuffer
    M-? comint-dynamic-list-completions
    M-n next-history-element
    M-p previous-history-element
    M-r previous-matching-history-element
    M-s next-matching-history-element
    M-tab comint-dynamic-complete
    M-C-i comint-dynamic-complete

    And here's its implementation (from minibuf.el):

    (defun read-shell-command (prompt &optional initial-input history default-value)
    "Just like read-string, but uses read-shell-command-map:
    \\{read-shell-command-map}"
    (let ((minibuffer-completion-table nil))
    (read-from-minibuffer prompt initial-input read-shell-command-map
    nil (or history 'shell-command-history)
    nil default-value)))

    Can you see if that definition works for you? If not, what about simply
    substituting (read-string ...) for (read-shell-command ...)?

    Skip
  • Pedro Werneck at Aug 18, 2003 at 3:30 pm

    On Mon, 18 Aug 2003 11:30:36 -0500 Skip Montanaro wrote:

    And here's its implementation (from minibuf.el):

    (defun read-shell-command (prompt &optional initial-input history default-value)
    "Just like read-string, but uses read-shell-command-map:
    \\{read-shell-command-map}"
    (let ((minibuffer-completion-table nil))
    (read-from-minibuffer prompt initial-input read-shell-command-map
    nil (or history 'shell-command-history)
    nil default-value)))

    Can you see if that definition works for you? If not, what about simply
    substituting (read-string ...) for (read-shell-command ...)?
    Ok.. defining and using it returns the same error with "read-shell-command-map", but substituting for read-string works perfectly.

    Thank you, Skip

    Pedro

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedAug 18, '03 at 1:08p
activeAug 18, '03 at 4:30p
posts3
users2
websitepython.org

2 users in discussion

Pedro Werneck: 2 posts Skip Montanaro: 1 post

People

Translate

site design / logo © 2022 Grokbase