Fork me on GitHub
#cider
<
2018-06-16
>
bozhidar07:06:59

@richiardiandrea Mostly because our main inspiration for cider’s debugger was edebug 😄

😀 4
bozhidar07:06:42

I used to hate Elisp in the beginning, but it really grows on you (+ the language evolved so much since I started using Emacs around 22.1).

benedek11:06:18

@bozhidar your refactor-nrepl commit breaks compatibility with 0.17 cider i think

benedek11:06:56

I think it is better to keep snapshot compatible with 0.17 until i have time to cut a release

bozhidar11:06:13

Why? Orchard is a self-contained dep which is rewritten, so nothing will break.

bozhidar11:06:30

But on the bright side - now this works with 0.18.

benedek11:06:00

Did not realise but i guess you are right

benedek11:06:08

Thanks then :)

bozhidar11:06:09

This wasn’t renamed internally in cider-nrepl, it’s just not there anymore. 🙂

blueberry14:06:45

C-x o (other-window) seems to work differently in recent cider. Is there a way to return to previous behavior? I have 3 monitors, with one workspace each. Each monitor has an emacsclient opened. Previously, if I invoked C-x o, it cycled through open buffers/windows in that particular workspace/monitor's emacslicent. Now, C-x o would display a number in all windows, and I have to type a number of the window I want to switch to. The desired behavior is, as previously, to move the focus to the next window in the same emacsclient, and leave emacsclients in other workspaces/monitors alone. Any hints?

dpsutton14:06:34

have you upgraded to emacs 26 recently? I believe by default C-x o runs the command other-window which is not CIDER related but an emacs built-in.

dpsutton14:06:19

if you're not using spacemacs, hit C-h c (ask which command is invoked by key combo) C-x o to see what command is run by C-x o

dpsutton14:06:54

i'm sure spacemacs has similar functionality i'm just not sure where it is

blueberry15:06:54

@dpsutton emacs is 25.3 on arch. I'haven't updated anything but cider in the last few months. I've been away from home for one month, and before the cider update that I did one month ago (before I left) everything worked as expected. Now, you gave me a good hint. It seems that C-x o is bound to ace-window instead of other-window, but I don't know why, since, as I said, I didn't change anything else but updated cider...

dpsutton15:06:25

weird. but ace-window is not a dependency of cider that i know of

blueberry16:06:47

@dpsutton after unsuccessfully trying to eradicate ace-window from my emacs, I found out that it's a dependency of @bozhidar’s prelude, so I'll have to find a way to disable just this particular remapping of C-x o, as I really prefer the old behavior.

dpsutton16:06:15

i see. i think it's normally bound to M-p must have changed recently

bozhidar16:06:26

You don’t need to remove it. You just need to change the keybinding.

dpsutton16:06:28

the man speaketh

bozhidar16:06:17

It’s not bound to anything by default. I just bind it to C-x o as I think it’s better than the default in every use case.

bozhidar16:06:50

Many modes bind M-p, so that’s a poor keybinding IMO.

blueberry16:06:08

@bozhidar In my multi-monitor case the new behavior is just annoying. Previously, I easily cycled between buffers with C-x o, and if I needed to switch windows, I used my winow manager for that (xmonad). Now, I have to look for the right number to type each time I do C-x o, even though in 95% of the cases I just want to move to the next buffer. Anyway, what is the right place to disable/change this setting and get back to C-x o invoking other-window?

blueberry16:06:10

BTW, I usually switch to other Prelude defaults, as they turn out to be better than how things work by default, but this particular functionality is really annoying, at least in my setup...

dpsutton16:06:53

it looks like its in core/prelude-global-keybindings.el

blueberry16:06:26

