Add ein:worksheet-execute-all-cell

This commit is contained in:
Takafumi Arakaki 2012-08-19 20:42:29 +02:00
parent 7e8ec0710c
commit 856d49e0db
2 changed files with 6 additions and 10 deletions

View file

@ -434,16 +434,6 @@ of minor mode."
(ein:notebook-restart-kernel ein:%notebook%))
(ein:log 'error "Not in notebook buffer!")))
(defun ein:notebook-execute-all-cell ()
"Execute all cells in the current notebook buffer."
(interactive)
(if ein:%notebook%
(loop for cell in (ein:notebook-get-cells ein:%notebook%)
when (ein:codecell-p cell)
do (ein:cell-execute cell))
(ein:log 'error "Not in notebook buffer!")))
(define-obsolete-function-alias
'ein:notebook-request-tool-tip-or-help-command
'ein:pytools-request-tooltip-or-help "0.1.2")

View file

@ -575,6 +575,12 @@ next cell, or insert if none."
(ein:cell-goto it)
(ein:worksheet-insert-cell-below ws 'code cell)))
(defun ein:worksheet-execute-all-cell (ws)
"Execute all cells in the current worksheet buffer."
(interactive (list (ein:worksheet--get-ws-or-error)))
(mapc #'ein:cell-execute
(ein:filter #'ein:codecell-p (ein:worksheet-get-cells ws))))
;;; Generic getter