profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/expez/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Lars Andersen expez Ardoq Oslo, Norway

company-mode/company-quickhelp 302

Documentation popup for Company

expez/edn.el 47

Read and write EDN from Elisp

expez/.emacs.d 19

An opinionated configuration for Emacs

expez/EASY 2

EASY is an Evolutionary Algorithm System

ardoq/clj-wamp 0

WebSocket Application Messaging Protocol (WAMP) for Clojure and HTTP Kit

expez/ack-and-a-half 0

ack.el + full-ack.el = ack-and-a-half.el (Yet another emacs front-end to ack)

issue openedglasserc/ethan-wspace

Minor Issue With Org-mode Font Locking

When ethan-wspace cleans a buffer, it removes all trailing whitespace. This breaks org-mode font locking for outlines. In org-mode, header lines are color-coded according to their depth, based on the number of leading asterisks (or at least, that's what I use). But that requires a space after the last asterisk, and if there's nothing else on the line ethan-wspace will delete that space and break the font-locking

A file like

* Header
** header 2
*** 

will have the space character at the end of the third line removed, and show up as white characters.

created time in 3 days

release rubocop/rubocop

v1.17.0

released time in 4 days

issue commentclojure-emacs/cider

Could CIDER provide an xref backend instead of hijacking `M-.` and `M-,`?

@bbatsov I would like to try submit a PR to fix this, maybe in two/three weeks.

stig

comment created time in 4 days

issue commentclojure-emacs/cider

Could CIDER provide an xref backend instead of hijacking `M-.` and `M-,`?

No progress. I've been pretty busy lately.

stig

comment created time in 4 days

issue commentclojure-emacs/cider

Could CIDER provide an xref backend instead of hijacking `M-.` and `M-,`?

@bbatsov Any news for this?

stig

comment created time in 4 days

issue commentclojure-emacs/cider

Key bindings of company-mode don't work while evil-mode is enabled

Same issue here.

@bbatsov Do you think we should include this workaround in faq?

CloseToZero

comment created time in 5 days

issue closedclojure-emacs/orchard

cider-nrepl not working in guix due to jdk.javadoc.doclet not found

In gnu guix with Java OpenJDK installed via the packages "openjdk" "openjdk:doc" "openjdk:jdk" info and stacktrace causes this exceptions:

Caused by: java.lang.ClassNotFoundException: jdk.javadoc.doclet.Doclet
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)

My cloure code stays the same. On fedora it is working, on guix it throws exceptions.

Is there a way to find out if javadoc is installed? Any pointer to what could be missing is appreciated!

Expected behavior

:info and :stacktrace ops work

Environment & Version information

guix with

Clojure version

latest stable

Java version

from guix package

Operating system

linux

closed time in 7 days

awb99

issue commentclojure-emacs/orchard

cider-nrepl not working in guix due to jdk.javadoc.doclet not found

I solved the issue. In gnu guix the "openjdk" package removes javadoc libs, one has to use ONLY the package "openjdk:jdk".

awb99

comment created time in 7 days

issue openedclojure-emacs/orchard

cider-nrepl not working in guix due to jdk.javadoc.doclet not found

In gnu guix with Java OpenJDK installed via the packages "openjdk" "openjdk:doc" "openjdk:jdk" info and stacktrace causes this exceptions:

Caused by: java.lang.ClassNotFoundException: jdk.javadoc.doclet.Doclet
	at java.base/java.net.URLClassLoader.findClass(Unknown Source)

My cloure code stays the same. On fedora it is working, on guix it throws exceptions.

Is there a way to find out if javadoc is installed? Any pointer to what could be missing is appreciated!

Expected behavior

:info and :stacktrace ops work

Environment & Version information

guix with

Clojure version

latest stable

Java version

from guix package

Operating system

linux

created time in 8 days

release hakimel/reveal.js

4.1.2

released time in 10 days

release rubocop/rubocop

v1.16.1

released time in 10 days

startedexpez/superstring

started time in 15 days

issue commentclojure-emacs/cider

Cider jumps to clojure.core/fn as source of stack frames for top level anonymous functions

I was just looking for this issue yesterday. It would be very useful to jump to test source lines from exceptions thrown in tests.

hugoduncan

comment created time in 16 days

IssuesEvent

issue closedclojure-emacs/cider

