Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean ns removes referred Greek letter symbols #451

Open
klausharbo opened this issue Nov 6, 2019 · 1 comment
Open

clean ns removes referred Greek letter symbols #451

klausharbo opened this issue Nov 6, 2019 · 1 comment

Comments

@klausharbo
Copy link

klausharbo commented Nov 6, 2019

Issue

If I refer to symbols consisting of Greek letters in the ns declaration clj-refactor removes them when doing clean ns or add missing libspec.

Expected behavior

Symbols in non-Latin scripts (in the example below: Greek and Danish) treated the same as those consisting of letters from ASCII.

Actual behavior

The symbols are removed from :refer part of the libspec.

Steps to reproduce the problem

src/ns1.clj:

(ns ns1)

(def A inc)
(def Γ inc)
(def Å inc)

src/ns2.clj:

(ns ns2
  (:require [ns1 :refer [A Γ Å]]))

(defn myfun []
  (+ (A 1) (Γ 2) (Å 3)))

The Γ and Å are code points #x393 and #xc5 respectively.

After evaluating cljr-clean-ns in buffer ns2.clj the buffer contains

(ns ns2
  (:require [ns1 :refer [A]]))

(defn myfun []
  (+ (A 1) (Γ 2) (Å 3)))

which will not compile.

Environment & Version information

clj-refactor.el version information

clj-refactor 2.5.0-SNAPSHOT (package: 20190618.716), refactor-nrepl 2.5.0-SNAPSHOT

CIDER version information

;; CIDER 0.24.0snapshot (package: 20191103.1528), nREPL 0.6.0
;; Clojure 1.10.1, Java 1.8.0_192

Leiningen or Boot version

Leiningen 2.9.0 on Java 1.8.0_192 OpenJDK 64-Bit Server VM

Emacs version

GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.7.0, Carbon Version 158 AppKit 1671.6) of 2019-10-04

Operating system

Darwin locke.local 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64
@vemv vemv pinned this issue Mar 15, 2022
@vemv
Copy link
Member

vemv commented Apr 20, 2023

We should work on this one at some point.

Today I found a possibly related issue #540

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants