mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
Missing pieces for pager support.
This commit is contained in:
parent
f476baf850
commit
8ac0b90bf9
2 changed files with 14 additions and 1 deletions
|
@ -112,6 +112,9 @@
|
||||||
`ein:$notebook-kernelinfo' : `ein:kernelinfo'
|
`ein:$notebook-kernelinfo' : `ein:kernelinfo'
|
||||||
`ein:kernelinfo' instance.
|
`ein:kernelinfo' instance.
|
||||||
|
|
||||||
|
`ein:$notebook-pager'
|
||||||
|
Variable for `ein:pager-*' functions. See ein-pager.el.
|
||||||
|
|
||||||
`ein:$notebook-dirty' : boolean
|
`ein:$notebook-dirty' : boolean
|
||||||
Set to `t' if notebook has unsaved changes. Otherwise `nil'.
|
Set to `t' if notebook has unsaved changes. Otherwise `nil'.
|
||||||
|
|
||||||
|
@ -145,6 +148,7 @@
|
||||||
kernel
|
kernel
|
||||||
kernelinfo
|
kernelinfo
|
||||||
kernelspec
|
kernelspec
|
||||||
|
pager
|
||||||
dirty
|
dirty
|
||||||
metadata
|
metadata
|
||||||
notebook-name
|
notebook-name
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
(require 'ein-scratchsheet)
|
(require 'ein-scratchsheet)
|
||||||
(require 'ein-notification)
|
(require 'ein-notification)
|
||||||
(require 'ein-completer)
|
(require 'ein-completer)
|
||||||
|
(require 'ein-pager)
|
||||||
(require 'ein-events)
|
(require 'ein-events)
|
||||||
(require 'ein-notification)
|
(require 'ein-notification)
|
||||||
(require 'ein-kill-ring)
|
(require 'ein-kill-ring)
|
||||||
|
@ -130,6 +131,7 @@ Current buffer for these functions is set to the notebook buffer.")
|
||||||
;; is at:
|
;; is at:
|
||||||
;; https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping
|
;; https://github.com/ipython/ipython/wiki/IPEP-16%3A-Notebook-multi-directory-dashboard-and-URL-mapping
|
||||||
|
|
||||||
|
(defvar ein:notebook-pager-buffer-name-template "*ein:pager %s/%s*")
|
||||||
(defvar ein:notebook-buffer-name-template "*ein: %s/%s*")
|
(defvar ein:notebook-buffer-name-template "*ein: %s/%s*")
|
||||||
|
|
||||||
(ein:deflocal ein:%notebook% nil
|
(ein:deflocal ein:%notebook% nil
|
||||||
|
@ -381,7 +383,14 @@ of minor mode."
|
||||||
(defun ein:notebook-bind-events (notebook events)
|
(defun ein:notebook-bind-events (notebook events)
|
||||||
"Bind events related to PAGER to the event handler EVENTS."
|
"Bind events related to PAGER to the event handler EVENTS."
|
||||||
(setf (ein:$notebook-events notebook) events)
|
(setf (ein:$notebook-events notebook) events)
|
||||||
(ein:worksheet-class-bind-events events))
|
(ein:worksheet-class-bind-events events)
|
||||||
|
;; Bind events for sub components:
|
||||||
|
(setf (ein:$notebook-pager notebook)
|
||||||
|
(ein:pager-new
|
||||||
|
(format ein:notebook-pager-buffer-name-template
|
||||||
|
(ein:$notebook-url-or-port notebook)
|
||||||
|
(ein:$notebook-notebook-name notebook))
|
||||||
|
(ein:$notebook-events notebook))))
|
||||||
|
|
||||||
(defalias 'ein:notebook-reconnect-kernel 'ein:notebook-reconnect-session-command "The distinction between kernel and session is a bit mysterious, all the action is now occurring in `ein:notebook-reconnect-session-command' these days, for which this function is now an alias.")
|
(defalias 'ein:notebook-reconnect-kernel 'ein:notebook-reconnect-session-command "The distinction between kernel and session is a bit mysterious, all the action is now occurring in `ein:notebook-reconnect-session-command' these days, for which this function is now an alias.")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue