[英]Emacs Python-inferior shell not showing prompt after matplotlib show() command
[英]setting emacs inferior process prompt location
我喜歡emacs,我正在努力獲得python開發的最佳設置。 我目前正在使用elpy模式和python3.4解釋器,它工作得很好。 最近讓我煩惱的一件事是我的提示默認為緩沖區的中間位置。 由於這個原因,這里浪費了很多空間。
有誰知道如何告訴emacs將我的提示保持在底部,就像正常的shell提示一樣? 我想它是這樣的:
(setq prompt-on-bottom-of-buffer t)
以下是我對comint-output-filter-functions的設置:
(setq comint-output-filter-functions 'comint-truncate-buffer
comint-buffer-maximum-size 1000
comint-scroll-show-maximum-output t
comint-input-ring-size 500
comint-scroll-to-bottom-on-input t)
差不多;)
(setq comint-scroll-to-bottom-on-input t)
問題已經很老了,但是這個難題的另一個變量是comint-move-point-for-output
而且, python-inferior-mode
在本地重置comint-output-filter-functions
,因此在文檔中建議使用inferior-python-mode-hook
重寫/覆蓋它。 由於python-inferior-mode
已經設置了comint-postoutput-scroll-to-bottom
,我們只需要做一件事:
(add-hook 'inferior-python-mode-hook
(lambda ()
(setq comint-move-point-for-output t)))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.