{"action":"created","issue":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7738","repository_url":"https://api.github.com/repos/syl20bnr/spacemacs","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7738/labels{/name}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7738/comments","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7738/events","html_url":"https://github.com/syl20bnr/spacemacs/issues/7738","id":189386307,"number":7738,"title":"select all (mark-whole-buffer) key binding, a suggestion to make it easier to find","user":{"login":"duianto","id":13420573,"avatar_url":"https://avatars.githubusercontent.com/u/13420573?v=3","gravatar_id":"","url":"https://api.github.com/users/duianto","html_url":"https://github.com/duianto","followers_url":"https://api.github.com/users/duianto/followers","following_url":"https://api.github.com/users/duianto/following{/other_user}","gists_url":"https://api.github.com/users/duianto/gists{/gist_id}","starred_url":"https://api.github.com/users/duianto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duianto/subscriptions","organizations_url":"https://api.github.com/users/duianto/orgs","repos_url":"https://api.github.com/users/duianto/repos","events_url":"https://api.github.com/users/duianto/events{/privacy}","received_events_url":"https://api.github.com/users/duianto/received_events","type":"User","site_admin":false},"labels":[{"id":329960719,"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/-%20Mailling%20list%20-","name":"- Mailling list -","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-15T13:04:17Z","updated_at":"2016-11-15T18:47:45Z","closed_at":null,"body":"### This might help spacemacs beginners to find the \"select all\" key binding.\r\n\r\nSelecting everything in most applications, is done with a \"Select all\" command, but in emacs the command is called `mark-whole-buffer`. I wasn't able to find it without googling, because i didn't know that selecting also could be called \"mark\" and that i should have searched for \"mark buffer\" in helm desbinds <kbd>SPC ?</kbd>.\r\n\r\n### Possible solution\r\nA function could be added that just calls `mark-whole-buffer`, with a name that can be found by searching for \"select all\".\r\n\r\n```\r\n(defun select-all-text-in-buffer ()\r\n  \"This just calls the `mark-whole-buffer' command. The new function\r\nname makes it possible to find it by searching for \\\"select all\\\".\"\r\n  (interactive)\r\n  (mark-whole-buffer))\r\n```\r\n\r\n### Issue\r\nI tried adding the function to the file: `../emacs-w64-25.1-O2/share/emacs/25.1/lisp/simple.el` below the `mark-whole-buffer` function. After evaluating it manually (with the cursor in the function) <kbd>, e f</kbd>, then it can be found in helm M-x.\r\n\r\nBut when emacs is restarted then it has to be evaluated again before it can be found in helm M-x again.\r\n\r\n\r\n### Key binding\r\n\r\nThe function needs to have a key binding to show up in helm descbinds <kbd>SPC ?</kbd>. A good place to add the new key binding might be to the expand region <kbd>SPC v</kbd> (transient state?) as the key binding: <kbd>SPC v a</kbd> \"a to select all\".\r\n\r\n#### Currently the <kbd>SPC v</kbd> listed keys look like this:\r\n`Type v to expand again, V to contract, r to reset, e to edit, / to search in project, f to search in files, b to search in opened buffers`\r\n\r\n#### With \"a to select all\" added it would look like this\r\n`Type v to expand again, V to contract, a to select all, r to reset, e to edit, / to search in project, f to search in files, b to search in opened buffers`\r\n\r\n#### Possible rewrite\r\nThere's a lot of duplicate words that make it look cluttered and it's not obvious which keys to press. It should probably be rewritten to look like the other transient states:\r\n```\r\nselect:    [v] expand   [V] contract        [a] all    [e] edit  [r] reset\r\nsearch in: [/] project  [b] opened buffers  [f] files\r\n```\r\n\r\nor like this:\r\n```\r\nselect                             search in\r\n[v] expand  [V] contract  [a] all  [/] project       [f] files\r\n[e] edit    [r] reset              [b] open buffers\r\n```"},"comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments/260730031","html_url":"https://github.com/syl20bnr/spacemacs/issues/7738#issuecomment-260730031","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7738","id":260730031,"user":{"login":"duianto","id":13420573,"avatar_url":"https://avatars.githubusercontent.com/u/13420573?v=3","gravatar_id":"","url":"https://api.github.com/users/duianto","html_url":"https://github.com/duianto","followers_url":"https://api.github.com/users/duianto/followers","following_url":"https://api.github.com/users/duianto/following{/other_user}","gists_url":"https://api.github.com/users/duianto/gists{/gist_id}","starred_url":"https://api.github.com/users/duianto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duianto/subscriptions","organizations_url":"https://api.github.com/users/duianto/orgs","repos_url":"https://api.github.com/users/duianto/repos","events_url":"https://api.github.com/users/duianto/events{/privacy}","received_events_url":"https://api.github.com/users/duianto/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T18:47:45Z","updated_at":"2016-11-15T18:47:45Z","body":"I didn't know about that <kbd>v i g</kbd> key binding, but i knew about <kbd>g g V G</kbd>, i just thought it might make it easier to find if one searches for the key binding in helm descbinds <kbd>SPC ?</kbd>. \r\n\r\nI don't know if it's possible, but maybe another solution would be to add something like a search term to the `mark-whole-buffer` function, so that it also shows up in descbinds when one searches for \"select all\". But i suspect that it's outside the scope of how descbinds work, and it only looks for the function names of bound keys."}}
{"actor":{"display_login":"duianto"}}