<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Hi everyone — I'm seeking a simple python mode where I can press C-c C-r and send an expression to an inferior python</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I added a Different Python Mode as directed at</div>
<div class=""><a href="https://www.emacswiki.org/emacs/CustomizeAquamacs#toc14" class="">https://www.emacswiki.org/emacs/CustomizeAquamacs#toc14</a></div>
<div class="">namely Fabián E. Gallina's python-model.el</div>
<div class="">It works well enough for sending expressions, but I always get this error:</div>
<div class=""><br class="">
</div>
<div class=""></div>
<blockquote type="cite" class="">
<div class="">Warning (python): Your ‘python-shell-interpreter’ doesn’t seem to support readline</div>
<div class="">...</div>
<div class="">Native completions have been disabled locally.</div>
</blockquote>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">and the modeline declares "Shell native completion is disabled, using fallback"</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">of course, my python (v3.6.8, Dec. 24, 2018 <a href="https://www.python.org/downloads/mac-osx/" class="">https://www.python.org/downloads/mac-osx/</a> ) *DOES* have readline</div>
<div class="">Since I am using Aquamacs 3.4 which corresponds to GNU Emacs 25.3.50.1</div>
<div class="">I tried the fix mentioned here</div>
<div class=""><a href="https://emacs.stackexchange.com/questions/30082/your-python-shell-interpreter-doesn-t-seem-to-support-readline" class="">https://emacs.stackexchange.com/questions/30082/your-python-shell-interpreter-doesn-t-seem-to-support-readline</a></div>
<div class="">but that doesn't work. I don't see what's wrong, since in the inferior buffer I get:</div>
<div class=""><br class="">
</div>
<div class="">python.el: native completion setup loaded</div>
<div class=""><br class="">
</div>
<div class="">suggesting that the python-shell-completion-setup-code did run successfully.</div>
<div class=""><br class="">
</div>
<div class="">on the other hand, evaluating the expression (python-shell-completion-native-setup) directly</div>
<div class="">yields this error which makes me think it went looking for that special confirmation string and didn't find it:</div>
<div class=""><br class="">
</div>
<div class="">looking-back: Invalid search bound (wrong side of point)</div>
<div class=""><br class="">
</div>
<div class="">I'm guessing the search that's going wrong is the one specified in python.el near line 3416</div>
<div class=""></div>
<blockquote type="cite" class="">
<div class=""> (save-excursion</div>
<div class=""> (re-search-backward</div>
<div class=""> (regexp-quote "python.el: native completion setup loaded") nil t 1))</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">But I am not enough of an elisp hacker to tell what's going wrong.</div>
<div class=""><br class="">
</div>
<div class="">Has anybody gotten this to work properly on Aquamacs? I ask because I'd like to be able to point students</div>
<div class="">to an Aquamacs setup that works the same as what they'll be seeing on a shared machine that has Emacs 24.3.1</div>
<div class="">where C-c C-r does really send a region to the inferior buffer.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">best,</div>
<div class="">-john</div>
<div class=""><br class="">
</div>
<div class="">PS</div>
<div class="">I did try with the Aquamacs-bundled python-mode.el by Andreas Röhler</div>
<div class="">but there the send command is bound to C-| and seemed to always send the entire buffer, regardless of how the region is set.</div>
<div class="">I could not figure out how to get around this. If this could be made to work, it would also achieve my desired goal.</div>
<div class="">
<div><font color="#ffffff" class="">SSN transport rule bypass code: 810-23-2567-984-015</font></div>
</div>
<br class="">
</body>
</html>