Thanks. I also found that, but I do not know whether I should edit there (and introduce a difference to the stock prelude) or I can override somehow in my custom.el? (global-set-key "C-x o" 'other-window) didn't work...

dpsutton16:06:08

use personal.el but yeah should be fine

dpsutton16:06:40

i think custom is for things changed with the defcustom editor

blueberry16:06:56

@dpsutton I do not have personal.el. In prelude, custom settings are in .../personal/custom.el

blueberry16:06:12

And how exactly should I disable the setting?

blueberry16:06:26

prelude does that remapping-fu...

blueberry16:06:53

Is there a way to undone it, or I should let it do its business, and then re-re-map it somehow to other-window?

dpsutton16:06:54

> In some cases you may not want to have a key-chord that is defined by prelude, in which case you can disable the binding in your personal.el file by setting its command to nil. For example, to disable the jj key-chord add the following line:

dpsutton16:06:23

from the readme. i believe you should create a personal.el file and use your modifications in there. i believe custom.el is used and assumed to be overwritable

dpsutton16:06:43

;; config changes made through the customize UI will be store here
(setq custom-file (expand-file-name "custom.el" prelude-personal-dir))

dpsutton16:06:57

that will probably nuke your stuff if you ever use the customize ui

dpsutton16:06:17

;; load the personal settings (this includes `custom-file')
(when (file-exists-p prelude-personal-dir)
  (message "Loading personal configuration files in %s..." prelude-personal-dir)
  (mapc 'load (directory-files prelude-personal-dir 't "^[^#\.].*el$")))

dpsutton16:06:47

you can name it whatever you want and however many you want. just custom.el is assumed for particular use

blueberry16:06:47

@bozhidar Now I am lost 🙂 Can you give us a hint about this C-x o "back to defaults" thing?

blueberry16:06:45

@dpsutton Is there a difference to the jj example that, in this case, it's not about the chord, but the C-x something, and that I do not want to disable it, just to disable the particular remaping to ace-window?

dpsutton16:06:19

then just manually (global-set-key (kbd "C-c C-w") 'copy-defun-for-web) or whatver you need

blueberry16:06:53

@dpsutton Thank you for trying to lead me here. I've already tried global-set-key and it didn't work

blueberry16:06:04

it still invokes ace-window

dpsutton16:06:11

hmm. that's strange

blueberry16:06:42

I've also read and re-read that disabling-key-chords, but I do not understand how it applies here

blueberry16:06:55

since I do not want to disable the bindings

dpsutton16:06:23

you could try what he's doing in the first place: (global-set-key [remap other-window] 'ace-window) and instead do (global-set-key [remap ace-window] 'other-window)

blueberry16:06:30

I've also make sure that I restarted emacs each time 🙂

blueberry16:06:25

Nope. Doesn't work for me...

blueberry16:06:51

I've tried evaling it with C-x C-e, and also added it to custom.el, and restarted emacs

bozhidar16:06:00

Hmm, if you’ve placed this in the right place it’s impossible for this not to work.

bozhidar16:06:08

You should not edit custom.el manually, btw.

blueberry16:06:41

? I thought this is the place for user's personal things. Thanks for pointing this out to me!

blueberry16:06:07

Where can I read where exactly should I put my custom things?

dpsutton16:06:16

any other file i nthat dir except for custom.el

blueberry16:06:22

I assumed it is in ./emacs.d/personal/custom.el

bozhidar16:06:36

People usually name this personal.el or something like this.

blueberry16:06:08

OK. Will change that. But, anyway, mu custom settings worked even though they were in custom.el, and this one gets ignored.

blueberry16:06:29

Thanks for pointing this one to me 🙂

dpsutton16:06:06

yes they will work there. but if you use the customize ui it will most probably overwrite them all or put the file in corrupted state

bozhidar16:06:26

But yeah - generally changing this there should have worked as well, if you’ve wrote the right thing.

blueberry16:06:56

Interesting: I moved my part of custom.el to personal.el, and now everything from personal.el gets ignored...

blueberry16:06:30

I use stock prelude on 25.3...

blueberry16:06:47

And generally didn't mess with anything outside custom.el

bozhidar16:06:05

Check the messages buffer and what gets loaded there. I have to run now, so I can’t offer more assistance right now.

bozhidar16:06:32

Generally all files in this folder should be treated the same way and there should be some message saying they were loaded.

blueberry16:06:00

Prelude is powering up... Be patient, Master dragan! Loading personal configuration files in /home/dragan/.emacs.d/personal/preload... Loading /home/dragan/.emacs.d/personal/preload/init.el (source)...done Loading Prelude’s core... Loading /home/dragan/.emacs.d/savefile/recentf...done Loading Prelude’s modules... Loading /home/dragan/.emacs.d/prelude-modules.el (source)... Key Chord mode on Loading /home/dragan/.emacs.d/prelude-modules.el (source)...done Loading personal configuration files in /home/dragan/.emacs.d/personal... Loading /home/dragan/.emacs.d/personal/custom.el (source)... Problems while trying to load export back-end ‘ascii’ Problems while trying to load export back-end ‘html’ Problems while trying to load export back-end ‘icalendar’ Problems while trying to load export back-end ‘latex’ Starting new Ispell process aspell with default dictionary... For information about GNU Emacs and the GNU system, type C-h C-a. next-line: End of buffer [3 times] previous-line: Beginning of buffer [2 times] Quit mwheel-scroll: Beginning of buffer Mark set mwheel-scroll: Beginning of buffer

blueberry16:06:29

It seems that personal.el just gets ignored

bozhidar16:06:33

I don’t see personal.el there.

bozhidar16:06:42

That’s super odd. Is it in the right folder?

blueberry16:06:54

Me neither 🙂

bozhidar16:06:59

Btw, you can also just set aw-scope to frame.

blueberry16:06:03

But it definitely exist

bozhidar16:06:08

(setq aw-scope ’frame)

bozhidar16:06:16

Seems to me this is going to solve your problem.

blueberry16:06:16

@bozhidar Interestingly, that too does not change anything

blueberry16:06:50

Since as soon as I have more than 2 windows, I get the ace-window's numbers

bozhidar16:06:37

Well, that’s the point - you’re supposed to be able to quickly navigate more than 1 window, which you can’t do by default.

blueberry16:06:51

my personal.el is in ~/.emacs.d/personal/personal.el

bozhidar16:06:56

But I thought your problem was with multiple frames.

bozhidar17:06:06

Or maybe you call a window something else.

blueberry17:06:38

@bozhidar I get the idea. Just in practice it's much easier to me to hit C-x o C-x o than to hit C-x o and then look at the changed display to see which number correspond to each frame

blueberry17:06:14

Yep, the main part of the problem. Thanks for resolving that

blueberry17:06:24

But now I have two problems 🙂

blueberry17:06:36

Why the hell my personal.el is being ignored

blueberry17:06:00

And how to disable ace-window's hijacking and a prelude setting in general 🙂

blueberry17:06:07

In a "proper" way

dpsutton17:06:45

try commenting out the line in prelude just to see if that works. and make sure the world is steady underneath out feet

blueberry17:06:05

A "window" was a thingy inside one emacs rectangle that display one buffer. The main emacs windows is called frame if I remember well?

dpsutton17:06:05

do you have prelude symlinked into ~/.emacs.d or is it actually there?

dpsutton17:06:43

is it possible you are editing a different copy of your init?

blueberry17:06:12

@dpsutton it's actually there

blueberry17:06:42

I don't believe so, because other custom settings don't get ignored

blueberry17:06:30

I had some customizations in custom.el. They were applied. When I moved them to personal.el in the same folder, now they get ignored...

blueberry17:06:55

of course, I'm restarting /bin/emacs each time to make sure it gets applied

blueberry17:06:24

One thing that might be different: In my personal folder, there is custom.el, and custom.elc, but there is no personal.clc

blueberry17:06:38

Should I invoke some compilation step when I edit personal.el?

blueberry17:06:52

personal.elc...

dpsutton17:06:59

Shouldn't need to

blueberry17:06:17

Do you use Prelude, too?

blueberry17:06:04

Can you tell me exactly how you set up your personal settings and where?

dpsutton17:06:07

~/.emacs.d/personal/personal.el

dpsutton17:06:19

neither is byte compiled

blueberry17:06:18

it's the same file name on my system...

dpsutton17:06:55

delete the elc files. and move the old custom.el into ~/custom.el.copy or something

dpsutton17:06:29

also, are you sure you are restarting emacs? you're not running an emacs server and just killing your client connection?

blueberry17:06:32

Yep, I'm invoking /bin/emacs just to make sure that it's the plain old restarted emacs.

blueberry17:06:25

managed to fix the personal.el issue!

blueberry17:06:28

the problem was that after moving some parts of custom.el to personal.el custom.el needed some more re-fixing to not throw errors that stopped emacs to further continue loading personal files. Now onto the ace-window issue 🙂

blueberry17:06:54

Thank you a lot for helping me with this (and teaching me the proper way of personal configurations :)

blueberry17:06:28

Hmmm... Althugh that other settings get applied now, none of the suggested things for the ace-window problem get applied...

dpsutton17:06:35

what was blowing up in custom.el?

blueberry17:06:58

Some org2jekyll things. But that's fixed now.

dpsutton17:06:23

ah. also, check in *Messages* if there are any warnings or something during startup

blueberry17:06:01

The problem is back at what I had when I had my settings in custom.el: Everything else works fine, but I can't remap ace-window back.

blueberry17:06:14

Prelude is powering up... Be patient, Master dragan! Loading personal configuration files in /home/dragan/.emacs.d/personal/preload... Loading /home/dragan/.emacs.d/personal/preload/init.el (source)...done Loading Prelude’s core... Loading /home/dragan/.emacs.d/savefile/recentf...done Loading Prelude’s modules... Loading /home/dragan/.emacs.d/prelude-modules.el (source)... Key Chord mode on Loading /home/dragan/.emacs.d/prelude-modules.el (source)...done Loading personal configuration files in /home/dragan/.emacs.d/personal... Loading /home/dragan/.emacs.d/personal/custom.el (source)...done Loading /home/dragan/.emacs.d/personal/personal.el (source)...done Prelude is ready to do thy bidding, Master dragan! Starting new Ispell process aspell with default dictionary... For information about GNU Emacs and the GNU system, type C-h C-a. Prelude tip: Press <C-c G> to search in GitHub.

blueberry17:06:24

Seems fine to me

blueberry17:06:57

@bozhidar @dpsutton I have to solve this by commenting the ;;(global-set-key [remap other-window] 'ace-window) line in prelude-global-keybindings.el. Thank you both for helping me with this! I'll open an issue in prelude regarding inability to do this the "proper" way, in my personal settings. I hope this will help others that have the same problem, and will lead to the proper solution eventually...

blueberry18:06:28

This worked: (global-set-key [remap other-window] 'other-window)