From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [Babel] (wrong-type-argument char-or-string-p nil) when shell error
Date: Fri, 15 Oct 2010 16:58:24 +0200 [thread overview]
Message-ID: <807hhj8pv3.fsf@mundaneum.com> (raw)
Hi Eric and Dan,
* Getting messages from stderr
#+begin_src sh
ls NoSuchFileOrDirectory.txt
#+end_src
results in
: ls: cannot access NoSuchFileOrDirectory.txt: No such file or directory
in *Org-Babel Error Output*, and
#+begin_src emacs-lisp
Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
insert(nil)
(save-current-buffer (set-buffer temp-buffer) (insert results))
(with-current-buffer temp-buffer (insert results))
(prog1 (with-current-buffer temp-buffer (insert results)) (with-current-buffer temp-buffer (write-region nil nil temp-file nil 0)))
(unwind-protect (prog1 (with-current-buffer temp-buffer ...) (with-current-buffer temp-buffer ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
(let ((temp-file tmp-file) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...)))
(with-temp-file tmp-file (insert results))
(let ((tmp-file ...)) (with-temp-file tmp-file (insert results)) (org-babel-import-elisp-from-file tmp-file))
(if (or (member "scalar" result-params) (member "output" result-params)) results (let (...) (with-temp-file tmp-file ...) (org-babel-import-elisp-from-file tmp-file)))
(lambda (results) (if (or ... ...) results (let ... ... ...)))(nil)
org-babel-sh-evaluate(nil "ls NoSuchFileOrDirectory.txt\n\n\n" ("replace"))
(org-babel-reassemble-table (org-babel-sh-evaluate session full-body result-params) (org-babel-pick-name (nth 4 processed-params) (cdr ...)) (org-babel-pick-name (nth 5 processed-params) (cdr ...)))
(let* ((processed-params ...) (session ...) (result-params ...) (full-body ...)) (org-babel-reassemble-table (org-babel-sh-evaluate session full-body result-params) (org-babel-pick-name ... ...) (org-babel-pick-name ... ...)))
org-babel-execute:sh("ls NoSuchFileOrDirectory.txt\n" ((:cache . "no") (:comments . "") (:exports . "code") (:hlines . "no") (:noweb . "no") (:results . "replace") (:session . "none") (:shebang . "") (:tangle . "no")))
funcall(org-babel-execute:sh "ls NoSuchFileOrDirectory.txt\n" ((:cache . "no") (:comments . "") (:exports . "code") (:hlines . "no") (:noweb . "no") (:results . "replace") (:session . "none") (:shebang . "") (:tangle . "no")))
(setq result (funcall cmd body params))
(if (and (not arg) new-hash (equal new-hash old-hash)) (save-excursion (goto-char ...) (end-of-line 1) (forward-char 1) (setq result ...) (message ...) result) (message "executing %s code block%s..." (capitalize lang) (if ... ... "")) (setq result (funcall cmd body params)) (if (eq result-type ...) (setq result ...)) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks (quote org-babel-after-execute-hook)) result)
(progn (fset (quote call-process-region) (function* ...)) (unless (fboundp cmd) (error "No org-babel-execute function for %s!" lang)) (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result) (message "executing %s code block%s..." ... ...) (setq result ...) (if ... ...) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks ...) result))
(unwind-protect (progn (fset ... ...) (unless ... ...) (if ... ... ... ... ... ... ... result)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
(let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ... ...) (if --cl-letf-bound-- ... ...)))
(letf ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute function for %s!" lang)) (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result) (message "executing %s code block%s..." ... ...) (setq result ...) (if ... ...) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks ...) result))
(letf* ((... ...)) (unless (fboundp cmd) (error "No org-babel-execute function for %s!" lang)) (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result) (message "executing %s code block%s..." ... ...) (setq result ...) (if ... ...) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks ...) result))
(flet ((call-process-region ... ...)) (unless (fboundp cmd) (error "No org-babel-execute function for %s!" lang)) (if (and ... new-hash ...) (save-excursion ... ... ... ... ... result) (message "executing %s code block%s..." ... ...) (setq result ...) (if ... ...) (org-babel-insert-result result result-params info new-hash indent lang) (run-hooks ...) result))
(unwind-protect (flet (...) (unless ... ...) (if ... ... ... ... ... ... ... result)) (setq call-process-region (quote org-babel-call-process-region-original)))
(let* ((lang ...) (params ...) (new-hash ...) (old-hash ...) (body ...) (result-params ...) (result-type ...) (cmd ...) (dir ...) (default-directory ...) (org-babel-call-process-region-original ...) (indent ...) result) (unwind-protect (flet ... ... ...) (setq call-process-region ...)))
(progn (let* (... ... ... ... ... ... ... ... ... ... ... ... result) (unwind-protect ... ...)))
(if (org-babel-confirm-evaluate info) (progn (let* ... ...)))
(when (org-babel-confirm-evaluate info) (let* (... ... ... ... ... ... ... ... ... ... ... ... result) (unwind-protect ... ...)))
(let ((info ...)) (when (org-babel-confirm-evaluate info) (let* ... ...)))
org-babel-execute-src-block(nil ("sh" "ls NoSuchFileOrDirectory.txt\n" ((:cache . "no") (:comments . "") (:exports . "code") (:hlines . "no") (:noweb . "no") (:results . "replace") (:session . "none") (:shebang . "") (:tangle . "no")) "" nil nil 0))
(progn (org-babel-execute-src-block current-prefix-arg info) t)
(if info (progn (org-babel-execute-src-block current-prefix-arg info) t) nil)
(let ((info ...)) (if info (progn ... t) nil))
org-babel-execute-src-block-maybe()
(or (org-babel-execute-src-block-maybe) (org-babel-lob-execute-maybe))
org-babel-execute-maybe()
call-interactively(org-babel-execute-maybe)
(cond ((commandp org-speed-command) (setq this-command org-speed-command) (call-interactively org-speed-command)) ((functionp org-speed-command) (funcall org-speed-command)) ((and org-speed-command ...) (eval org-speed-command)) (t (let ... ...)))
(cond ((and org-use-speed-commands ...) (cond ... ... ... ...)) ((and ... ... ... ...) (let ... ... ... ... ...)) (t (setq org-table-may-need-update t) (self-insert-command N) (org-fix-tags-on-the-fly) (if org-self-insert-cluster-for-undo ...)))
org-self-insert-command(1)
call-interactively(org-self-insert-command nil nil)
#+end_src
Best regards,
Seb
--
Sébastien Vauban
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2010-10-15 14:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 14:58 Sébastien Vauban [this message]
2010-10-15 15:25 ` [Babel] (wrong-type-argument char-or-string-p nil) when shell error Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=807hhj8pv3.fsf@mundaneum.com \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.