{"action":"created","comment":{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/comments/48455149","id":48455149,"diff_hunk":"@@ -3017,6 +3069,51 @@ See: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-rename-symbol\"\n     (when (> (length occurrences) 0)\n       (cljr--warm-ast-cache))))\n \n+(defun cljr--replace-refer-all-with-referred-list (ns publics-occurrences)\n+  (when (re-search-forward\n+         (format \"\\\\(%s\\s:refer\\s\\\\):all\"\n+                 (-last-item (s-split \"\\\\.\" ns)))\n+         nil\n+         t)\n+    (replace-match\n+     (format \"\\\\1[%s]\" (s-join\n+                        \" \"\n+                        (delete-dups\n+                         (--map (gethash :name it) publics-occurrences)))))))\n+\n+(defun cljr--replace-refer-all-with-alias (ns publics-occurrences alias)\n+  (let ((ns-last-token (-last-item (s-split \"\\\\.\" ns))))\n+    (when (re-search-forward (format \"\\\\(%s\\s\\\\):refer\\s:all\" ns-last-token) nil t)\n+      (replace-match (format \"\\\\1:as %s\" alias)))\n+    (cljr--rename-occurrences ns publics-occurrences (lambda (old-name) (concat alias \"/\" old-name)))))\n+\n+;;;###autoload\n+(defun cljr-replace-refer-all (with-referred-list)","path":"clj-refactor.el","position":153,"original_position":153,"commit_id":"812ef20e53ef2febc6de9ae492ad9e14b53e2847","original_commit_id":"812ef20e53ef2febc6de9ae492ad9e14b53e2847","user":{"login":"expez","id":1006557,"avatar_url":"https://avatars.githubusercontent.com/u/1006557?v=3","gravatar_id":"","url":"https://api.github.com/users/expez","html_url":"https://github.com/expez","followers_url":"https://api.github.com/users/expez/followers","following_url":"https://api.github.com/users/expez/following{/other_user}","gists_url":"https://api.github.com/users/expez/gists{/gist_id}","starred_url":"https://api.github.com/users/expez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/expez/subscriptions","organizations_url":"https://api.github.com/users/expez/orgs","repos_url":"https://api.github.com/users/expez/repos","events_url":"https://api.github.com/users/expez/events{/privacy}","received_events_url":"https://api.github.com/users/expez/received_events","type":"User","site_admin":false},"body":"Perhaps a better name here would `replace-referred-symbols?`","created_at":"2015-12-27T14:17:15Z","updated_at":"2015-12-27T14:17:15Z","html_url":"https://github.com/clojure-emacs/clj-refactor.el/pull/276#discussion_r48455149","pull_request_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/comments/48455149"},"html":{"href":"https://github.com/clojure-emacs/clj-refactor.el/pull/276#discussion_r48455149"},"pull_request":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276","id":54607664,"html_url":"https://github.com/clojure-emacs/clj-refactor.el/pull/276","diff_url":"https://github.com/clojure-emacs/clj-refactor.el/pull/276.diff","patch_url":"https://github.com/clojure-emacs/clj-refactor.el/pull/276.patch","issue_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/276","number":276,"state":"open","locked":false,"title":"Replace refer all","user":{"login":"benedekfazekas","id":1003422,"avatar_url":"https://avatars.githubusercontent.com/u/1003422?v=3","gravatar_id":"","url":"https://api.github.com/users/benedekfazekas","html_url":"https://github.com/benedekfazekas","followers_url":"https://api.github.com/users/benedekfazekas/followers","following_url":"https://api.github.com/users/benedekfazekas/following{/other_user}","gists_url":"https://api.github.com/users/benedekfazekas/gists{/gist_id}","starred_url":"https://api.github.com/users/benedekfazekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benedekfazekas/subscriptions","organizations_url":"https://api.github.com/users/benedekfazekas/orgs","repos_url":"https://api.github.com/users/benedekfazekas/repos","events_url":"https://api.github.com/users/benedekfazekas/events{/privacy}","received_events_url":"https://api.github.com/users/benedekfazekas/received_events","type":"User","site_admin":false},"body":"Replace :refer :all style require with alias style require or\r\noptionally (with prefix) referred names style require.\r\n\r\n- with prefix cljr--replace-refer-all-with-referred-list still available\r\n- add keybinding for cljr-replace-refer-all\r\n- add cljr-replace-refer-all to the ns hydras\r\n- add warm-macro-occurrences-cache\r\n- defcustom to warm-macro-occurrences-cache at startup\r\n\r\nclojure-emacs/refactor-nrepl#135 provides the middleware backend function\r\n\r\nIntended to be merged for version 2.1.0","created_at":"2015-12-26T21:27:25Z","updated_at":"2015-12-27T14:17:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ca0954cb67e4dc80728c96b9a8ad54c7d9d29b6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276/commits","review_comments_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276/comments","review_comment_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/comments{/number}","comments_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/276/comments","statuses_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/statuses/812ef20e53ef2febc6de9ae492ad9e14b53e2847","head":{"label":"clojure-emacs:used-publics","ref":"used-publics","sha":"812ef20e53ef2febc6de9ae492ad9e14b53e2847","user":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars.githubusercontent.com/u/5080083?v=3","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"repo":{"id":7909342,"name":"clj-refactor.el","full_name":"clojure-emacs/clj-refactor.el","owner":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars.githubusercontent.com/u/5080083?v=3","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clojure-emacs/clj-refactor.el","description":"A collection of Clojure refactoring functions for Emacs","fork":false,"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el","forks_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/forks","keys_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/teams","hooks_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/hooks","issue_events_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/events{/number}","events_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/events","assignees_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/assignees{/user}","branches_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/branches{/branch}","tags_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/tags","blobs_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/refs{/sha}","trees_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/statuses/{sha}","languages_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/languages","stargazers_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/stargazers","contributors_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/contributors","subscribers_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/subscribers","subscription_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/subscription","commits_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/commits{/sha}","git_commits_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/commits{/sha}","comments_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/comments{/number}","issue_comment_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/comments{/number}","contents_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/contents/{+path}","compare_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/merges","archive_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/downloads","issues_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues{/number}","pulls_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls{/number}","milestones_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/milestones{/number}","notifications_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/labels{/name}","releases_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/releases{/id}","created_at":"2013-01-30T06:44:10Z","updated_at":"2015-12-23T23:12:06Z","pushed_at":"2015-12-26T21:27:25Z","git_url":"git://github.com/clojure-emacs/clj-refactor.el.git","ssh_url":"git@github.com:clojure-emacs/clj-refactor.el.git","clone_url":"https://github.com/clojure-emacs/clj-refactor.el.git","svn_url":"https://github.com/clojure-emacs/clj-refactor.el","homepage":"","size":5952,"stargazers_count":381,"watchers_count":381,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":17,"forks":37,"open_issues":17,"watchers":381,"default_branch":"master"}},"base":{"label":"clojure-emacs:master","ref":"master","sha":"76508499cbd1c69751a7d1437f703c4b2734023b","user":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars.githubusercontent.com/u/5080083?v=3","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"repo":{"id":7909342,"name":"clj-refactor.el","full_name":"clojure-emacs/clj-refactor.el","owner":{"login":"clojure-emacs","id":5080083,"avatar_url":"https://avatars.githubusercontent.com/u/5080083?v=3","gravatar_id":"","url":"https://api.github.com/users/clojure-emacs","html_url":"https://github.com/clojure-emacs","followers_url":"https://api.github.com/users/clojure-emacs/followers","following_url":"https://api.github.com/users/clojure-emacs/following{/other_user}","gists_url":"https://api.github.com/users/clojure-emacs/gists{/gist_id}","starred_url":"https://api.github.com/users/clojure-emacs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clojure-emacs/subscriptions","organizations_url":"https://api.github.com/users/clojure-emacs/orgs","repos_url":"https://api.github.com/users/clojure-emacs/repos","events_url":"https://api.github.com/users/clojure-emacs/events{/privacy}","received_events_url":"https://api.github.com/users/clojure-emacs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/clojure-emacs/clj-refactor.el","description":"A collection of Clojure refactoring functions for Emacs","fork":false,"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el","forks_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/forks","keys_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/keys{/key_id}","collaborators_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/teams","hooks_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/hooks","issue_events_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/events{/number}","events_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/events","assignees_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/assignees{/user}","branches_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/branches{/branch}","tags_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/tags","blobs_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/refs{/sha}","trees_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/trees{/sha}","statuses_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/statuses/{sha}","languages_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/languages","stargazers_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/stargazers","contributors_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/contributors","subscribers_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/subscribers","subscription_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/subscription","commits_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/commits{/sha}","git_commits_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/git/commits{/sha}","comments_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/comments{/number}","issue_comment_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/comments{/number}","contents_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/contents/{+path}","compare_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/compare/{base}...{head}","merges_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/merges","archive_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/downloads","issues_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues{/number}","pulls_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls{/number}","milestones_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/milestones{/number}","notifications_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/labels{/name}","releases_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/releases{/id}","created_at":"2013-01-30T06:44:10Z","updated_at":"2015-12-23T23:12:06Z","pushed_at":"2015-12-26T21:27:25Z","git_url":"git://github.com/clojure-emacs/clj-refactor.el.git","ssh_url":"git@github.com:clojure-emacs/clj-refactor.el.git","clone_url":"https://github.com/clojure-emacs/clj-refactor.el.git","svn_url":"https://github.com/clojure-emacs/clj-refactor.el","homepage":"","size":5952,"stargazers_count":381,"watchers_count":381,"language":"Emacs Lisp","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":17,"forks":37,"open_issues":17,"watchers":381,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276"},"html":{"href":"https://github.com/clojure-emacs/clj-refactor.el/pull/276"},"issue":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/276"},"comments":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/statuses/812ef20e53ef2febc6de9ae492ad9e14b53e2847"}}}}