[IPython-dev] Event rename_notebook.Notebook

Matthias Bussonnier bussonniermatthias at gmail.com
Mon Jun 23 10:43:28 EDT 2014


Le 23 juin 2014 à 16:23, Konrad Hinsen a écrit :

> Andrew Payne writes:
> 
>>    I am trying to catch notebook rename events, using the event
>>    rename_notebook.Notebook. However, my explorations show that when this
>>    event is triggered, the notebook still has its previous name.
>> 
>> Does the notebook_renamed.Notebook event give you what you want?   It looks like it's
>> triggered after the rename. Here's the relevant fragment from notebook.js (dev head):
> 
> That one works, thanks!
> 
> BTW, is there a list of events somewhere, ideally with some documentation?

No, sorry. We should already find how to document JS. 

And yes, there seem to be inconsistencies.
-- 
M

$ grep -r IPython.events **/*.js | cut -f2 -d\$  | grep trigger | cut -f3 -d\( | cut -f1 -d\) | sort | uniq
"autosave_disabled.Notebook"
"autosave_enabled.Notebook", interval
"set_dirty.Notebook", {value: true}
"trust_changed.Notebook", trusted
'app_initialized.NotebookApp'
'checkpoint_created.Notebook', data
'checkpoint_delete_failed.Notebook'
'checkpoint_deleted.Notebook', data
'checkpoint_failed.Notebook'
'checkpoint_restore_failed.Notebook'
'checkpoint_restored.Notebook'
'checkpoints_listed.Notebook', [data]
'command_mode.Cell', {cell: that}
'command_mode.Notebook'
'create.Cell', {'cell': cell, 'index': index}
'delete.Cell', {'cell': cell, 'index': i}
'edit_mode.Cell', {cell: that}
'edit_mode.Notebook'
'event.Namespace'
'execution_request.Kernel', {kernel: this, content:content}
'input_reply.Kernel', {kernel: this, content:content}
'list_checkpoints_failed.Notebook'
'notebook_load_failed.Notebook', [xhr, status, error]
'notebook_loaded.Notebook'
'notebook_loading.Notebook'
'notebook_rename_failed.Notebook', [xhr, status, error]
'notebook_renamed.Notebook', json
'notebook_restoring.Notebook', checkpoint
'notebook_save_failed.Notebook', [xhr, status, error]
'notebook_saved.Notebook'
'notebook_saving.Notebook'
'open_with_text.Pager', payload
'output_appended.OutputArea', [type, json[type], md, toinsert]
'output_appended.OutputArea', [type, value, md, toinsert]
'preset_activated.CellToolbar', {name: preset_name}
'preset_added.CellToolbar', {name: name}
'rebuild.QuickHelp'
'rename_notebook.Notebook', data
'select.Cell', {'cell':that}
'selected_cell_type_changed.Notebook',
'send_input_reply.Kernel', value
'sessions_loaded.Dashboard', this.sessions
'set_dirty.Notebook', {value: true}
'set_dirty.Notebook', {value: value}
'set_next_input.Notebook', data
'shell_reply.Kernel', {kernel: this, reply:reply}
'status_autorestarting.Kernel', {kernel: this}
'status_busy.Kernel'
'status_busy.Kernel', {kernel: this}
'status_dead.Kernel', {kernel: this}
'status_idle.Kernel'
'status_idle.Kernel', {kernel: this}
'status_interrupting.Kernel', {kernel: this}
'status_restarting.Kernel'
'status_restarting.Kernel', {kernel: this}
'status_started.Kernel', {kernel: this}
'websocket_closed.Kernel',


> 
> Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list