{"action":"created","comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments/86701659","pull_request_review_id":7346051,"id":86701659,"diff_hunk":"@@ -979,3 +979,17 @@ a split-side entry, its value must be usable as the SIDE argument for\n                                             text-scale-mode-amount) 1)\n                                   (if (car (window-margins))\n                                       (car (window-margins)) 1)))))\n+\n+(defun spacemacs/linum-enabled-p ()\n+  \"Return non-nil if line numbers should be enabled for current buffer.\n+Decision is based on `dotspacemacs-line-numbers'.\"\n+  (if dotspacemacs-line-numbers\n+      (if (or (string-match-p \"\\\\*.*\\\\*\" (buffer-name))\n+              (and (plist-get dotspacemacs-line-numbers :size-limit-kb)\n+\t\t   (> (buffer-size) (* 1000 (plist-get dotspacemacs-line-numbers :size-limit-kb)))))\n+\t  nil\n+        (if (plist-get dotspacemacs-line-numbers :enabled-for)\n+            (member major-mode (plist-get dotspacemacs-line-numbers :enabled-for))\n+          (and (plist-get dotspacemacs-line-numbers :disabled-for)\n+               (not (member major-mode (plist-get dotspacemacs-line-numbers :disabled-for))))))\n+    nil))","path":"layers/+distributions/spacemacs-base/funcs.el","position":17,"original_position":17,"commit_id":"f10896d7439c544673a627396eb4bb57b7c8ae22","original_commit_id":"f10896d7439c544673a627396eb4bb57b7c8ae22","user":{"login":"deb0ch","id":6248219,"avatar_url":"https://avatars.githubusercontent.com/u/6248219?v=3","gravatar_id":"","url":"https://api.github.com/users/deb0ch","html_url":"https://github.com/deb0ch","followers_url":"https://api.github.com/users/deb0ch/followers","following_url":"https://api.github.com/users/deb0ch/following{/other_user}","gists_url":"https://api.github.com/users/deb0ch/gists{/gist_id}","starred_url":"https://api.github.com/users/deb0ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deb0ch/subscriptions","organizations_url":"https://api.github.com/users/deb0ch/orgs","repos_url":"https://api.github.com/users/deb0ch/repos","events_url":"https://api.github.com/users/deb0ch/events{/privacy}","received_events_url":"https://api.github.com/users/deb0ch/received_events","type":"User","site_admin":false},"body":"Ok, ok, I guess it *is* horrible to read when you did not write it yourself :laughing: \r\n\r\nI will change it for the `and` `or` form :ok_hand: ","created_at":"2016-11-07T00:40:27Z","updated_at":"2016-11-07T00:40:27Z","html_url":"https://github.com/syl20bnr/spacemacs/pull/7672#discussion_r86701659","pull_request_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672","_links":{"self":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments/86701659"},"html":{"href":"https://github.com/syl20bnr/spacemacs/pull/7672#discussion_r86701659"},"pull_request":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672"}}},"pull_request":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672","id":92484420,"html_url":"https://github.com/syl20bnr/spacemacs/pull/7672","diff_url":"https://github.com/syl20bnr/spacemacs/pull/7672.diff","patch_url":"https://github.com/syl20bnr/spacemacs/pull/7672.patch","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7672","number":7672,"state":"open","locked":false,"title":"finer configuration of line numbers activation","user":{"login":"deb0ch","id":6248219,"avatar_url":"https://avatars.githubusercontent.com/u/6248219?v=3","gravatar_id":"","url":"https://api.github.com/users/deb0ch","html_url":"https://github.com/deb0ch","followers_url":"https://api.github.com/users/deb0ch/followers","following_url":"https://api.github.com/users/deb0ch/following{/other_user}","gists_url":"https://api.github.com/users/deb0ch/gists{/gist_id}","starred_url":"https://api.github.com/users/deb0ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deb0ch/subscriptions","organizations_url":"https://api.github.com/users/deb0ch/orgs","repos_url":"https://api.github.com/users/deb0ch/repos","events_url":"https://api.github.com/users/deb0ch/events{/privacy}","received_events_url":"https://api.github.com/users/deb0ch/received_events","type":"User","site_admin":false},"body":"Allow for controlling more precisely when line numbers are activated.\r\n\r\nThis change is 100% backward compatible: the old `nil`, `t` and `'relative` values work just like usual.\r\n\r\nAs an alternative to these values, the user can now choose to set `dotspacemacs-line-numbers` to a property list like:\r\n\r\n``` elisp\r\n(setq-default dotspacemacs-lines-numbers '(:relative nil\r\n                                           :disabled-for (dired-mode\r\n                                                          doc-view-mode\r\n                                                          markdown-mode\r\n                                                          org-mode\r\n                                                          pdf-view-mode\r\n                                                          text-mode)\r\n                                           :size-limit-kb 1000))\r\n```\r\nThis allows for precisely filtering based on major and file size.\r\n\r\nPossible improvements would be:\r\n\r\n- choose between `linum` and `nlinum` from there (and thus merge the `nlinum` layer into `spacemacs-base`)\r\n- handle derived modes\r\n- a default list of major modes where you never want line numbers **(?)**\r\n\r\n**PS:** also made nlinum consistent with linum by reflecting ddbee36: now activating nlinum-relative also activates nlinum.","created_at":"2016-11-06T11:31:40Z","updated_at":"2016-11-07T00:40:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fab0b974c2a99866d429b49dbeee46bcb1ea77c4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672/commits","review_comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672/comments","review_comment_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7672/comments","statuses_url":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/f10896d7439c544673a627396eb4bb57b7c8ae22","head":{"label":"deb0ch:PR/linum-off","ref":"PR/linum-off","sha":"f10896d7439c544673a627396eb4bb57b7c8ae22","user":{"login":"deb0ch","id":6248219,"avatar_url":"https://avatars.githubusercontent.com/u/6248219?v=3","gravatar_id":"","url":"https://api.github.com/users/deb0ch","html_url":"https://github.com/deb0ch","followers_url":"https://api.github.com/users/deb0ch/followers","following_url":"https://api.github.com/users/deb0ch/following{/other_user}","gists_url":"https://api.github.com/users/deb0ch/gists{/gist_id}","starred_url":"https://api.github.com/users/deb0ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deb0ch/subscriptions","organizations_url":"https://api.github.com/users/deb0ch/orgs","repos_url":"https://api.github.com/users/deb0ch/repos","events_url":"https://api.github.com/users/deb0ch/events{/privacy}","received_events_url":"https://api.github.com/users/deb0ch/received_events","type":"User","site_admin":false},"repo":{"id":61382455,"name":"spacemacs","full_name":"deb0ch/spacemacs","owner":{"login":"deb0ch","id":6248219,"avatar_url":"https://avatars.githubusercontent.com/u/6248219?v=3","gravatar_id":"","url":"https://api.github.com/users/deb0ch","html_url":"https://github.com/deb0ch","followers_url":"https://api.github.com/users/deb0ch/followers","following_url":"https://api.github.com/users/deb0ch/following{/other_user}","gists_url":"https://api.github.com/users/deb0ch/gists{/gist_id}","starred_url":"https://api.github.com/users/deb0ch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deb0ch/subscriptions","organizations_url":"https://api.github.com/users/deb0ch/orgs","repos_url":"https://api.github.com/users/deb0ch/repos","events_url":"https://api.github.com/users/deb0ch/events{/privacy}","received_events_url":"https://api.github.com/users/deb0ch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deb0ch/spacemacs","description":"A community-driven Emacs distribution - The best editor is neither Emacs nor Vim,  it's Emacs *and* Vim!","fork":true,"url":"https://api.github.com/repos/deb0ch/spacemacs","forks_url":"https://api.github.com/repos/deb0ch/spacemacs/forks","keys_url":"https://api.github.com/repos/deb0ch/spacemacs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deb0ch/spacemacs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deb0ch/spacemacs/teams","hooks_url":"https://api.github.com/repos/deb0ch/spacemacs/hooks","issue_events_url":"https://api.github.com/repos/deb0ch/spacemacs/issues/events{/number}","events_url":"https://api.github.com/repos/deb0ch/spacemacs/events","assignees_url":"https://api.github.com/repos/deb0ch/spacemacs/assignees{/user}","branches_url":"https://api.github.com/repos/deb0ch/spacemacs/branches{/branch}","tags_url":"https://api.github.com/repos/deb0ch/spacemacs/tags","blobs_url":"https://api.github.com/repos/deb0ch/spacemacs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deb0ch/spacemacs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deb0ch/spacemacs/git/refs{/sha}","trees_url":"https://api.github.com/repos/deb0ch/spacemacs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deb0ch/spacemacs/statuses/{sha}","languages_url":"https://api.github.com/repos/deb0ch/spacemacs/languages","stargazers_url":"https://api.github.com/repos/deb0ch/spacemacs/stargazers","contributors_url":"https://api.github.com/repos/deb0ch/spacemacs/contributors","subscribers_url":"https://api.github.com/repos/deb0ch/spacemacs/subscribers","subscription_url":"https://api.github.com/repos/deb0ch/spacemacs/subscription","commits_url":"https://api.github.com/repos/deb0ch/spacemacs/commits{/sha}","git_commits_url":"https://api.github.com/repos/deb0ch/spacemacs/git/commits{/sha}","comments_url":"https://api.github.com/repos/deb0ch/spacemacs/comments{/number}","issue_comment_url":"https://api.github.com/repos/deb0ch/spacemacs/issues/comments{/number}","contents_url":"https://api.github.com/repos/deb0ch/spacemacs/contents/{+path}","compare_url":"https://api.github.com/repos/deb0ch/spacemacs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deb0ch/spacemacs/merges","archive_url":"https://api.github.com/repos/deb0ch/spacemacs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deb0ch/spacemacs/downloads","issues_url":"https://api.github.com/repos/deb0ch/spacemacs/issues{/number}","pulls_url":"https://api.github.com/repos/deb0ch/spacemacs/pulls{/number}","milestones_url":"https://api.github.com/repos/deb0ch/spacemacs/milestones{/number}","notifications_url":"https://api.github.com/repos/deb0ch/spacemacs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deb0ch/spacemacs/labels{/name}","releases_url":"https://api.github.com/repos/deb0ch/spacemacs/releases{/id}","deployments_url":"https://api.github.com/repos/deb0ch/spacemacs/deployments","created_at":"2016-06-17T15:08:46Z","updated_at":"2016-10-23T22:07:44Z","pushed_at":"2016-11-06T11:11:28Z","git_url":"git://github.com/deb0ch/spacemacs.git","ssh_url":"git@github.com:deb0ch/spacemacs.git","clone_url":"https://github.com/deb0ch/spacemacs.git","svn_url":"https://github.com/deb0ch/spacemacs","homepage":"http://spacemacs.org","size":27822,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"syl20bnr:develop","ref":"develop","sha":"aa3f1816af51b842fa468e8b89765c926b678cae","user":{"login":"syl20bnr","id":1243537,"avatar_url":"https://avatars.githubusercontent.com/u/1243537?v=3","gravatar_id":"","url":"https://api.github.com/users/syl20bnr","html_url":"https://github.com/syl20bnr","followers_url":"https://api.github.com/users/syl20bnr/followers","following_url":"https://api.github.com/users/syl20bnr/following{/other_user}","gists_url":"https://api.github.com/users/syl20bnr/gists{/gist_id}","starred_url":"https://api.github.com/users/syl20bnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl20bnr/subscriptions","organizations_url":"https://api.github.com/users/syl20bnr/orgs","repos_url":"https://api.github.com/users/syl20bnr/repos","events_url":"https://api.github.com/users/syl20bnr/events{/privacy}","received_events_url":"https://api.github.com/users/syl20bnr/received_events","type":"User","site_admin":false},"repo":{"id":7212645,"name":"spacemacs","full_name":"syl20bnr/spacemacs","owner":{"login":"syl20bnr","id":1243537,"avatar_url":"https://avatars.githubusercontent.com/u/1243537?v=3","gravatar_id":"","url":"https://api.github.com/users/syl20bnr","html_url":"https://github.com/syl20bnr","followers_url":"https://api.github.com/users/syl20bnr/followers","following_url":"https://api.github.com/users/syl20bnr/following{/other_user}","gists_url":"https://api.github.com/users/syl20bnr/gists{/gist_id}","starred_url":"https://api.github.com/users/syl20bnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syl20bnr/subscriptions","organizations_url":"https://api.github.com/users/syl20bnr/orgs","repos_url":"https://api.github.com/users/syl20bnr/repos","events_url":"https://api.github.com/users/syl20bnr/events{/privacy}","received_events_url":"https://api.github.com/users/syl20bnr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/syl20bnr/spacemacs","description":"A community-driven Emacs distribution - The best editor is neither Emacs nor Vim,  it's Emacs *and* Vim!","fork":false,"url":"https://api.github.com/repos/syl20bnr/spacemacs","forks_url":"https://api.github.com/repos/syl20bnr/spacemacs/forks","keys_url":"https://api.github.com/repos/syl20bnr/spacemacs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/syl20bnr/spacemacs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/syl20bnr/spacemacs/teams","hooks_url":"https://api.github.com/repos/syl20bnr/spacemacs/hooks","issue_events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/events{/number}","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/events","assignees_url":"https://api.github.com/repos/syl20bnr/spacemacs/assignees{/user}","branches_url":"https://api.github.com/repos/syl20bnr/spacemacs/branches{/branch}","tags_url":"https://api.github.com/repos/syl20bnr/spacemacs/tags","blobs_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/refs{/sha}","trees_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/{sha}","languages_url":"https://api.github.com/repos/syl20bnr/spacemacs/languages","stargazers_url":"https://api.github.com/repos/syl20bnr/spacemacs/stargazers","contributors_url":"https://api.github.com/repos/syl20bnr/spacemacs/contributors","subscribers_url":"https://api.github.com/repos/syl20bnr/spacemacs/subscribers","subscription_url":"https://api.github.com/repos/syl20bnr/spacemacs/subscription","commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/commits{/sha}","git_commits_url":"https://api.github.com/repos/syl20bnr/spacemacs/git/commits{/sha}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/comments{/number}","issue_comment_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments{/number}","contents_url":"https://api.github.com/repos/syl20bnr/spacemacs/contents/{+path}","compare_url":"https://api.github.com/repos/syl20bnr/spacemacs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/syl20bnr/spacemacs/merges","archive_url":"https://api.github.com/repos/syl20bnr/spacemacs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/syl20bnr/spacemacs/downloads","issues_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues{/number}","pulls_url":"https://api.github.com/repos/syl20bnr/spacemacs/pulls{/number}","milestones_url":"https://api.github.com/repos/syl20bnr/spacemacs/milestones{/number}","notifications_url":"https://api.github.com/repos/syl20bnr/spacemacs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/labels{/name}","releases_url":"https://api.github.com/repos/syl20bnr/spacemacs/releases{/id}","deployments_url":"https://api.github.com/repos/syl20bnr/spacemacs/deployments","created_at":"2012-12-17T21:34:03Z","updated_at":"2016-11-06T17:07:16Z","pushed_at":"2016-11-06T21:36:02Z","git_url":"git://github.com/syl20bnr/spacemacs.git","ssh_url":"git@github.com:syl20bnr/spacemacs.git","clone_url":"https://github.com/syl20bnr/spacemacs.git","svn_url":"https://github.com/syl20bnr/spacemacs","homepage":"http://spacemacs.org","size":51771,"stargazers_count":9562,"watchers_count":9562,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2521,"mirror_url":null,"open_issues_count":1072,"forks":2521,"open_issues":1072,"watchers":9562,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672"},"html":{"href":"https://github.com/syl20bnr/spacemacs/pull/7672"},"issue":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7672"},"comments":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/issues/7672/comments"},"review_comments":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672/comments"},"review_comment":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/pulls/7672/commits"},"statuses":{"href":"https://api.github.com/repos/syl20bnr/spacemacs/statuses/f10896d7439c544673a627396eb4bb57b7c8ae22"}}}}
{"actor":{"display_login":"deb0ch"}}