我無法在Mac OS X上使用Python模式在Emacs上工作(我是一個相對OS X新手&,不完全是Elisp專家)。無法在Mac OS X上使用Emacs的python模式工作
我從http://emacsformacosx.com/安裝了Emacs。該版本報告爲2011年12月13日在bob.porkrind.org上的「GNU Emacs 23.3.1(x86_64-apple-darwin,NS apple-appkit-1038.36)」
我在我的~/.emacs
中有以下幾行文件:
(add-to-list 'load-path "/Applications/Emacs.app/Contents/Resources/lisp/progmodes")
(setq auto-mode-alist
(cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode) interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python Editing Mode" t)
但每當我打開一個文件與.py
擴展,模式仍然Fundamental
。
提交一份報告,沒有工作。獲取_File模式規範錯誤:(文件錯誤「無法打開加載文件」「python-mode」)_ 前面提到的路徑中有一個'python.elc'('/Applications/Emacs.app/Contents/Resources/lisp/progmodes') – markvgti
使用「load-path」添加的路徑是否必須指向實際的'.el | .elc'文件,或者只是相關的'.el | .elc'文件所在的目錄載? – markvgti
它應該指向該文件。 (加載「〜/ .emacs.d/py_mode/6.0.6python-mode.el」) (請參閱答案上的編輯) – peixe