cider-symbol-at-point does not return ns-qualified keyword to re-jump.el

I'm having trouble getting re-jump.el to work in context of a re-frame app. It might have to do with cider-symbol-at-point.

re-jump.el provides emacs navigation for re-frame projects. It helps jump to re-frame effect registrations, which are basically namespace-qualified keywords. Ref. its README for an example https://github.com/oliyh/re-jump.el

re-jump relies on cider-symbol-at-point to give it a fully-qualified keyword, which feeds into a regex-based search, to jump to definition.

And I think cider-find-keyword is broken for me, for the same reason.

Expected behavior

Using re-jump.el as of SHA 443ddfa33dd2ae593cc0a013d16fff21f2afd925

cider-symbol-at-point should return a fully namespace qualified keyword to re-jump.el when we call M-x re-frame-jump-to-reg or M->.

Actual behavior

cider-symbol-at-point returns an empty string to re-jump.el.

At one point I thought refactor-nrepl might be interfering, but I am able to reproduce the problem without refactor-nrepl too.

Steps to reproduce the problem

Setting up an exact replica of my project may be too much. I suspect this is a general problem that will reproduce within any clojurescript project, given the software versions documented below.

A bit of debugging inside cider-util.el/cider-symbol-at-point suggests the function is able to extract the keyword with (thing-at-point 'symbol). But, it appears to not macroexpand the keyword in a clojurescript nREPL.

ref: https://github.com/clojure-emacs/cider/blob/master/cider-util.el#L134

(when (string-match-p "^::.+" str)
  (setq str (or (ignore-errors (cider-sync-request:macroexpand "macroexpand-1" str)) "")))

I found macroexpanison returns nil. I observed this with println style debugging and with edebug step through.

The regex string-match appears to work, but then, cider-sync-request:macroexpand appears to return nil.

When stepping through, I noticed str seems to get bound to a fontified structure.

Result: #("::my-target-event-registration" 0 2 (help-echo cider--help-echo fontified t cider-locals #1=("slug" "_" "_") face clojure-keyword-face) 2 28 (help-echo cider--help-echo fontified t cider-locals #1# face clojure-keyword-face))

I tried to remove font lock, and re-tried step through. Now str gets set to "::my-target-event-registration", but still no dice... macroexpansion still returns nil.

        ;; remove font-locking
        (setq str (substring-no-properties str))
        ;; resolve ns-aliased keywords
        (when (string-match-p "^::.+" str)
          (setq str (or (ignore-errors (cider-sync-request:macroexpand "macroexpand-1" str)) "")))

This is the limit of my emacs-fu, I'm afraid... I'll need help to debug this further to find a fix.


Looking through commit history, I noticed the above keyword-expansion behaviour was added here (starting line 132 in cider-util.el): https://github.com/clojure-emacs/cider/pull/2826/files#diff-21ccb709cb3dcff7d2b47a250e64c363ca182b5a3155ab034ce6743fec58fa03R132


Note: I start the repl in my terminal and connect from Emacs with cider-connect-cljs. The exact REPL invocation is:

lein with-profile cljs update-in :dependencies conj '[cider/cider-nrepl "0.25.3"]' -- run -m shadow.cljs.devtools.cli --npm watch app

Environment & Version information

CIDER version information

;; CIDER 1.0.0snapshot (package: 20201018.957), nREPL 0.7.0
;; Clojure 1.10.1, Java 11.0.8

;; ClojureScript REPL type: shadow-select
;; ClojureScript REPL init form: (do (require '[shadow.cljs.devtools.api :as shadow]) (shadow/nrepl-select :app))

Middleware:

  • refactor-nrepl 2.5.0
  • cider/cider-nrepl 0.25.3

Lein/Boot version

  • Leiningen 2.9.4 on Java 11.0.8 OpenJDK 64-Bit Server VM
  • shadow-cljs 2.10.21 (invoked via yarn + npm)

Emacs version

GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.13) of 2019-12-24

Operating system

Ubuntu 20.04.1 LTS

closed time in 16 days

adityaathalye

issue closedclojure-emacs/cider

Trouble getting M-. (cider-find-var) to work, even though I am running cider-jack-in-clj&cljs in file beforehand

Use the template below when reporting bugs. Please, make sure that you're running the latest stable CIDER and that the problem you're reporting hasn't been reported (and potentially fixed) already.

Remove all of the placeholder text in your final report!

Expected behavior

Start off by visiting a file in https://github.com/Gonzih/cljs-electron/ I chose https://github.com/Gonzih/cljs-electron/blob/master/ui_src/ui/core.cljs and executing M-x cider-jack-in-clj&cljs M-. on 'def' in https://github.com/Gonzih/cljs-electron/blob/master/ui_src/ui/core.cljs should take me to the source code of def.

Actual behavior

It doesn't work. Instead cider-find-var (M-.) prompts "Symbol: " in the minibuffer with no prefilled suggestions. When I write in 'def' and hit return it tells me no cljs REPLs are in current session.

Steps to reproduce the problem

Clone the repository: https://github.com/Gonzih/cljs-electron/ and then try to M-. any function/variable/macro in ui_src/ui/core.cljs.

Environment & Version information

I tried updating the dependencies because someone suggested that in a totally different cljs project that would fix it.

Here it is:

:dependencies [[org.clojure/clojure "1.10.1"]
                [org.clojure/clojurescript "1.10.758"]
                [figwheel "0.5.19"]
                [figwheel-sidecar "0.5.19"]
                [cider/piggieback "0.5.1"]
                [reagent "0.8.1"]
                [ring/ring-core "1.7.1"]]
 :plugins [[lein-cljsbuild "1.1.7"]
           [lein-figwheel "0.5.20"]
           [lein-cooper "1.2.2"]]

CIDER version information

;; CIDER 1.0.0snapshot (package: 20201125.1146), nREPL 0.8.3
;; Clojure 1.10.1, Java 11.0.9.1

Lein/Boot version

skip

Emacs version

27.1

Operating system

Ubuntu 20.10

closed time in 16 days

banjomet

issue closedclojure-emacs/cider

eldoc disappears when opening structure

Expected behavior

eldoc does not disappear

Actual behavior

eldoc disappears

Steps to reproduce the problem

Invoke a loaded function and in any argument position, open a map, vector - eldoc disappears.

I suppose this problem has always been present. Just today I noticed that it already became a habit of mine to skip out of the current structure to see eldoc again. Especially when invoking a function that declares a destructured map arg, its an interruption not to see the :keys list anymore.

Environment & Version information

Cider version

0.26.0

Emacs version

26.3

closed time in 16 days

lgrapenthin

issue closedclojure-emacs/cider

Cider jumps to clojure.core/fn as source of stack frames for top level anonymous functions

Expected behavior

Cider jumps to the correct source when clicking a stack trace frame.

Actual behavior

Cider jumps to clojure.core/fn as source of stack frames for top level anonymous functions.

Steps to reproduce the problem

(def ^{:test (fn [] (throw (ex-info "err" {})))} my-fn
  (fn []))

(defn call-my-fn []
  ((:test (meta #'my-fn))))

(call-my-fn)

Click on the first displayed stack frame - opens clojure,core/fn.

Note that this is the pattern used by deftest.

Environment & Version information

All things master head. Mac.

CIDER version information

;; CIDER 0.26.0snapshot, nREPL 0.8.0-alpha5
;; Clojure 1.10.1, Java 1.8.0_252

Emacs version

GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-09-02

closed time in 16 days

hugoduncan

issue closedclojure-emacs/cider

How to eval sexp in clojure-mode with cider and write result in current buffer

For example I have the code:

(println "foo")

With cider-pprint-eval-last-sexp-to-comment I can eval the code and get

(println "foo") ;; nil

in clojure buffer and also it print foo in cider-repl buffer.

I would like to get something like this in the current buffer:

(println "foo") ;; nil foo

How can I do this?

closed time in 16 days

Pfedj

issue closedclojure-emacs/cider

How to link a cljc buffer with both clj and cljs repls?

It's not entirely clear for me in the documentation. Here's my issue in details:

  • Project A (according to projectile), clj, in project/clj/
  • Project B (according to projectile), cljs, in project/cljs/
  • Project C (according to projectile), cljc, in project/cljc/

When I evaluate something in the cljc project, I would like it to be evaluated within both clj and cljs repls. How can I do that?

closed time in 16 days

qleguennec

issue commentclojure-emacs/cider

cider-symbol-at-point does not return ns-qualified keyword to re-jump.el

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

adityaathalye

comment created time in 16 days

issue commentclojure-emacs/cider

Trouble getting M-. (cider-find-var) to work, even though I am running cider-jack-in-clj&cljs in file beforehand

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

banjomet

comment created time in 16 days

issue commentclojure-emacs/cider

eldoc disappears when opening structure

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

lgrapenthin

comment created time in 16 days

issue commentclojure-emacs/cider

Cider jumps to clojure.core/fn as source of stack frames for top level anonymous functions

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

hugoduncan

comment created time in 16 days

issue commentclojure-emacs/cider

How to eval sexp in clojure-mode with cider and write result in current buffer

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

Pfedj

comment created time in 16 days

issue commentclojure-emacs/cider

How to link a cljc buffer with both clj and cljs repls?

This issues been automatically closed due to lack of activity. Feel free to re-open it if you ever come back to it.

qleguennec

comment created time in 16 days

issue commentclojure-emacs/cider

Switch between CLJ and CLJS REPLs seems to need improvement

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

jmckitrick

comment created time in 16 days

issue commentclojure-emacs/cider

Complex print options should be converted to edn

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

arichiardi

comment created time in 16 days

issue commentclojure-emacs/cider

.nrepl.edn middleware not honored

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

xificurC

comment created time in 16 days

PR closed clojure-emacs/cider

Reviewers
Clearer fringe evaluation indicator - second try stale

Closes #2748 Closes #2751

Second try for this stale PR: #2751

Overview

Issue #2748 notes that the evaluation indicator in the fringe is very subtle. This PR makes three changes to address this, split into 3 commits:

  1. Extract the bitmap displayed in the fringe into a user-configurable custom.
  2. Inherit the indicator's color from the current theme, rather than hard-coding it.
  3. Change the default bitmap used to filled-rectangle.

This is just an initial stab at changing the indicators, to prove the concept. Happy to rewrite as necessary. I haven't cleared the checklist yet - wanted to hear what you guys thought before formally cleaning things up.

Current Look

The indicator is difficult to see in certain themes. Colors are hard-coded, which can result in an inconsistent palette. The bitmap itself creates a semi-transparent effect. Some examples:

before-spacemacs-dark spacemacs-dark

before-spacemacs-light spacemacs-light

before-nord doom-nord

Different Bitmap

Swapping to a different bitmap makes things a little bolder. I had a look through all the built-in bitmaps, in my opinion filled-rectangle looks best.

symbol-only-spacemacs-dark spacemacs-dark

symbol-only-spacemacs-light spacemacs-light

symbol-only-nord doom-nord

Dynamic Colors

Rather than expecting each theme to explicitly override the fringe colors, it would be better if we could dynamically adjust the color to match each theme. diff-attach is a built-in face which is almost always green, and should match the palette of the theme.

Inheriting the foreground from this face works across a wide range of themes:

both-spacemacs-dark spacemacs-dark

both-spacemacs-light spacemacs-light

both-nord doom-nord

both-zenburn zenburn

both-leuven leuven

both-doom-one doom-one

both-monokai monokai

both-solarized-dark solarized-dark

both-solarized-light solarized-light

Many themes also set the background for diff-attach. Inheriting just the foreground reduces visual clutter, and seems to work consistently. We can make the operation safer with :distant-foreground, to defer to a hard-coded green if the diff foreground is not sufficiently visible.

Scaling

An issue with filled-rectangle is it doesn't scale vertically. It seems the proportions are locked and the fringe is pegged to a specific pixel width. The original bitmap doesn't have this issue. For example:

large-text

I'm not sure if defining a new bitmap would allow us to adjust this property. Another solution might also be to adjust the background color of the fringe directly, rather than display a bitmap.

Before submitting the PR make sure the following things have been done (and denote this by checking the relevant checkboxes):

  • [x] The commits are consistent with our contribution guidelines

  • [ ] You've added tests (if possible) to cover your change(s)

  • [ ] All tests are passing (make test)

  • [ ] All code passes the linter (make lint) which is based on elisp-lint and includes

  • [ ] You've updated the changelog (if adding/changing user-visible functionality)

  • [ ] You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its manual extremely useful.

+42 -6

8 comments

1 changed file

ericdallo

pr closed time in 16 days