質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Babel

Babelは、JavaScriptの次世代仕様であるECMAScriptのコンパイラ。次世代の標準機能を用いて記述されたコードを、それらの機能に対応していないブラウザでも動作するコードに変換することができます。

Emacs

GNU Emacsと拡張性の高い、高性能なテキストエディタです。豊富なライブラリの導入により、統合開発環境やWebブラウザとしても機能させる事が可能です。

Go

Go(golang)は、Googleで開発されたオープンソースのプログラミング言語です。

Q&A

解決済

1回答

446閲覧

No Org-Babel execute function for go

AliHassan

総合スコア351

Babel

Babelは、JavaScriptの次世代仕様であるECMAScriptのコンパイラ。次世代の標準機能を用いて記述されたコードを、それらの機能に対応していないブラウザでも動作するコードに変換することができます。

Emacs

GNU Emacsと拡張性の高い、高性能なテキストエディタです。豊富なライブラリの導入により、統合開発環境やWebブラウザとしても機能させる事が可能です。

Go

Go(golang)は、Googleで開発されたオープンソースのプログラミング言語です。

0グッド

0クリップ

投稿2018/12/01 17:46

org

1#+Begin_SRC go 2package main 3import ("fmt") 4 5func main(){ 6 fmt.Println("emacs") 7} 8#+End_Src

// .emacs.d.init.el

emacs.d/init

1(when (memq window-system '(mac ns)) 2 (exec-path-from-shell-initialize) 3 (exec-path-from-shell-copy-env "GOPATH")) 4 5;; Define function to call when go-mode loads 6(defun my-go-mode-hook () 7 (add-hook 'before-save-hook 'gofmt-before-save) ; gofmt before every save 8 (setq gofmt-command "goimports") ; gofmt uses invokes goimports 9 (if (not (string-match "go" compile-command)) ; set compile command default 10 (set (make-local-variable 'compile-command) 11 "go build -v && go test -v && go vet")) 12 13 ;; guru settings 14 (go-guru-hl-identifier-mode) ; highlight identifiers 15 16 ;; Key bindings specific to go-mode 17 (local-set-key (kbd "M-.") 'godef-jump) ; Go to definition 18 (local-set-key (kbd "M-*") 'pop-tag-mark) ; Return from whence you came 19 (local-set-key (kbd "M-p") 'compile) ; Invoke compiler 20 (local-set-key (kbd "M-P") 'recompile) ; Redo most recent compile cmd 21 (local-set-key (kbd "M-]") 'next-error) ; Go to next error (or msg) 22 (local-set-key (kbd "M-[") 'previous-error) ; Go to previous error or msg 23 24 25 (auto-complete-mode 1)) 26 27 28(add-hook 'go-mode-hook 'my-go-mode-hook) 29 30(with-eval-after-load 'go-mode 31 (require 'go-autocomplete)) 32 33(require 'go-guru)

; i want use ob-go , above code just compile the code

ob

1;(require 'ob-go) 2;(org-babel-do-load-languages 3;'org-babel-load-languages 4;'((go . t)))

But this is not execute how i execute this block . I'm new in Literal Programming Please help me

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

Instructions following the semicolon are comments. So you can delete the semicolon of this block.

elisp

1(require 'ob-go) 2(org-babel-do-load-languages 3'org-babel-load-languages 4'((go . t)))

投稿2018/12/02 03:18

akiruno-oneone

総合スコア815

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問