{"action":"created","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1789","repository_url":"https://api.github.com/repos/The-Compiler/qutebrowser","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1789/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1789/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1789/events","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1789","id":169758734,"number":1789,"title":"editor: fix external editor on windows","user":{"login":"Kingdread","id":739796,"avatar_url":"https://avatars.githubusercontent.com/u/739796?v=3","gravatar_id":"","url":"https://api.github.com/users/Kingdread","html_url":"https://github.com/Kingdread","followers_url":"https://api.github.com/users/Kingdread/followers","following_url":"https://api.github.com/users/Kingdread/following{/other_user}","gists_url":"https://api.github.com/users/Kingdread/gists{/gist_id}","starred_url":"https://api.github.com/users/Kingdread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kingdread/subscriptions","organizations_url":"https://api.github.com/users/Kingdread/orgs","repos_url":"https://api.github.com/users/Kingdread/repos","events_url":"https://api.github.com/users/Kingdread/events{/privacy}","received_events_url":"https://api.github.com/users/Kingdread/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/PR:%20work%20in%20progress","name":"PR: work in progress","color":"f9d0c4"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-06T18:06:44Z","updated_at":"2016-08-06T19:08:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/pulls/1789","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1789","diff_url":"https://github.com/The-Compiler/qutebrowser/pull/1789.diff","patch_url":"https://github.com/The-Compiler/qutebrowser/pull/1789.patch"},"body":"Fixes #1767.\r\n\r\nOn windows, only one process can open a file in write mode at once. We\r\ndidn't close the handle we got (self._oshandle) before _cleanup, which\r\nmeans that we had the file open the whole time, which means that the\r\nexternal editor couldn't write back the changes.\r\n\r\nThis patch closes the file while the external editor is running and only\r\nopens it once the editor is closed. We re-opened the file anyway, so\r\nthis shouldn't be a huge change. Additionally, tempfile.NamedTemporaryFile\r\nis used instead of mkstemp, as we don't have to deal with os-level file\r\nhandles that way."},"comment":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/comments/238043569","html_url":"https://github.com/The-Compiler/qutebrowser/pull/1789#issuecomment-238043569","issue_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1789","id":238043569,"user":{"login":"Kingdread","id":739796,"avatar_url":"https://avatars.githubusercontent.com/u/739796?v=3","gravatar_id":"","url":"https://api.github.com/users/Kingdread","html_url":"https://github.com/Kingdread","followers_url":"https://api.github.com/users/Kingdread/followers","following_url":"https://api.github.com/users/Kingdread/following{/other_user}","gists_url":"https://api.github.com/users/Kingdread/gists{/gist_id}","starred_url":"https://api.github.com/users/Kingdread/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kingdread/subscriptions","organizations_url":"https://api.github.com/users/Kingdread/orgs","repos_url":"https://api.github.com/users/Kingdread/repos","events_url":"https://api.github.com/users/Kingdread/events{/privacy}","received_events_url":"https://api.github.com/users/Kingdread/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T19:08:51Z","updated_at":"2016-08-06T19:08:51Z","body":"Yeah, I've tested in on Windows with the standard editor (notepad.exe).\r\n\r\n* Without the change, you can't save the file under the same name, and you're forced to select a new one.\r\n* With the change, everything works (Close notepad - select \"save\" - text appears in qutebrowser)\r\n\r\nI will fix the other issues mentioned, I didn't run tox on Windows and waited for the Travis build :wink:."}}
{"actor":{"display_login":"Kingdread"}}