{"action":"created","issue":{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/154","labels_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/154/comments","events_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/154/events","html_url":"https://github.com/clojure-emacs/clj-refactor.el/issues/154","id":81318583,"number":154,"title":"add import ruins my (ns) declaration","user":{"login":"gdanov","id":957113,"avatar_url":"https://avatars.githubusercontent.com/u/957113?v=3","gravatar_id":"","url":"https://api.github.com/users/gdanov","html_url":"https://github.com/gdanov","followers_url":"https://api.github.com/users/gdanov/followers","following_url":"https://api.github.com/users/gdanov/following{/other_user}","gists_url":"https://api.github.com/users/gdanov/gists{/gist_id}","starred_url":"https://api.github.com/users/gdanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdanov/subscriptions","organizations_url":"https://api.github.com/users/gdanov/orgs","repos_url":"https://api.github.com/users/gdanov/repos","events_url":"https://api.github.com/users/gdanov/events{/privacy}","received_events_url":"https://api.github.com/users/gdanov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-27T07:12:39Z","updated_at":"2015-05-27T11:19:06Z","closed_at":"2015-05-27T09:01:27Z","body":"Following the example animated for add import, I trigger the operation, type in my import statement and when I exit the snippet I end up with namespace declaration where the existing ```(:require )``` is gone and I am left with empty ```(:import)``` \r\n\r\nExamples\r\n* before:\r\n```\r\n(ns jj.repl\r\n\t(:require [puget.printer]\r\n\t\t\t\t\t\t[clojure.tools.namespace.repl :as ns-repl]\r\n            ;; [jj.gram.core]\r\n            jj.gram.printer\r\n            jj.gram.state-machine\r\n            [jj.core :as core]\r\n            jj.gram.group-exec\r\n            )\r\n)\r\n```\r\n* after\r\n```\r\n(ns jj.repl\r\n\t(:require)\r\n```\r\n\r\nNote that it also unbalances the parentheses. Not only of the ns statement but on the subsequent as well.\r\nusing latest stable versions"},"comment":{"url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/comments/105874431","html_url":"https://github.com/clojure-emacs/clj-refactor.el/issues/154#issuecomment-105874431","issue_url":"https://api.github.com/repos/clojure-emacs/clj-refactor.el/issues/154","id":105874431,"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},"created_at":"2015-05-27T11:19:06Z","updated_at":"2015-05-27T11:19:06Z","body":"I definitely agree with you that this is bad, but I won't fix it because:\r\n\r\n1. `cljr-sort-ns`, which contains the problem, is going to be deprecated shortly.\r\n2. The fraction of users using this kind of formatting is so small the bug is bordering on irrelevant.\r\n3. Fixing it would be a ton of work."}}