[IPython-dev] Event rename_notebook.Notebook

Andrew Payne andy at payne.org
Mon Jun 23 10:15:08 EDT 2014


>
> 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):

Notebook.prototype.rename_success = function (json, status, xhr) {
        var name = this.notebook_name = json.name;
        var path = json.path;
        this.session.rename_notebook(name, path);
        $([IPython.events]).trigger('notebook_renamed.Notebook', json);
    };

-andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140623/6f302bf8/attachment.html>


More information about the IPython-dev mailing list