{"action":"created","comment":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments/174026468","pull_request_review_id":103306786,"id":174026468,"diff_hunk":"@@ -1667,7 +1666,9 @@ def on_file_updated(self, elem, text):\n             elem.set_value(text)\n         except webelem.OrphanedError as e:\n             message.error('Edited element vanished')\n+            ed.backup()\n         except webelem.Error as e:\n+            ed.backup()\n             raise cmdexc.CommandError(str(e))","path":"qutebrowser/browser/commands.py","position":33,"original_position":33,"commit_id":"38bb3673db2215e0d88f56673b2c25893e286132","original_commit_id":"38bb3673db2215e0d88f56673b2c25893e286132","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars0.githubusercontent.com/u/625793?v=4","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"body":"Probably would make sense to make those two consistent - i.e. do `ed.backup()` and then `raise cmdexc.CommandError` at both places, or use `message.error` and then `ed.backup()` at both places.","created_at":"2018-03-13T06:27:12Z","updated_at":"2018-03-13T06:28:49Z","html_url":"https://github.com/qutebrowser/qutebrowser/pull/3704#discussion_r174026468","pull_request_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments/174026468"},"html":{"href":"https://github.com/qutebrowser/qutebrowser/pull/3704#discussion_r174026468"},"pull_request":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704"}}},"pull_request":{"url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704","id":174354557,"html_url":"https://github.com/qutebrowser/qutebrowser/pull/3704","diff_url":"https://github.com/qutebrowser/qutebrowser/pull/3704.diff","patch_url":"https://github.com/qutebrowser/qutebrowser/pull/3704.patch","issue_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3704","number":3704,"state":"open","locked":false,"title":"Preserve a backup if editor callback fails.","user":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars3.githubusercontent.com/u/2496231?v=4","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"body":"Currently the editor deletes its temp file whenever editing is finished.\r\nWith this patch, the file will not be deleted if the editor callback\r\nencounters an exception.\r\n\r\nOne example is if the tab containing the edited element is closed. The\r\neditor errors with \"Edited element vanished\", but with this patch it\r\nwill also print \"Backup at ...\" so the user does not lose their work.\r\n\r\nResolves #1596.\r\n\r\nSupersedes #3641, using the cleaner approach started in #1677.\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/qutebrowser/qutebrowser/3704)\n<!-- Reviewable:end -->\n","created_at":"2018-03-12T12:35:42Z","updated_at":"2018-03-13T06:28:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44a741af507d7c19205724a156b03f25cd340779","assignee":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars3.githubusercontent.com/u/2496231?v=4","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"assignees":[{"login":"rcorre","id":2496231,"avatar_url":"https://avatars3.githubusercontent.com/u/2496231?v=4","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":628333195,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/component:%20editor","name":"component: editor","color":"0052cc","default":false},{"id":267497012,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/priority:%201%20-%20middle","name":"priority: 1 - middle","color":"0e8a16","default":false},{"id":708435425,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/status:%20needs%20review","name":"status: needs review","color":"fef2c0","default":false},{"id":412902921,"url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels/status:%20work%20in%20progress","name":"status: work in progress","color":"006b75","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704/commits","review_comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704/comments","review_comment_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3704/comments","statuses_url":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/38bb3673db2215e0d88f56673b2c25893e286132","head":{"label":"rcorre:edit-backup","ref":"edit-backup","sha":"38bb3673db2215e0d88f56673b2c25893e286132","user":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars3.githubusercontent.com/u/2496231?v=4","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"repo":{"id":55292706,"name":"qutebrowser","full_name":"rcorre/qutebrowser","owner":{"login":"rcorre","id":2496231,"avatar_url":"https://avatars3.githubusercontent.com/u/2496231?v=4","gravatar_id":"","url":"https://api.github.com/users/rcorre","html_url":"https://github.com/rcorre","followers_url":"https://api.github.com/users/rcorre/followers","following_url":"https://api.github.com/users/rcorre/following{/other_user}","gists_url":"https://api.github.com/users/rcorre/gists{/gist_id}","starred_url":"https://api.github.com/users/rcorre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcorre/subscriptions","organizations_url":"https://api.github.com/users/rcorre/orgs","repos_url":"https://api.github.com/users/rcorre/repos","events_url":"https://api.github.com/users/rcorre/events{/privacy}","received_events_url":"https://api.github.com/users/rcorre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcorre/qutebrowser","description":"A keyboard-driven, vim-like browser based on PyQt5.","fork":true,"url":"https://api.github.com/repos/rcorre/qutebrowser","forks_url":"https://api.github.com/repos/rcorre/qutebrowser/forks","keys_url":"https://api.github.com/repos/rcorre/qutebrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcorre/qutebrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcorre/qutebrowser/teams","hooks_url":"https://api.github.com/repos/rcorre/qutebrowser/hooks","issue_events_url":"https://api.github.com/repos/rcorre/qutebrowser/issues/events{/number}","events_url":"https://api.github.com/repos/rcorre/qutebrowser/events","assignees_url":"https://api.github.com/repos/rcorre/qutebrowser/assignees{/user}","branches_url":"https://api.github.com/repos/rcorre/qutebrowser/branches{/branch}","tags_url":"https://api.github.com/repos/rcorre/qutebrowser/tags","blobs_url":"https://api.github.com/repos/rcorre/qutebrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcorre/qutebrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcorre/qutebrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcorre/qutebrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcorre/qutebrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/rcorre/qutebrowser/languages","stargazers_url":"https://api.github.com/repos/rcorre/qutebrowser/stargazers","contributors_url":"https://api.github.com/repos/rcorre/qutebrowser/contributors","subscribers_url":"https://api.github.com/repos/rcorre/qutebrowser/subscribers","subscription_url":"https://api.github.com/repos/rcorre/qutebrowser/subscription","commits_url":"https://api.github.com/repos/rcorre/qutebrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcorre/qutebrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcorre/qutebrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcorre/qutebrowser/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcorre/qutebrowser/contents/{+path}","compare_url":"https://api.github.com/repos/rcorre/qutebrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcorre/qutebrowser/merges","archive_url":"https://api.github.com/repos/rcorre/qutebrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcorre/qutebrowser/downloads","issues_url":"https://api.github.com/repos/rcorre/qutebrowser/issues{/number}","pulls_url":"https://api.github.com/repos/rcorre/qutebrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/rcorre/qutebrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/rcorre/qutebrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcorre/qutebrowser/labels{/name}","releases_url":"https://api.github.com/repos/rcorre/qutebrowser/releases{/id}","deployments_url":"https://api.github.com/repos/rcorre/qutebrowser/deployments","created_at":"2016-04-02T12:12:14Z","updated_at":"2016-04-02T12:12:15Z","pushed_at":"2018-03-12T12:35:08Z","git_url":"git://github.com/rcorre/qutebrowser.git","ssh_url":"git@github.com:rcorre/qutebrowser.git","clone_url":"https://github.com/rcorre/qutebrowser.git","svn_url":"https://github.com/rcorre/qutebrowser","homepage":"http://www.qutebrowser.org/","size":30873,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qutebrowser:master","ref":"master","sha":"8c5b7bcd0395f113383a730752b766636c50f776","user":{"login":"qutebrowser","id":21955151,"avatar_url":"https://avatars1.githubusercontent.com/u/21955151?v=4","gravatar_id":"","url":"https://api.github.com/users/qutebrowser","html_url":"https://github.com/qutebrowser","followers_url":"https://api.github.com/users/qutebrowser/followers","following_url":"https://api.github.com/users/qutebrowser/following{/other_user}","gists_url":"https://api.github.com/users/qutebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/qutebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutebrowser/subscriptions","organizations_url":"https://api.github.com/users/qutebrowser/orgs","repos_url":"https://api.github.com/users/qutebrowser/repos","events_url":"https://api.github.com/users/qutebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/qutebrowser/received_events","type":"Organization","site_admin":false},"repo":{"id":21244505,"name":"qutebrowser","full_name":"qutebrowser/qutebrowser","owner":{"login":"qutebrowser","id":21955151,"avatar_url":"https://avatars1.githubusercontent.com/u/21955151?v=4","gravatar_id":"","url":"https://api.github.com/users/qutebrowser","html_url":"https://github.com/qutebrowser","followers_url":"https://api.github.com/users/qutebrowser/followers","following_url":"https://api.github.com/users/qutebrowser/following{/other_user}","gists_url":"https://api.github.com/users/qutebrowser/gists{/gist_id}","starred_url":"https://api.github.com/users/qutebrowser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qutebrowser/subscriptions","organizations_url":"https://api.github.com/users/qutebrowser/orgs","repos_url":"https://api.github.com/users/qutebrowser/repos","events_url":"https://api.github.com/users/qutebrowser/events{/privacy}","received_events_url":"https://api.github.com/users/qutebrowser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qutebrowser/qutebrowser","description":"A keyboard-driven, vim-like browser based on PyQt5.","fork":false,"url":"https://api.github.com/repos/qutebrowser/qutebrowser","forks_url":"https://api.github.com/repos/qutebrowser/qutebrowser/forks","keys_url":"https://api.github.com/repos/qutebrowser/qutebrowser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qutebrowser/qutebrowser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qutebrowser/qutebrowser/teams","hooks_url":"https://api.github.com/repos/qutebrowser/qutebrowser/hooks","issue_events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/events{/number}","events_url":"https://api.github.com/repos/qutebrowser/qutebrowser/events","assignees_url":"https://api.github.com/repos/qutebrowser/qutebrowser/assignees{/user}","branches_url":"https://api.github.com/repos/qutebrowser/qutebrowser/branches{/branch}","tags_url":"https://api.github.com/repos/qutebrowser/qutebrowser/tags","blobs_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/refs{/sha}","trees_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/{sha}","languages_url":"https://api.github.com/repos/qutebrowser/qutebrowser/languages","stargazers_url":"https://api.github.com/repos/qutebrowser/qutebrowser/stargazers","contributors_url":"https://api.github.com/repos/qutebrowser/qutebrowser/contributors","subscribers_url":"https://api.github.com/repos/qutebrowser/qutebrowser/subscribers","subscription_url":"https://api.github.com/repos/qutebrowser/qutebrowser/subscription","commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/commits{/sha}","git_commits_url":"https://api.github.com/repos/qutebrowser/qutebrowser/git/commits{/sha}","comments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/comments{/number}","issue_comment_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/comments{/number}","contents_url":"https://api.github.com/repos/qutebrowser/qutebrowser/contents/{+path}","compare_url":"https://api.github.com/repos/qutebrowser/qutebrowser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qutebrowser/qutebrowser/merges","archive_url":"https://api.github.com/repos/qutebrowser/qutebrowser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qutebrowser/qutebrowser/downloads","issues_url":"https://api.github.com/repos/qutebrowser/qutebrowser/issues{/number}","pulls_url":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls{/number}","milestones_url":"https://api.github.com/repos/qutebrowser/qutebrowser/milestones{/number}","notifications_url":"https://api.github.com/repos/qutebrowser/qutebrowser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qutebrowser/qutebrowser/labels{/name}","releases_url":"https://api.github.com/repos/qutebrowser/qutebrowser/releases{/id}","deployments_url":"https://api.github.com/repos/qutebrowser/qutebrowser/deployments","created_at":"2014-06-26T14:59:34Z","updated_at":"2018-03-13T00:05:55Z","pushed_at":"2018-03-12T22:00:32Z","git_url":"git://github.com/qutebrowser/qutebrowser.git","ssh_url":"git@github.com:qutebrowser/qutebrowser.git","clone_url":"https://github.com/qutebrowser/qutebrowser.git","svn_url":"https://github.com/qutebrowser/qutebrowser","homepage":"https://www.qutebrowser.org/","size":32679,"stargazers_count":3160,"watchers_count":3160,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":444,"mirror_url":null,"archived":false,"open_issues_count":539,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":444,"open_issues":539,"watchers":3160,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704"},"html":{"href":"https://github.com/qutebrowser/qutebrowser/pull/3704"},"issue":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3704"},"comments":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/issues/3704/comments"},"review_comments":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704/comments"},"review_comment":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/pulls/3704/commits"},"statuses":{"href":"https://api.github.com/repos/qutebrowser/qutebrowser/statuses/38bb3673db2215e0d88f56673b2c25893e286132"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"The-Compiler"}}