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

Infinite loop in clojure-sort-ns when sorting a ns with comments #645

Closed
ieure opened this issue Feb 27, 2023 · 0 comments · Fixed by #646
Closed

Infinite loop in clojure-sort-ns when sorting a ns with comments #645

ieure opened this issue Feb 27, 2023 · 0 comments · Fixed by #646

Comments

@ieure
Copy link
Contributor

ieure commented Feb 27, 2023

Expected behavior

The ns should be sorted.

Actual behavior

My Emacs session freezes until I hit C-g.

Steps to reproduce the problem

  1. Open an empty .clj file and put this in it:

    (ns test
      (:require [some]
                ;; [other]
                ))
    
  2. Hit M-x clojure-sort-ns RET.

  3. Emacs freezes.

If you uncomment the line with [other] and try again, it works fine. It also works fine if the #_ reader macro is used.

Environment & Version information

clojure-mode version

clojure-mode (version 5.16.0)

Emacs version

GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars)

Operating system

Debian 11 "bullseye"

p4v4n added a commit to p4v4n/clojure-mode that referenced this issue Mar 6, 2023
p4v4n added a commit to p4v4n/clojure-mode that referenced this issue Mar 6, 2023
@vemv vemv closed this as completed in #646 Jun 24, 2023
vemv pushed a commit that referenced this issue Jun 24, 2023
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

Successfully merging a pull request may close this issue.

1 participant