Merge branch 'expand-output-on-execution'

Expand cell when kernel send some output.

fixes #88
This commit is contained in:
Takafumi Arakaki 2012-12-06 22:04:59 +01:00
commit 0778b4df72
2 changed files with 14 additions and 5 deletions

View file

@ -543,6 +543,8 @@ Change Log
v0.2
----
* Expand code cell output on execution.
(`#88 <https://github.com/tkf/emacs-ipython-notebook/issues/88>`_).
* Improve :el:symbol:`ein:completer-dot-complete` and
:el:symbol:`ein:jedi-dot-complete`. Do not expand common part when
inserting dot, to make typing code containing dots less surprising.

View file

@ -602,10 +602,17 @@ If the input area of the CELL does not exist, return `nil'"
(defmethod ein:cell-set-collapsed ((cell ein:codecell) collapsed)
"Set `:collapsed' slot of CELL and invalidate output ewoc nodes."
(oset cell :collapsed collapsed)
(apply #'ewoc-invalidate
(oref cell :ewoc)
(ein:cell-element-get cell :output)))
(unless (eq (oref cell :collapsed) collapsed)
(oset cell :collapsed collapsed)
(apply #'ewoc-invalidate
(oref cell :ewoc)
(ein:cell-element-get cell :output))))
(defmethod ein:cell-collapse ((cell ein:codecell))
(ein:cell-set-collapsed cell t))
(defmethod ein:cell-expand ((cell ein:codecell))
(ein:cell-set-collapsed cell nil))
(defmethod ein:cell-toggle-output ((cell ein:codecell))
"Toggle `:collapsed' slot of CELL and invalidate output ewoc nodes."
@ -746,7 +753,7 @@ If END is non-`nil', return the location of next element."
(intern (format "output-%s" (plist-get json :stream)))))))
(defmethod ein:cell-append-output ((cell ein:codecell) json dynamic)
;; (ein:cell-expand cell)
(ein:cell-expand cell)
;; (ein:flush-clear-timeout)
(oset cell :outputs
(append (oref cell :outputs) (list json)))