「Cygwin の Python を使って run-python を動かすための設定」の編集履歴(バックアップ)一覧はこちら

Cygwin の Python を使って run-python を動かすための設定」(2019/10/31 (木) 22:39:40) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

&bold(){■ MinGW版 Emacs 特有の設定} ---- &bold(){【本題】} ---- Emacs-24系の場合は、次の設定のみでOKです。 (参考: http://stackoverflow.com/questions/8865867/python-shell-in-emacs-24) (setq python-shell-interpreter "python3.2m") ;; (setq python-shell-interpreter "python2.6") ;; (setq python-shell-interpreter "python2.7") Emacs-23系の場合、Windows版 Python(Cygwin版ではなく)を使うことを前提とした動きとなるようです。 run-pythonコマンドの内部で設定される PYTHONPATH が Windows のパス形式になることなどがその理由です。 このため、run-pythonコマンドを Cygwin の Python で動かそうとすると、正常に動作しません。 vbは、これを改善するための設定です。 (setq python-python-command "python3.2m") ;; (setq python-python-command "python2.6") ;; (setq python-python-command "python2.7") (defadvice run-python (around ad-run-python activate) (let ((data-directory (substring (shell-command-to-string (concat "cygpath -u " (shell-quote-argument data-directory))) 0 -1))) ad-do-it)) python-python-command の設定が必要なのは、/usr/bin/python がシンボリックリンクであるためです。このため、python-python-command には、/usr/bin/python のシンボリックリンク先のプログラムを指定しています。 ---- <変更履歴> ・2014/05/09 フォーマット整形を行った。(内容変更はなし) ---- #javascript(){{ <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-40267130-1', 'atwiki.jp'); ga('send', 'pageview'); </script> }}
&bold(){■ MinGW版 Emacs 特有の設定} ---- &bold(){【本題】} ---- Emacs-24系の場合は、次の設定のみでOKです。 (参考: http://stackoverflow.com/questions/8865867/python-shell-in-emacs-24) (setq python-shell-interpreter "python3.2m") ;; (setq python-shell-interpreter "python2.6") ;; (setq python-shell-interpreter "python2.7") Emacs-23系の場合、Windows版 Python(Cygwin版ではなく)を使うことを前提とした動きとなるようです。 run-pythonコマンドの内部で設定される PYTHONPATH が Windows のパス形式になることなどがその理由です。 このため、run-pythonコマンドを Cygwin の Python で動かそうとすると、正常に動作しません。 以下は、これを改善するための設定です。 (setq python-python-command "python3.2m") ;; (setq python-python-command "python2.6") ;; (setq python-python-command "python2.7") (defadvice run-python (around ad-run-python activate) (let ((data-directory (substring (shell-command-to-string (concat "cygpath -u " (shell-quote-argument data-directory))) 0 -1))) ad-do-it)) python-python-command の設定が必要なのは、/usr/bin/python がシンボリックリンクであるためです。このため、python-python-command には、/usr/bin/python のシンボリックリンク先のプログラムを指定しています。 ---- <変更履歴> ・2014/05/09 フォーマット整形を行った。(内容変更はなし) ---- #javascript(){{ <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-40267130-1', 'atwiki.jp'); ga('send', 'pageview'); </script> }}

表示オプション

横に並べて表示:
変化行の前後のみ表示: