Fork me on GitHub
#emacs
<
2017-07-20
>
rickmoynihan08:07:43

Just tried to M-x package-list-packages and am getting the following certificate error. Is anyone else seeing this?

Certificate information
Issued by:          Let's Encrypt Authority X3
Issued to:          CN=
Hostname:           
Public key:         RSA, signature: RSA-SHA256
Protocol:           TLS1.2, key: ECDHE-RSA, cipher: AES-128-GCM, mac: AEAD
Security level:     Medium
Valid:              From 2017-07-17 to 2017-10-15


The fingerprint for the connection to  has changed
from sha1:4d:5c:08:57:76:20:d7:4a:32:a9:f1:bf:ea:f5:24:f6:86:35:39:82
to sha1:c6:1d:d2:98:16:53:a8:a3:7d:e0:11:f9:5a:71:4c:e0:ac:04:3e:7b

dotemacs09:07:48

Just tried it myself, worked as expected

a1311:07:42

@rickmoynihan do you have the same issue with your browser?

rickmoynihan11:07:24

it asks whether I want to accept the signature, but I don’t know how to verify its authenticity… not sure why its changed.

rickmoynihan11:07:35

assuming it’s not malicious, but you never know…

rickmoynihan11:07:06

Firefox returns a different SHA1 fingerprint: 93:7E:38:69:59:78:77:F4:99:C4:92:EF:EB:CD:4B:F5:2B:92:DD:9A

oskarkv15:07:48

This is my first time trying ClojureScript in CIDER. Apparently I can't use js/require in CIDER, but my compiled code works in the browser. I get org.mozilla.javascript.EcmaError: ReferenceError: "require" is not defined in CIDER. Why?

ajs19:07:17

i'm trying to add some custom cider keybindings, but it doesn't look like the way to do it is with (define-key cider-mode-map ... emacs claims that cider-mode-map is void. any pointers?

dpsutton19:07:46

how are you loading things? with use-package?

ajs19:07:58

i have cider already loaded, and then in my .el i'm trying to add a custom keybinding.

ajs19:07:14

i am using the package

ajs19:07:33

oh i guess that mode map only exists as a var when the mode is active. how do you add a custom keybinding to a mode that is not active yet?

ajs19:07:38

such as in an init.el

oskarkv19:07:39

@ajs That does not sound right.

dpsutton19:07:21

it may not exist until the mode has invoked once. when you first start up there are autoloads that allow you to crank of cider but the map may not exist yet

oskarkv19:07:15

@dpsutton Really? How would one bind keys in that case?

oskarkv19:07:43

Or maybe I'm misunderstaning

dpsutton19:07:56

you'll make it a hook to cider mode

dpsutton19:07:19

(add-hook cider-mode-hook (lambda () (define-key cider-mode-map ...)))

dpsutton19:07:37

give that a whilrl

oskarkv19:07:38

Ok, but I have never needed that for any package

dpsutton19:07:53

i've run into this very issue with org and that resolved it for me

oskarkv19:07:22

Maybe use-package and general takes care of that 😛

dpsutton19:07:00

i thought use-package had a straightforward way to register key bindings?

oskarkv19:07:30

I'm not using use-package for that

dpsutton19:07:02

oh i see. yes i think use-package has some mechanism for this. might be good to read how they accomplish this to ensure that things exist when they modify the keybindings

ajs19:07:07

i'll try adding the hook

ajs19:07:32

hm i think cider-mode-map is not the right map to use, maybe clojure-mode-map? i don't get the error any more but my custom bindings are having no effect with cider-mode-map

oskarkv19:07:12

@ajs Oh, yes, that might be it, hehe

ajs19:07:42

or, maybe clojure-mode-hook instead of cider-mode-hook

ajs19:07:46

i shall try the various permutations

dpsutton19:07:47

well cider-mode-map is for sure there

oskarkv19:07:27

I don't think I have bound anything in it, hm

oskarkv19:07:33

And I only use my own bindings

oskarkv19:07:29

But I do use cider-repl-mode-map

oskarkv19:07:05

@ajs Anyway, I'm using use-package (with :ensure t) and general.el, and I have never had any problem with maps not existing.

ajs19:07:26

is that lambda expression supposed to be quoted or not? i see uses of (lambda ... with and without a leading quote

oskarkv19:07:18

Maybe it does not matter, but I don't quote my lambdas

ajs19:07:16

well i can't seem to get any combination of these to stick

ajs19:07:27

i think cider-mode-map is the correct one

ajs19:07:35

it's used in the clojure-emacs examples

oskarkv19:07:10

@ajs paste your code? Both the loading of cider and the bindings

dpsutton19:07:59

looks right to me. but also looks like spacemacs

dpsutton19:07:22

and all i mean by that is that things get complicated and I have no idea what they are doing with respect to normal mode, insert mode, etc

ajs19:07:37

it's not spacemacs, but the bindings are evil-inspired. my emacs setup is actually quite lean

dpsutton19:07:48

ok. just making sure we weren't fighting against layers

ajs19:07:05

i'm just not able to hook into cider mode for some reason

oskarkv20:07:17

@ajs Does cider-mode-map exist when you are in clojure-mode?

ajs20:07:27

it doesn't appear so

oskarkv20:07:39

Does any of your bindings work? 😛

ajs20:07:59

but strangely some of the bindings from the default cider setup do work

ajs20:07:02

like jack in

ajs20:07:20

but i get an error from my code that cider-mode-map is void

dpsutton20:07:31

can you M-x toggle-debug-on-error or whatever and see what's going on?

dpsutton20:07:10

and what if you comment out your automatic keymap hookup, restart emacs, jack in to a project and then try to manually add a keybinding to the clojure-mode-map. would that work?

ajs20:07:12

let me try some things

ajs20:07:55

so a restart of emacs and resetting my experiments back to only use cider-mode-map and cider-mode-hook appear to be working now

ajs20:07:10

perhaps enough settings had occurred since a restart that they were conflicting

oskarkv20:07:46

Hm, when I run CIDER for ClojureScript I get org.mozilla.javascript.EcmaError: ReferenceError: "require" is not defined. (rhino.clj#41) when I try to use (js/require "fs"). But my compiled code (with lein figwheel) works in the browser. Any ideas of what could be wrong?

oskarkv21:07:28

Hm, if I use the Node repl for cider-cljs-lein-repl then require works, but not cljsjs.mousetrap 😞