Fork me on GitHub
#emacs
<
2018-11-05
>
lispers-anonymous14:11:51

@dadair Depending on what you are doing, you could just use normal org-mode and not rely on org-contact. I don’t maintain my contacts in emacs (maybe I should), but if I were going to I would write an emacs function that prompted me for inputs like contact name, phone number, email, category, and drop that information in a file using some kind of structure like

* dadair
:properties:
:phone: 
:email: [email protected]
:address: dadair's address
Then you could use org agenda to search for contacts.

dadair16:11:02

Thanks! My only concern with something hand-rolled is integrating with mu4e or gnus (I’ll be migrating to one of them soon)

lispers-anonymous01:11:45

I wish I had some advice for you there. I don’t use either of those tools. The emacs subreddit or an irc may be good places to find advice for what you are trying to do.

orestis14:11:34

Any users of inferior-clojure here? I can connect to a remote REPL but can’t get my buffer to acknowledge that it is connected. Instead, it always shows “Inferior Clojure: no process”.

orestis14:11:21

It says inf-clojure-proc: No Clojure subprocess; see variable 'inf-clojure-buffer'

lispers-anonymous14:11:27

What does inf-clojure-buffer say?

orestis14:11:20

It says that I should use it to set up the, well, inf-clojure-buffer that commands go to — but its value is already *inf-clojure* which is the buffer that commands should go to.

orestis14:11:10

Evaling this in the minibuffer: (setq inf-clojure-buffer "*inf-clojure*") doesn’t seem to fix anything.

lispers-anonymous14:11:10

Do you have the variable inferior-lisp-program? If so is it set to anything, like "lein run"?

orestis14:11:50

Evaluating inferior-lisp-program throws an error, and describe-variable & ivy refuses to autocomplete it, so probably not?

orestis14:11:02

But I’m in inferior clojure, not inferior lisp…

orestis14:11:27

Here’s what I see…

lispers-anonymous14:11:39

I’m not too familiar with inferior clojure, but I thought it might use inferior lisp under the hood.

orestis14:11:00

(defun inf-clojure-proc ()
  "Return the current inferior Clojure process.
See variable `inf-clojure-buffer'."
  (let ((proc (get-buffer-process (if (derived-mode-p 'inf-clojure-mode)
                                      (current-buffer)
                                    inf-clojure-buffer))))
    (or proc
        (error "No Clojure subprocess; see variable `inf-clojure-buffer'"))))
I can’t make sense of this…

lispers-anonymous14:11:11

Have you added this to your init file?

(autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
  (add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)

orestis14:11:14

This is the function of inferior clojure that throws an error.

lispers-anonymous14:11:04

I was just able to get inferior clojure up and running on my emacs (normally I use cider). Here are the steps I took Add this to my init file,

(use-package inf-clojure
  :ensure t
  :pin "melpa"
  :config
  (autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
  (add-hook 'clojure-mode-hook #'inf-clojure-minor-mode))
If you don’t use use-package, you should be able to install it, and in your init file add
(require 'inf-clojure)
(autoload 'inf-clojure "inf-clojure" "Run an inferior Clojure process" t)
(add-hook 'clojure-mode-hook #'inf-clojure-minor-mode)
Evaluate the code, whether it is use package or something else, then in a clojure buffer (I picked a project.clj), run M-x inf-clojure and watch your repl start up. You should have leiningen or whatever tool you use installed and available on your path so emacs and inf-clojure can find it.

orestis14:11:09

Right, thanks — this works — I want to connect to an already running socket REPL.

orestis14:11:21

So what I have to do first is inf-clojure-connect

orestis14:11:51

And this does create the *inf-clojure* buffer, but then for some reason my actual source file is not connected to that.

orestis14:11:19

OK, I managed to do something too — the key bit is to make sure you are first on Clojure major mode, and the invoke inf-clojure-minor-mode

lispers-anonymous14:11:33

I just tried the same thing with my basic inf-clojure setup, and couldn’t get it working

lispers-anonymous14:11:55

I get an error saying comint-propmpt-regexp not set properly. The *inf-clojure* buffer is not acting like it’s connected to a repl. It’s just an empty buffer with no prompts.

orestis14:11:59

Which is what confused me — the Clojure source buffer needs to have inf-clojure minor mode, not inf-clojure-mode

orestis14:11:14

Weird, that works for me just fine.

lispers-anonymous14:11:53

Well I use cider so i’m not worried about mine. You should have inf-clojure-minor-mode already enabled in clojure-mode bufferes if you add it in a hook. Doing that would keep you from having to start the minor mode every time

orestis15:11:22

Yep- I figured it out now. I also use cider usually but this is to connect to a remote socket REPL that doesn’t have nRepl etc.

orestis15:11:56

So I have to set it up manually. I’ll probably end up just bundling nRepl and the relevant middleware to be able to just use cider there.

orestis15:11:05

Thanks for your help!

lispers-anonymous16:11:01

Indeed. Glad you were able to figure it out 🎉

valtteri19:11:33

@orestis to me inf-clojure-connect works as expected. I’m on Prelude and I’ve installed inf-clojure with M-x package-install inf-clojure. I can eval forms from (cljs) buffer with inf-clojure-eval-last-sexp etc. There’s also #inf-clojure but it’s been inactive for while.

orestis19:11:38

@valtteri thanks, my confusion was that I was entering the inf-clojure major mode which is the one that applies to the REPL buffer itself. I should have entered the minor mode which allows you to eval buffers etc.