Fork me on GitHub
#emacs
<
2017-06-01
>
johnny.martin03:06:24

@norman could possibly just a M-x new-frame do what you need?

johnny.martin04:06:56

Just tried and my emacs grumbled, This function is obsolete since 22.1; use make-frame instead.

rickmoynihan12:06:34

how can I make a cider-debug buffer read only? I keep typing changes into it and then loosing them ๐Ÿ˜ž

daveliepmann13:06:18

Anybody using tramp and docker-tramp to connect to files in a container running on a remote machine? I've encountered some weird behavior

daveliepmann13:06:54

...`C-x C-f /docker:` only autocompletes containers when executed while in an eshell buffer in which I've already cd'd into the remote machine, which would be fine except after selecting the appropriate container, files listed are in my laptop's root directory, not the container.

plexus14:06:43

Anyone know in elisp if there's a way to get to the path of the current elisp file? (i.e. the one a function is defined in, not the current buffer)

plexus14:06:58

the equivalent to Ruby's __FILE__ magic variable

dpsutton14:06:19

(buffer-file-name (current-buffer))

plexus14:06:11

nope, that's the current buffer, I want the file the function is defined in

plexus14:06:24

(defun unrepl-read-blob ()
  ;;TODO don't hard code this
  (get-string-from-file "/home/arne/github/unrepl.el/blob.clj"))

dpsutton14:06:31

oh i misread "current elisp file"

plexus14:06:43

blob.el is located next to unrepl.el, how do I find it?

plexus14:06:35

I might have to come up with some shenanigans traversing from package-user-dir if it's not possible otherwise

dpsutton14:06:13

can you count on the fact that they are adjacent?

plexus14:06:27

yes, they are always in the same directory, I just need to find where that directory is ๐Ÿ™‚

dpsutton14:06:16

file-name-directory gets you the directory and then if you know the name of the other file you can combine them

dpsutton14:06:58

(expand-file-name relfile dirname) to combine them it seems

plexus14:06:08

what do I pass to file-name-directory though, if I don't know the location of unrepl.el?

dpsutton14:06:32

oh do you not know the location of it at all?

dpsutton14:06:38

i was assuming you were in that buffer to begin with

plexus14:06:04

well it's going to be installed by a user, so it's going to be under their package-user-dir, unrepl-x.x.x presumably

dpsutton14:06:58

should you just load it, require it or setup a package directory file?

plexus14:06:18

I think I can do something with load-file-name, will only work when loading the package with load, so it's a bit tedious for development time, but I think it will work

plexus14:06:30

I can't just load it because it's not elisp, it's a clojure blob that I need to send to a repl ๐Ÿ™‚

plexus14:06:03

I could add a pre-package step to turn it into elisp, wrap it in a (setq unrepl-blob ,,,) (provide 'unrepl-blob)

dpsutton14:06:28

any reason to not just defvar it?

plexus14:06:55

how do you mean exactly?

dpsutton14:06:17

(defvar unrepl-blob "(clojure-code to execute))"

dpsutton14:06:31

in unrepl blob and then presumably its part of the package

dpsutton14:06:58

(require 'unrepl-blob) (unrepl-send-command connection unrepl-blob) or whatever

plexus14:06:29

yeah that's what I meant. What's the benefit of defvar over setq here?

plexus14:06:53

This seems to work though : (setq unrepl-home (file-name-directory load-file-name))

plexus14:06:10

after doing (load "/home/arne/github/unrepl.el/unrepl.el") the unrepl-home is set correctly

dpsutton14:06:54

oh well then problem solved

plexus14:06:22

thanks a lot for the help!

dpsutton14:06:22

no problem. anytime!

escherize19:06:23

oh man, i figured out how to โ€œzoom inโ€ and keep linum working

oskarkv20:06:36

Does anyone know how I can stop ignoring files in projectile? I want to be able to, for example, open a personal todo file that is in .gitignore.

cmack21:06:29

I think you have to use normal find-file for that.

oskarkv21:06:35

I found it, I think. Apparently I can use !file in .projectile