brotzeit / rustic

Rust development environment for Emacs
Apache License 2.0
724 stars 101 forks source link

org-babel with rustic #138

Closed f3r10 closed 4 years ago

f3r10 commented 4 years ago

I have tried to use rustic with org-babel without luck. A source block does not finish ever, for example a simple one:

#+begin_src rust
fn main () {
    println!("hello")
}
#+end_src

#+RESULTS:
: cargoR6QBdQ

There is just a the bottom-right an infinite :Executing

Is there something else that I have to add to my configuration?

this is the error that the debugger capture:

Debugger entered--Lisp error: (wrong-type-argument stringp nil) process-send-string(#<process rustic-babel-format<3>> nil) rustic-babel-build-sentinel(# "finished\n") accept-process-output(# 1) url-retrieve-synchronously("https://github.githubassets.com/images/icons/emoji/unicode/1f609.png") (and t (url-retrieve-synchronously (concat protocol ":" link))) (let ((buf (and t (url-retrieve-synchronously (concat protocol ":" link))))) (if buf (save-current-buffer (set-buffer buf) (goto-char (point-min)) (re-search-forward "\015?\n\015?\n" nil t) (buffer-substring-no-properties (point) (point-max))) (progn (message "Download of image \"%s\" failed" link) nil))) (progn (let ((buf (and t (url-retrieve-synchronously (concat protocol ":" link))))) (if buf (save-current-buffer (set-buffer buf) (goto-char (point-min)) (re-search-forward "\015?\n\015?\n" nil t) (buffer-substring-no-properties (point) (point-max))) (progn (message "Download of image \"%s\" failed" link) nil)))) (if (and (image-type-from-file-name link) (not (eq org-display-remote-inline-images (quote skip)))) (progn (let* ((buf (and t (url-retrieve-synchronously (concat protocol ":" link))))) (if buf (save-current-buffer (set-buffer buf) (goto-char (point-min)) (re-search-forward "\015?\n\015?\n" nil t) (buffer-substring-no-properties (point) (point-max))) (progn (message "Download of image \"%s\" failed" link) nil))))) +org-http-image-data-fn("https" "//github.githubassets.com/images/icons/emoji/unicode/1f609.png" nil) org-display-user-inline-images(nil) apply(org-display-user-inline-images nil)

f(advice-wrapper :after #f(compiled-function (&optional include-linked refresh beg end) "Display inline images.\n\nAn inline image is a link which follows either of these\nconventions:\n\n 1. Its path is a file with an extension matching return value\n from image-file-name-regexp' and it has no contents.\n\n 2. Its description consists in a single link of the previous\n type. In this case, that link must be a well-formed plain\n or angle link, i.e., it must have an explicit \"file\" type.\n\nEquip each image with the key-mapimage-map'.\n\nWhen optional argument INCLUDE-LINKED is non-nil, also links with\na text description part will be inlined. This can be nice for\na quick look at those images, but it does not reflect what\nexported files will look like.\n\nWhen optional argument REFRESH is non-nil, refresh existing\nimages between BEG and END. This will create new image displays\nonly if necessary.\n\nBEG and END define the considered part. They default to the\nbuffer boundaries with possible narrowing." (interactive "P") #<bytecode 0x17ffa65>) org-display-user-inline-images)(nil)

apply(#f(advice-wrapper :after #f(compiled-function (&optional include-linked refresh beg end) "Display inline images.\n\nAn inline image is a link which follows either of these\nconventions:\n\n 1. Its path is a file with an extension matching return value\n from image-file-name-regexp' and it has no contents.\n\n 2. Its description consists in a single link of the previous\n type. In this case, that link must be a well-formed plain\n or angle link, i.e., it must have an explicit \"file\" type.\n\nEquip each image with the key-mapimage-map'.\n\nWhen optional argument INCLUDE-LINKED is non-nil, also links with\na text description part will be inlined. This can be nice for\na quick look at those images, but it does not reflect what\nexported files will look like.\n\nWhen optional argument REFRESH is non-nil, refresh existing\nimages between BEG and END. This will create new image displays\nonly if necessary.\n\nBEG and END define the considered part. They default to the\nbuffer boundaries with possible narrowing." (interactive "P") #<bytecode 0x17ffa65>) org-display-user-inline-images) nil) (progn (fset (function create-image) vnew) (ignore create-image) (apply orig-fn args)) (unwind-protect (progn (fset (function create-image) vnew) (ignore create-image) (apply orig-fn args)) (fset (function create-image) old)) (let ((vnew (function (lambda (file-or-data &optional type data-p &rest props) (let ((type ...)) (apply create-image file-or-data type data-p props))))) (old (symbol-function (function create-image)))) (unwind-protect (progn (fset (function create-image) vnew) (ignore create-image) (apply orig-fn args)) (fset (function create-image) old))) (let ((create-image (symbol-function (function create-image)))) (let ((vnew (function (lambda (file-or-data &optional type data-p &rest props) (let (...) (apply create-image file-or-data type data-p props))))) (old (symbol-function (function create-image)))) (unwind-protect (progn (fset (function create-image) vnew) (ignore create-image) (apply orig-fn args)) (fset (function create-image) old)))) +org--fix-inline-images-for-imagemagick-users-a(#f(advice-wrapper :after #f(compiled-function (&optional include-linked refresh beg end) "Display inline images.\n\nAn inline image is a link which follows either of these\nconventions:\n\n 1. Its path is a file with an extension matching return value\n from image-file-name-regexp' and it has no contents.\n\n 2. Its description consists in a single link of the previous\n type. In this case, that link must be a well-formed plain\n or angle link, i.e., it must have an explicit \"file\" type.\n\nEquip each image with the key-mapimage-map'.\n\nWhen optional argument INCLUDE-LINKED is non-nil, also links with\na text description part will be inlined. This can be nice for\na quick look at those images, but it does not reflect what\nexported files will look like.\n\nWhen optional argument REFRESH is non-nil, refresh existing\nimages between BEG and END. This will create new image displays\nonly if necessary.\n\nBEG and END define the considered part. They default to the\nbuffer boundaries with possible narrowing." (interactive "P") #<bytecode 0x17ffa65>) org-display-user-inline-images) nil) apply(+org--fix-inline-images-for-imagemagick-users-a #f(advice-wrapper :after #f(compiled-function (&optional include-linked refresh beg end) "Display inline images.\n\nAn inline image is a link which follows either of these\nconventions:\n\n 1. Its path is a file with an extension matching return value\n from image-file-name-regexp' and it has no contents.\n\n 2. Its description consists in a single link of the previous\n type. In this case, that link must be a well-formed plain\n or angle link, i.e., it must have an explicit \"file\" type.\n\nEquip each image with the key-mapimage-map'.\n\nWhen optional argument INCLUDE-LINKED is non-nil, also links with\na text description part will be inlined. This can be nice for\na quick look at those images, but it does not reflect what\nexported files will look like.\n\nWhen optional argument REFRESH is non-nil, refresh existing\nimages between BEG and END. This will create new image displays\nonly if necessary.\n\nBEG and END define the considered part. They default to the\nbuffer boundaries with possible narrowing." (interactive "P") #<bytecode 0x17ffa65>) org-display-user-inline-images) nil) org-display-inline-images(nil) org-toggle-inline-images() org-redisplay-inline-images() run-hooks(org-babel-after-execute-hook) org-babel-execute-src-block(nil ("rust" "fn main () {\n println!(\"hello\")\n}" ((:colname-names) (:rowname-names) (:result-params "replace") (:result-type . value) (:results . "replace") (:exports . "code") (:tangle . "no") (:hlines . "no") (:noweb . "no") (:cache . "no") (:session . "none")) "" nil 80698 "(ref:%s)")) org-ctrl-c-ctrl-c(nil) funcall-interactively(org-ctrl-c-ctrl-c nil) call-interactively(org-ctrl-c-ctrl-c nil nil) command-execute(org-ctrl-c-ctrl-c)

Info of my system:

f3r10 commented 4 years ago

Sorry It looks that it is something else is going on with orgmode. Rustic works perfect.