{"action":"created","issue":{"url":"https://api.github.com/repos/abo-abo/avy/issues/5","labels_url":"https://api.github.com/repos/abo-abo/avy/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/abo-abo/avy/issues/5/comments","events_url":"https://api.github.com/repos/abo-abo/avy/issues/5/events","html_url":"https://github.com/abo-abo/avy/issues/5","id":73921705,"number":5,"title":"avy-jump without complete paths and overlays on top of the jump target (like in ace-jump)","user":{"login":"tsdh","id":103854,"avatar_url":"https://avatars.githubusercontent.com/u/103854?v=3","gravatar_id":"","url":"https://api.github.com/users/tsdh","html_url":"https://github.com/tsdh","followers_url":"https://api.github.com/users/tsdh/followers","following_url":"https://api.github.com/users/tsdh/following{/other_user}","gists_url":"https://api.github.com/users/tsdh/gists{/gist_id}","starred_url":"https://api.github.com/users/tsdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsdh/subscriptions","organizations_url":"https://api.github.com/users/tsdh/orgs","repos_url":"https://api.github.com/users/tsdh/repos","events_url":"https://api.github.com/users/tsdh/events{/privacy}","received_events_url":"https://api.github.com/users/tsdh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":41,"created_at":"2015-05-07T09:48:18Z","updated_at":"2015-05-12T15:43:15Z","closed_at":"2015-05-07T10:50:58Z","body":"I've switched from ace-jump to avy-jump just recently.  One major difference is that ace-jump's overlays are displayed on top of the jump target and only one jump character is displayed at a time.  With avy-mode, the overlays always show the complete jump character sequence and are displayed right of the jump target.\r\n\r\nAt least my personal preference (which is not ace-jump biased too much; I started using that only two weeks ago before switching to avy-jump yesterday) is that I like the ace-jump behavior better because the buffer contents won't switch to the right.  That is, if you have 5 matches on a line, each requiring a 2-char key sequence to jump to, then the last match has switched 8 chars to the right.  With ace-jump, it stays where it has been before.  So this \"fix target with your eyes and then jump\" thingy works better."},"comment":{"url":"https://api.github.com/repos/abo-abo/avy/issues/comments/101325107","html_url":"https://github.com/abo-abo/avy/issues/5#issuecomment-101325107","issue_url":"https://api.github.com/repos/abo-abo/avy/issues/5","id":101325107,"user":{"login":"PythonNut","id":5009546,"avatar_url":"https://avatars.githubusercontent.com/u/5009546?v=3","gravatar_id":"","url":"https://api.github.com/users/PythonNut","html_url":"https://github.com/PythonNut","followers_url":"https://api.github.com/users/PythonNut/followers","following_url":"https://api.github.com/users/PythonNut/following{/other_user}","gists_url":"https://api.github.com/users/PythonNut/gists{/gist_id}","starred_url":"https://api.github.com/users/PythonNut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PythonNut/subscriptions","organizations_url":"https://api.github.com/users/PythonNut/orgs","repos_url":"https://api.github.com/users/PythonNut/repos","events_url":"https://api.github.com/users/PythonNut/events{/privacy}","received_events_url":"https://api.github.com/users/PythonNut/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T15:43:15Z","updated_at":"2015-05-12T15:43:15Z","body":"@tsdh set of subsequences produced by De Bruijn is the same as the cartesian product (that is, all possible combinations are present). However, the ordering is different. The ordering matters very much because, if we we choose correctly, we don't have to \r\n\r\n> [...] walk the matches and pick non-conflicting paths when there are overlaps. [...]\r\n\r\nSuppose we want to jump to `*` in this: [also pretend that `avy-keys` is `{a, b}`]\r\n```c\r\n2 * 2 == pow(2, 2) * 1;\r\nchar** a = 1 * 2;\r\n```\r\n_(for convenience, I'll number the `*`s from 1 to 5)_\r\n\r\n**Under cartesian allocation** \r\n1. `aaa`\r\n2. `aab`\r\n3. `aba`\r\n4. `abb`\r\n5. `baa`\r\n\r\nThis is very similar to the algorithm that `avy` currently uses. And, as you can see, targets 3 and 4 already conflict:\r\n```c\r\nchar** a = 1 * 2;\r\n    aba\r\n     abb\r\n             baa\r\n```\r\n```\r\nchara??b = 1 abb;\r\n    ^^       ^\r\n```\r\nWe'd need some overlap resolution algorithm to resolve a new unique path.\r\n\r\n**Under De Bruijn allocation**\r\naaababbba\r\n1. `aaa`\r\n2. `aab`\r\n3. `aba`\r\n4. `bab`\r\n5. `abb`\r\nThe sequence starts out similar, but quickly diverges. You might think that targets 3 and 4 are still a problem, but if you look closely.\r\n```c\r\nchar** a = 1 * 2;\r\n    aba\r\n     bab\r\n             abb\r\n```\r\n```\r\ncharabab = 1 abb;\r\n    ^^       ^\r\n```\r\nAs you can see, there is no conflict. In fact, that's the magic of De Bruijn. _All_ conflicts are resolved before they even have a chance to happen."}}