{"action":"created","comment":{"url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/comments/74925664","id":74925664,"diff_hunk":"@@ -3035,18 +3035,30 @@ through the field's start point\"\n    (not (and (yas--field-number field)\n              (zerop (yas--field-number field))))))\n \n-(defun yas--snippets-at-point (&optional all-snippets)\n-  \"Return a sorted list of snippets at point.\n-\n-The most recently-inserted snippets are returned first.\"\n-  (sort\n-   (delq nil (delete-dups\n-              (mapcar (lambda (ov) (overlay-get ov 'yas--snippet))\n-                      (if all-snippets (overlays-in (point-min) (point-max))\n-                        (nconc (overlays-at (point))\n-                               (overlays-at (1- (point))))))))\n-   #'(lambda (s1 s2)\n-       (<= (yas--snippet-id s2) (yas--snippet-id s1)))))\n+(defun yas-active-snippets (&optional where)\n+  \"Return a sorted list of active snippets.\n+The most recently-inserted snippets are returned first.\n+\n+By default, lists snippets around point.  If optional argument\n+WHERE is a buffer position or pair of positions (BEG . END), list\n+snippets around that position, or within the given range,\n+respectively.  Any other non-nil value is equivalent to a range\n+covering the whole buffer.\"\n+  (let (beg end)\n+    (unless where (setq where (point)))\n+    (cond\n+     ((consp where)\n+      (setq beg (car where) end (cdr where)))\n+     ((or (integerp where) (markerp where))\n+      (setq beg where end (1+ where)))\n+     (t (setq beg (point-min) end (point-max))))\n+    (sort\n+     (delete-dups\n+      (delq nil","path":"yasnippet.el","position":44,"original_position":44,"commit_id":"6f190f6f09f32d5ffd3695753393fb2cb89254d8","original_commit_id":"6f190f6f09f32d5ffd3695753393fb2cb89254d8","user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"body":"Yeah, probably makes sense.","created_at":"2016-08-16T12:38:53Z","updated_at":"2016-08-16T12:38:53Z","html_url":"https://github.com/joaotavora/yasnippet/pull/727#discussion_r74925664","pull_request_url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727","_links":{"self":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/comments/74925664"},"html":{"href":"https://github.com/joaotavora/yasnippet/pull/727#discussion_r74925664"},"pull_request":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727"}}},"pull_request":{"url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727","id":81254329,"html_url":"https://github.com/joaotavora/yasnippet/pull/727","diff_url":"https://github.com/joaotavora/yasnippet/pull/727.diff","patch_url":"https://github.com/joaotavora/yasnippet/pull/727.patch","issue_url":"https://api.github.com/repos/joaotavora/yasnippet/issues/727","number":727,"state":"open","locked":false,"title":"Promote yas--snippets-at-point to a public API (yas-active-snippets)","user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"body":"Refer: https://github.com/joaotavora/yasnippet/issues/561#issuecomment-233258767\r\n\r\n```\r\n* yasnippet.el (yas-active-snippets): Rename from\r\nyas--snippets-at-point, adjust callers.  Handle arbitrary positions and\r\nranges as a parameter.\r\n```","created_at":"2016-08-14T21:02:38Z","updated_at":"2016-08-16T12:38:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"988c92e341e428aeb9d278cff627c9a524848b04","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727/commits","review_comments_url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727/comments","review_comment_url":"https://api.github.com/repos/joaotavora/yasnippet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joaotavora/yasnippet/issues/727/comments","statuses_url":"https://api.github.com/repos/joaotavora/yasnippet/statuses/6f190f6f09f32d5ffd3695753393fb2cb89254d8","head":{"label":"npostavs:active-snippets","ref":"active-snippets","sha":"6f190f6f09f32d5ffd3695753393fb2cb89254d8","user":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"repo":{"id":13547322,"name":"yasnippet","full_name":"npostavs/yasnippet","owner":{"login":"npostavs","id":287742,"avatar_url":"https://avatars.githubusercontent.com/u/287742?v=3","gravatar_id":"","url":"https://api.github.com/users/npostavs","html_url":"https://github.com/npostavs","followers_url":"https://api.github.com/users/npostavs/followers","following_url":"https://api.github.com/users/npostavs/following{/other_user}","gists_url":"https://api.github.com/users/npostavs/gists{/gist_id}","starred_url":"https://api.github.com/users/npostavs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npostavs/subscriptions","organizations_url":"https://api.github.com/users/npostavs/orgs","repos_url":"https://api.github.com/users/npostavs/repos","events_url":"https://api.github.com/users/npostavs/events{/privacy}","received_events_url":"https://api.github.com/users/npostavs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/npostavs/yasnippet","description":"A template system for Emacs","fork":true,"url":"https://api.github.com/repos/npostavs/yasnippet","forks_url":"https://api.github.com/repos/npostavs/yasnippet/forks","keys_url":"https://api.github.com/repos/npostavs/yasnippet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npostavs/yasnippet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npostavs/yasnippet/teams","hooks_url":"https://api.github.com/repos/npostavs/yasnippet/hooks","issue_events_url":"https://api.github.com/repos/npostavs/yasnippet/issues/events{/number}","events_url":"https://api.github.com/repos/npostavs/yasnippet/events","assignees_url":"https://api.github.com/repos/npostavs/yasnippet/assignees{/user}","branches_url":"https://api.github.com/repos/npostavs/yasnippet/branches{/branch}","tags_url":"https://api.github.com/repos/npostavs/yasnippet/tags","blobs_url":"https://api.github.com/repos/npostavs/yasnippet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npostavs/yasnippet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npostavs/yasnippet/git/refs{/sha}","trees_url":"https://api.github.com/repos/npostavs/yasnippet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npostavs/yasnippet/statuses/{sha}","languages_url":"https://api.github.com/repos/npostavs/yasnippet/languages","stargazers_url":"https://api.github.com/repos/npostavs/yasnippet/stargazers","contributors_url":"https://api.github.com/repos/npostavs/yasnippet/contributors","subscribers_url":"https://api.github.com/repos/npostavs/yasnippet/subscribers","subscription_url":"https://api.github.com/repos/npostavs/yasnippet/subscription","commits_url":"https://api.github.com/repos/npostavs/yasnippet/commits{/sha}","git_commits_url":"https://api.github.com/repos/npostavs/yasnippet/git/commits{/sha}","comments_url":"https://api.github.com/repos/npostavs/yasnippet/comments{/number}","issue_comment_url":"https://api.github.com/repos/npostavs/yasnippet/issues/comments{/number}","contents_url":"https://api.github.com/repos/npostavs/yasnippet/contents/{+path}","compare_url":"https://api.github.com/repos/npostavs/yasnippet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npostavs/yasnippet/merges","archive_url":"https://api.github.com/repos/npostavs/yasnippet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npostavs/yasnippet/downloads","issues_url":"https://api.github.com/repos/npostavs/yasnippet/issues{/number}","pulls_url":"https://api.github.com/repos/npostavs/yasnippet/pulls{/number}","milestones_url":"https://api.github.com/repos/npostavs/yasnippet/milestones{/number}","notifications_url":"https://api.github.com/repos/npostavs/yasnippet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npostavs/yasnippet/labels{/name}","releases_url":"https://api.github.com/repos/npostavs/yasnippet/releases{/id}","deployments_url":"https://api.github.com/repos/npostavs/yasnippet/deployments","created_at":"2013-10-13T21:52:06Z","updated_at":"2015-12-12T15:58:24Z","pushed_at":"2016-08-14T20:54:49Z","git_url":"git://github.com/npostavs/yasnippet.git","ssh_url":"git@github.com:npostavs/yasnippet.git","clone_url":"https://github.com/npostavs/yasnippet.git","svn_url":"https://github.com/npostavs/yasnippet","homepage":"","size":4102,"stargazers_count":0,"watchers_count":0,"language":"Emacs Lisp","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"joaotavora:master","ref":"master","sha":"309fe157f60e537e94f95e1ce3505a3fcdbd4994","user":{"login":"joaotavora","id":387011,"avatar_url":"https://avatars.githubusercontent.com/u/387011?v=3","gravatar_id":"","url":"https://api.github.com/users/joaotavora","html_url":"https://github.com/joaotavora","followers_url":"https://api.github.com/users/joaotavora/followers","following_url":"https://api.github.com/users/joaotavora/following{/other_user}","gists_url":"https://api.github.com/users/joaotavora/gists{/gist_id}","starred_url":"https://api.github.com/users/joaotavora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaotavora/subscriptions","organizations_url":"https://api.github.com/users/joaotavora/orgs","repos_url":"https://api.github.com/users/joaotavora/repos","events_url":"https://api.github.com/users/joaotavora/events{/privacy}","received_events_url":"https://api.github.com/users/joaotavora/received_events","type":"User","site_admin":false},"repo":{"id":2537904,"name":"yasnippet","full_name":"joaotavora/yasnippet","owner":{"login":"joaotavora","id":387011,"avatar_url":"https://avatars.githubusercontent.com/u/387011?v=3","gravatar_id":"","url":"https://api.github.com/users/joaotavora","html_url":"https://github.com/joaotavora","followers_url":"https://api.github.com/users/joaotavora/followers","following_url":"https://api.github.com/users/joaotavora/following{/other_user}","gists_url":"https://api.github.com/users/joaotavora/gists{/gist_id}","starred_url":"https://api.github.com/users/joaotavora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaotavora/subscriptions","organizations_url":"https://api.github.com/users/joaotavora/orgs","repos_url":"https://api.github.com/users/joaotavora/repos","events_url":"https://api.github.com/users/joaotavora/events{/privacy}","received_events_url":"https://api.github.com/users/joaotavora/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joaotavora/yasnippet","description":"A template system for Emacs","fork":false,"url":"https://api.github.com/repos/joaotavora/yasnippet","forks_url":"https://api.github.com/repos/joaotavora/yasnippet/forks","keys_url":"https://api.github.com/repos/joaotavora/yasnippet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joaotavora/yasnippet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joaotavora/yasnippet/teams","hooks_url":"https://api.github.com/repos/joaotavora/yasnippet/hooks","issue_events_url":"https://api.github.com/repos/joaotavora/yasnippet/issues/events{/number}","events_url":"https://api.github.com/repos/joaotavora/yasnippet/events","assignees_url":"https://api.github.com/repos/joaotavora/yasnippet/assignees{/user}","branches_url":"https://api.github.com/repos/joaotavora/yasnippet/branches{/branch}","tags_url":"https://api.github.com/repos/joaotavora/yasnippet/tags","blobs_url":"https://api.github.com/repos/joaotavora/yasnippet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joaotavora/yasnippet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joaotavora/yasnippet/git/refs{/sha}","trees_url":"https://api.github.com/repos/joaotavora/yasnippet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joaotavora/yasnippet/statuses/{sha}","languages_url":"https://api.github.com/repos/joaotavora/yasnippet/languages","stargazers_url":"https://api.github.com/repos/joaotavora/yasnippet/stargazers","contributors_url":"https://api.github.com/repos/joaotavora/yasnippet/contributors","subscribers_url":"https://api.github.com/repos/joaotavora/yasnippet/subscribers","subscription_url":"https://api.github.com/repos/joaotavora/yasnippet/subscription","commits_url":"https://api.github.com/repos/joaotavora/yasnippet/commits{/sha}","git_commits_url":"https://api.github.com/repos/joaotavora/yasnippet/git/commits{/sha}","comments_url":"https://api.github.com/repos/joaotavora/yasnippet/comments{/number}","issue_comment_url":"https://api.github.com/repos/joaotavora/yasnippet/issues/comments{/number}","contents_url":"https://api.github.com/repos/joaotavora/yasnippet/contents/{+path}","compare_url":"https://api.github.com/repos/joaotavora/yasnippet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joaotavora/yasnippet/merges","archive_url":"https://api.github.com/repos/joaotavora/yasnippet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joaotavora/yasnippet/downloads","issues_url":"https://api.github.com/repos/joaotavora/yasnippet/issues{/number}","pulls_url":"https://api.github.com/repos/joaotavora/yasnippet/pulls{/number}","milestones_url":"https://api.github.com/repos/joaotavora/yasnippet/milestones{/number}","notifications_url":"https://api.github.com/repos/joaotavora/yasnippet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joaotavora/yasnippet/labels{/name}","releases_url":"https://api.github.com/repos/joaotavora/yasnippet/releases{/id}","deployments_url":"https://api.github.com/repos/joaotavora/yasnippet/deployments","created_at":"2011-10-08T12:05:37Z","updated_at":"2016-08-16T02:26:40Z","pushed_at":"2016-08-14T21:02:38Z","git_url":"git://github.com/joaotavora/yasnippet.git","ssh_url":"git@github.com:joaotavora/yasnippet.git","clone_url":"https://github.com/joaotavora/yasnippet.git","svn_url":"https://github.com/joaotavora/yasnippet","homepage":"http://joaotavora.github.com/yasnippet/","size":5592,"stargazers_count":1304,"watchers_count":1304,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":240,"mirror_url":null,"open_issues_count":40,"forks":240,"open_issues":40,"watchers":1304,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727"},"html":{"href":"https://github.com/joaotavora/yasnippet/pull/727"},"issue":{"href":"https://api.github.com/repos/joaotavora/yasnippet/issues/727"},"comments":{"href":"https://api.github.com/repos/joaotavora/yasnippet/issues/727/comments"},"review_comments":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727/comments"},"review_comment":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joaotavora/yasnippet/pulls/727/commits"},"statuses":{"href":"https://api.github.com/repos/joaotavora/yasnippet/statuses/6f190f6f09f32d5ffd3695753393fb2cb89254d8"}}}}
{"actor":{"display_login":"npostavs"}}