Fork me on GitHub
#emacs
<
2017-03-06
>
benedek09:03:53

donโ€™t think so @lvh. if you want to do that in the current ns (not globally) a regex search and replace should do the trick ?!

qqq14:03:09

in emacs, what is the easiest way to open all files in src/ ? the goal here is to use imenu-in-all-buffers ... well, in this case I better have all of src/ open

mgrbyte14:03:32

@qqq C-x C-f src/* i think

qqq15:03:44

@mgrbyte: yeah, meant recursively (I should have clarified; sorry!) -- ended up writing a *.el file to do just that

lepistane17:03:39

any tutorials on how to setup emacs settings for clojure? prelude is not an option

dpsutton17:03:18

just out of curiosity, why is prelude not an option?

dpsutton17:03:29

but setting up emacs for clojure should be straightforward

dpsutton17:03:36

make sure melpa or melpa stable is enabled

dpsutton17:03:39

install CIDER

dpsutton17:03:41

@lepistane don't follow the guide that @mping put when it talks about putting nrepl in your lein profile file

mping17:03:23

@dpsutton please kindly explain and I will update the blog, Im a clojure n00b

mping17:03:43

that blog post was picked from multiple posts, so Iโ€™m sure its not a best practice

dpsutton17:03:38

CIDER used to require you to keep its dependencies in your lein profiles. But CIDER and cider-nrepl have the same version numbers so its easy to keep them in sync. You are putting a hardcoded 0.10-snapshot but CIDER is 0.14.0 on melpa stable and 0.15 on melpa

dpsutton17:03:46

so you are explicitly stating a discrepancy

dpsutton17:03:28

but CIDER now injects its dependencies so stating them is no longer required, but only serves to explicitly mismatch the frontend (CIDER) from the backend (cider-nrepl)

mping17:03:11

@dpsutton thanks, will update ๐Ÿ˜„

dpsutton17:03:54

thanks for the guide helping newbies! the easier to get up and running the better

lepistane18:03:46

@dpsutton hi because prelude has too much stuff in it i cant catch up if you ever used setup from Brave and True it is really small. i tried updating cider using that setup but i am getting an error like "symbol's function body is null" or something like that i dont want things in i just want Brave and True setup with new cider that doesnt give me errors

dpsutton18:03:08

re the errors @lepistane do you mean you got errors updating with the brave clojure setup?

dpsutton18:03:30

i've seen those errors and the best idea i have is that the brave setup does something fundamentally bad

dpsutton18:03:56

it's using a version of cider from 2014 and it includes the compiled elisp code in addition to the source code

dpsutton18:03:10

my best guess so far is that emacs has changed the compiled code of lambdas and this is breaking it

dpsutton18:03:38

i'm not a big fan of it for that reason and for others (manually keeping a dependency at 0.8.2) so that when you jack in you get front-end backend mismatches

dpsutton18:03:56

my best suggestion is to totally drop the brave clojure estup and install prelude from scratch

dpsutton19:03:14

barring that, i would start totally fresh and pick and choose which parts of the brave setup you want to keep but do not install it

lepistane19:03:41

i understand

dpsutton19:03:52

but if you need any help there's this channel and also #cider

lepistane19:03:55

let me ask you this. when i install package do i need to do anything else to 'turn it on' ??

lepistane19:03:17

for instance smex

lepistane19:03:23

i like that i installed it

lepistane19:03:28

but do i have to add

dpsutton19:03:15

i'm in a meeting right now

dpsutton19:03:19

45 minutes?

lepistane19:03:00

sorry to bother you. i will be here

tanzoniteblack19:03:03

@lepistane it greatly depends on what the package is (and sometimes on how you installed it). Often times packages that provide major modes for files (like clojure-mode, or rust-mode) will automatically set up a hook to turn themselves on when you open a file with a specific file name ending.

tanzoniteblack19:03:36

Many packages that are "on all the time", like smex, or other packages that provide enhancements to emacs as a whole, generally require you to enable them in some way.

dpsutton19:03:27

no bother at all

dpsutton19:03:33

just didn't want to leave you hanging ๐Ÿ™‚

lepistane19:03:04

i appreciate it

dpsutton20:03:57

@lepistane how's the CIDER installation going? I'm back at a computer

richiardiandrea21:03:05

Fun days! inf-clojure now support REPL type for extensibility and Lumo! If you have some time, test and bug me with bugs emacs https://github.com/clojure-emacs/inf-clojure/pull/44

lepistane21:03:36

@dpsutton took this blog https://coderwall.com/p/53bfpg/for-beginners-get-emacs-with-clojure-up-and-running and started installing things dont know how to turn on smex and idomenu

dpsutton21:03:37

looks like this is all you need (global-set-key (kbd "M-x") 'smex)

lepistane21:03:20

ye i figured that but not sure in which file i write that i dont have init.el like i had with Brave and true setup

dpsutton21:03:13

that guide has you make one

dpsutton21:03:16

Configuring Emacs

C-x C-f ~/.emacs <br/>
Welcome to the world of elisp! After you've survived that shock, let's get started!<br/>
Ok, first, place this at the end of the file:

dpsutton21:03:43

C-x C-f ~/.emacs will create that file for you

dpsutton21:03:48

that's what that is saying

dpsutton21:03:58

and when you only have a single file it creates it at ~/.emacs

dpsutton21:03:07

if its a directory it makes ~/.emacs.d/

lepistane21:03:26

oki lets see

lepistane21:03:11

i made that file and put https://gist.github.com/zilti/6083155 into ;;your code goes here

lepistane21:03:49

Warning (initialization): An error occurred while loading `/home/marko/.emacs': Symbol's value as variable is void: defun To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace.

dpsutton21:03:56

defun is for sure defined

dpsutton21:03:09

have you installed ido?

dpsutton21:03:13

can you do the (require 'ido)

lepistane21:03:33

i didnt have it now i installed it

dpsutton21:03:49

can you post your emacs file?

lepistane21:03:49

i will go through the list once again

lepistane21:03:58

thank you very much for being patient with me

dpsutton21:03:30

ah, well, you put defun outside of parens

dpsutton21:03:58

(defun function (params) ...)

dpsutton21:03:22

defun my-init () is just not well formed

lepistane21:03:17

ye i fixed it got error pretty-mode-plus not there - i cant find it on melpa

lepistane21:03:25

should i just comment that line?

dpsutton21:03:45

well, it sounds like you are using someone else's init?

dpsutton21:03:52

i thought that's why you didn't want to use prelude

dpsutton21:03:14

i don't know what pretty mode plus is

lepistane21:03:21

i understand

lepistane21:03:31

prelude was too much for me i couldnt handle so much

lepistane21:03:39

so i found smallest tutorial

lepistane21:03:46

just to get how what and where

lepistane21:03:02

basically i'd have to do the same with prelude

dpsutton21:03:15

fair enough

lepistane21:03:19

every package i install i should put in ~/.emacs.d/personel/personal.el

dpsutton21:03:20

i don't know what pretty mode plus is

lepistane21:03:26

just as u said yesterday

dpsutton21:03:41

but you don't have a directory

dpsutton21:03:44

so i'm not sure what happens there

dpsutton21:03:52

you have a single file at ~/.emacs, right?

dpsutton21:03:08

i don't know where they get installed when you don't have an emacs directory

lepistane21:03:34

i was talking about if i were to use prelude steps would be the same. i'd just put these things (hooks and all that) into personel.el file just like you said yesterday

dpsutton21:03:56

ah yes. all of your modifications would go into personal.el

lepistane21:03:01

ye ye so this was easier to grasp than prelude right away. i am absolute beginner so it takes time. Thank you for being patient with me

lepistane22:03:34

question on the side. when i delete emacs.d i get fresh new emacs i dont have to sudo apt-get remove emacs or purge or anyting like that?

dpsutton22:03:07

the emacs config directory (~/.emacs) does not modify the binary you install

dpsutton22:03:42

when emacs starts up, it looks at your emacs config file or directory to know what to do and what to look like

dpsutton22:03:53

so yes deleting the config directory is sufficient

lepistane22:03:00

i failed to make init work but i learned a lot i will setup prelude now thank you so much thank you for taking time out of your day to help me

dpsutton22:03:45

i think the benefit of prelude is that a) it works b) there's lots of customizations that you can follow

dpsutton22:03:54

so you can see what it looks like and modify it from there