ob-go icon indicating copy to clipboard operation
ob-go copied to clipboard

Don't know how to use

Open haormj opened this issue 8 years ago • 3 comments

althought I add ob-go from melpa, but it doesn't work well. could you tell me how to config it in emacs Thank you

haormj avatar Aug 07 '17 12:08 haormj

Hey @haormj , here is what I did: Download the ob-go.el, add the following line to my emacs configuration:

(load-file "~/.dotfiles/ob-go.el")

I uses Spacemacs, thus this line is in the (defun dotspacemacs/user-config () block.

digizeph avatar Nov 12 '17 18:11 digizeph

I loaded it via melpa, but also had to add this to my emacs init file:

(setenv "PATH" (concat (getenv "PATH") ":/usr/local/go/bin"))
(setq exec-path (append exec-path '("/usr/local/go/bin")))

(or where ever you have go installed)

robrohan avatar Oct 11 '19 06:10 robrohan

@robrohan I also had the very same problem but with another ob-* package as mentioned here https://github.com/brotzeit/rustic/issues/93#issuecomment-586688568 and the documentation fix was: https://github.com/brotzeit/rustic/commit/f387594773ce68f30e3f15f041b64c0214a277a3#diff-04c6e90faac2675aa89e2176d2eec7d8R71-R74

It would be nice to mention that solution, for example, on doom emacs:

Install using MELPA M-x package-install RET exec-path-from-shell RET.

Add initialization to config.el:

(package-initialize)

;; Config environment variables
(when (memq window-system '(mac ns x))
  (exec-path-from-shell-initialize))

carlosrogue avatar Feb 17 '20 02:02 carlosrogue