Open RyanMcCarl opened 7 years ago
sorry, I missed the issue opend.
Could you show me your .org file? (to reproduce your error) It's better with minimal config of your environment.
I got the same error. I'm using the latest version Org Mode which is loaded from master
branch source code. the latest commit is 96cc762ff master upstream/master Remove duplicate selection letters from tag filter prompt.
hmm...I can't reproduce it. It runs successfully with its sample conversions (README.org).
I'm using Emacs version GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8) of 2019-04-13
. And with minimal config, still have this error.
Would you put these somewhere?
Here is my minimal config
(package-initialize)
;;; [ Debug ]
(setq debug-on-error t
debug-on-signal nil
debug-on-quit nil)
;;; add my init files directory
(add-to-list 'load-path "/usr/share/emacs/site-lisp/")
(add-to-list 'load-path (expand-file-name "init" user-emacs-directory))
;; recursively load init files.
(let ((default-directory "~/.emacs.d/init/"))
(setq load-path
(append
(let ((load-path (copy-sequence load-path))) ; shadow
(append
(copy-sequence (normal-top-level-add-to-load-path '(".")))
(normal-top-level-add-subdirs-to-load-path)))
load-path)))
(setq load-prefer-newer t)
;;; [ package.el ]
(load "~/.emacs.d/init/init-package.el")
(require 'init-package)
;; (require 'init-org-mode)
;;; Org-mode Babel
(setq org-confirm-babel-evaluate nil)
(setq org-babel-no-eval-on-ctrl-c-ctrl-c nil)
(setq org-confirm-shell-link-function 'yes-or-no-p)
(setq org-confirm-elisp-link-function 'yes-or-no-p)
;; babel src block editing
(setq org-src-fontify-natively t
;; nil: preserve org indent, t: preserve export indent.
org-src-preserve-indentation nil
;; 0: fix `diff' babel syntax highlighting invalid issue.
org-edit-src-content-indentation 0
org-src-tab-acts-natively nil ; make [Tab] work native as in major mode.
org-src-window-setup 'current-window ; 'reorganize-frame, 'current-window
org-src-ask-before-returning-to-edit-buffer nil
org-edit-src-auto-save-idle-delay 0 ; 0: don't auto save.
)
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t) (org . t)
(shell . t)
(lisp . t) (clojure . t)
(js . t)))
;; [ ob-typescript ]
(use-package ob-typescript
:defer t
:commands (org-babel-execute:typescript)
:config
(add-to-list 'org-babel-load-languages '(typescript . t))
(org-babel-do-load-languages 'org-babel-load-languages org-babel-load-languages)
(add-to-list 'org-babel-tangle-lang-exts '("typescript" . "ts"))
(add-to-list 'org-babel-default-header-args:typescript '(:results . "output")))
And here is my typescript code block:
#+begin_src typescript :tangle "data/code/wechaty-demo.ts"
import { Wechaty } from 'wechaty'
Wechaty.instance()
.on('scan', qrcode => console.log('扫码登录:' + qrcode))
.on('login', user => console.log('登录成功:' + user))
.on('message', message => console.log('收到消息:' + message))
.on('friendship', friendship => console.log('收到好友请求:' + friendship))
.on('room-invite', invitation => console.log('收到入群邀请:' + invitation))
.start()
#+end_src
Weird, when I test again, this error gone.
hi, thanks for your snippet.
I've found that ":results output" setting seems to cause the error, because I didn't care about org-babel parameters. I will take care of it later, or @dop's commit 7782749dc54a6b76cc4e3988247685e1a02bfe42 will fix the problem.