{"action":"created","issue":{"url":"https://api.github.com/repos/guillermooo/Vintageous/issues/905","labels_url":"https://api.github.com/repos/guillermooo/Vintageous/issues/905/labels{/name}","comments_url":"https://api.github.com/repos/guillermooo/Vintageous/issues/905/comments","events_url":"https://api.github.com/repos/guillermooo/Vintageous/issues/905/events","html_url":"https://github.com/guillermooo/Vintageous/issues/905","id":67732626,"number":905,"title":":w <path> does not work for new files","user":{"login":"blinskey","id":3933492,"avatar_url":"https://avatars.githubusercontent.com/u/3933492?v=3","gravatar_id":"","url":"https://api.github.com/users/blinskey","html_url":"https://github.com/blinskey","followers_url":"https://api.github.com/users/blinskey/followers","following_url":"https://api.github.com/users/blinskey/following{/other_user}","gists_url":"https://api.github.com/users/blinskey/gists{/gist_id}","starred_url":"https://api.github.com/users/blinskey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinskey/subscriptions","organizations_url":"https://api.github.com/users/blinskey/orgs","repos_url":"https://api.github.com/users/blinskey/repos","events_url":"https://api.github.com/users/blinskey/events{/privacy}","received_events_url":"https://api.github.com/users/blinskey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/guillermooo/Vintageous/labels/AREA:%20commands","name":"AREA: commands","color":"d4c5f9"},{"url":"https://api.github.com/repos/guillermooo/Vintageous/labels/PLAT:%20linux","name":"PLAT: linux","color":"fad8c7"},{"url":"https://api.github.com/repos/guillermooo/Vintageous/labels/TYPE:%20defect","name":"TYPE: defect","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-11T04:36:26Z","updated_at":"2015-04-12T01:41:51Z","closed_at":null,"body":"Vintageous version: 4.0.0\r\nSublime Text build: 3083\r\nPlatform: Xubuntu 14.10\r\n\r\nSteps to reproduce:\r\n\r\n1. Open a new buffer.\r\n2. Enter the command `:w <path>` with a valid pathname.\r\n3. Observe that the file was not written.\r\n\r\nI'm aware that there are other issues related to the `:w` command (#437, #694, and #728), but I'm not certain that this is exactly the same as any of those, so I figured I should open a new issue rather than confuse things. Note that this is _not_ the same bug described in #728.\r\n\r\nI ran a git bisect to find the source of the issue. Here's what I found:\r\n\r\n```\r\n233bfb167ef8f9386bbd04652ed36870248b6cc1 is the first bad commit\r\ncommit 233bfb167ef8f9386bbd04652ed36870248b6cc1\r\nAuthor: guillermooo <guillermo.lopez@outlook.com>\r\nDate:   Sat Mar 21 12:15:38 2015 +0100\r\n\r\n    start implementing :write command using new parser\r\n\r\n:040000 040000 d0559993553ea32acab8c75db13db2acc571a08d 7b909367a1827dc9fc0fc727d871dfd8d2a9e763 M  ex\r\n:100755 100755 39b92e59bd2ae95028330af58d9dcd5c260c0a96 8d98a9711af760406247747cf15583432006120f M  ex_commands.py\r\n:100644 100644 3f36038be8b8cd6bada7ba07779863e7d25203be c15a2243d8d14aded597a0366ed401b6daa3e36f M  ex_main.py\r\n:040000 040000 31b13f7a7d96ddb974d484d3d7b984a504f4f35d 15ca54790c6670ec26c724b1ef8dddcdfd522fe0 M  tests\r\n```\r\n\r\n\r\n\r\nHere's the full bisect log:\r\n\r\n```\r\ngit bisect start\r\n# bad: [c72c426f90f9a0d32a6f4849ee20dbb3e33cdab6] Merge pull request #898 from guillermooo-forks/prep-release\r\ngit bisect bad c72c426f90f9a0d32a6f4849ee20dbb3e33cdab6\r\n# good: [8726ad82dd2ef45741ded1c6c97c82190ed1342c] assorted fixes\r\ngit bisect good 8726ad82dd2ef45741ded1c6c97c82190ed1342c\r\n# good: [809859be40f9e5bfec673d3d95cec2bbea031362] fix broken tests\r\ngit bisect good 809859be40f9e5bfec673d3d95cec2bbea031362\r\n# good: [1272255e13650644fc5f860f3eb0e1e9fa8814e1] add __init__\r\ngit bisect good 1272255e13650644fc5f860f3eb0e1e9fa8814e1\r\n# skip: [b175e49a256b1f8f6e5b9f0422644935d8655961] Merge pull request #896 from guillermooo-forks/fix-890-x-and-empty-lines\r\ngit bisect skip b175e49a256b1f8f6e5b9f0422644935d8655961\r\n# skip: [aee5dc07c64f20aba3ff18eec2a5e4c7eb587105] Merge pull request #843 from guillermooo-forks/fix-759-visual-block\r\ngit bisect skip aee5dc07c64f20aba3ff18eec2a5e4c7eb587105\r\n# good: [5ddf8d466f548682bd4763fa047724c7a36d4fb6] add tab completion for files for :tabedit, closes #725\r\ngit bisect good 5ddf8d466f548682bd4763fa047724c7a36d4fb6\r\n# good: [11c55b9c0031bc0367b85fd08b3709d79f8d65f3] prep release\r\ngit bisect good 11c55b9c0031bc0367b85fd08b3709d79f8d65f3\r\n# bad: [9275dee2edc0574e8c67f1f8880c4f79ae2ca3c4] add stubs\r\ngit bisect bad 9275dee2edc0574e8c67f1f8880c4f79ae2ca3c4\r\n# bad: [38b8109650b16e14dcbfcd274ea6347dd9919883] implement more features of :write\r\ngit bisect bad 38b8109650b16e14dcbfcd274ea6347dd9919883\r\n# good: [ed07460fc9ec75b1e595580fd5356876b3ee2bcd] enable new parser for :substitute command\r\ngit bisect good ed07460fc9ec75b1e595580fd5356876b3ee2bcd\r\n# good: [31df80183a45aee15c2fc32b051192e4ce4331d0] refactor ExOnly command\r\ngit bisect good 31df80183a45aee15c2fc32b051192e4ce4331d0\r\n# bad: [2a66addb09ef55606e5c7963400ab774a9e74dd2] start implementing :write command using the new parser\r\ngit bisect bad 2a66addb09ef55606e5c7963400ab774a9e74dd2\r\n# bad: [233bfb167ef8f9386bbd04652ed36870248b6cc1] start implementing :write command using new parser\r\ngit bisect bad 233bfb167ef8f9386bbd04652ed36870248b6cc1\r\n# good: [b35ad22e293222eec430ab00ebb8882baaf05686] implement ExListRegisters using the new parser\r\ngit bisect good b35ad22e293222eec430ab00ebb8882baaf05686\r\n# first bad commit: [233bfb167ef8f9386bbd04652ed36870248b6cc1] start implementing :write command using new parser\r\n```"},"comment":{"url":"https://api.github.com/repos/guillermooo/Vintageous/issues/comments/91964422","html_url":"https://github.com/guillermooo/Vintageous/issues/905#issuecomment-91964422","issue_url":"https://api.github.com/repos/guillermooo/Vintageous/issues/905","id":91964422,"user":{"login":"blinskey","id":3933492,"avatar_url":"https://avatars.githubusercontent.com/u/3933492?v=3","gravatar_id":"","url":"https://api.github.com/users/blinskey","html_url":"https://github.com/blinskey","followers_url":"https://api.github.com/users/blinskey/followers","following_url":"https://api.github.com/users/blinskey/following{/other_user}","gists_url":"https://api.github.com/users/blinskey/gists{/gist_id}","starred_url":"https://api.github.com/users/blinskey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blinskey/subscriptions","organizations_url":"https://api.github.com/users/blinskey/orgs","repos_url":"https://api.github.com/users/blinskey/repos","events_url":"https://api.github.com/users/blinskey/events{/privacy}","received_events_url":"https://api.github.com/users/blinskey/received_events","type":"User","site_admin":false},"created_at":"2015-04-12T01:41:51Z","updated_at":"2015-04-12T01:41:51Z","body":"Looking at this again, it turns out that there's an additional complication that I wasn't aware of. You're right, for most paths, the file is created, but this isn't reflected in Sublime outside of a message in the status bar. But it turns out that files aren't being created if the `~` shortcut is used. `:w ~/Desktop/foo` causes this message to be written to the console:\r\n\r\n```\r\nVintageous: E212 Can't open file for writing.\r\nVintageous =======\r\n[Errno 2] No such file or directory: '~/Desktop/foo'\r\n==================\r\n```\r\n\r\nIt looks like the home shortcut bug was introduced in 233bfb167ef8f9386bbd04652ed36870248b6cc1 , the commit I identified in the bisect. It works properly in b35ad22."}}