Browse Source

babel: consolidate execution messaging into ob.el

* lisp/ob.el (org-babel-execute-src-block): consolidate execution
  messaging into ob.el rather than spread out amongst all the language
  files
Eric Schulte 10 years ago
parent
commit
c53fc7d246

+ 0 - 1
lisp/ob-C.el

@@ -83,7 +83,6 @@ header arguments (calls `org-babel-C-expand')."
 (defun org-babel-C-execute (body params)
   "This function should only be called by `org-babel-execute:C'
 or `org-babel-execute:c++'."
-  (message "executing C source code block")
   (let* ((processed-params (org-babel-process-params params))
          (tmp-src-file (make-temp-file "org-babel-C-src" nil
                                        (cond

+ 0 - 1
lisp/ob-R.el

@@ -83,7 +83,6 @@
 (defun org-babel-execute:R (body params)
   "Execute a block of R code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing R source code block...")
   (save-excursion
     (let* ((processed-params (org-babel-process-params params))
            (result-type (nth 3 processed-params))

+ 0 - 1
lisp/ob-asymptote.el

@@ -65,7 +65,6 @@
 (defun org-babel-execute:asymptote (body params)
   "Execute a block of Asymptote code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Asymptote source code block")
   (let* ((processed-params (org-babel-process-params params))
          (result-params (split-string (or (cdr (assoc :results params)) "")))
          (out-file (cdr (assoc :file params)))

+ 1 - 3
lisp/ob-css.el

@@ -37,9 +37,7 @@
 
 (defun org-babel-execute:css (body params)
   "Execute a block of CSS code with org-babel.  This function is
-called by `org-babel-execute-src-block'."
-  (message "executing CSS source code block")
-  body)
+called by `org-babel-execute-src-block'." body)
 
 (defun org-babel-prep-session:css (session params)
   "Prepare SESSION according to the header arguments specified in PARAMS."

+ 0 - 1
lisp/ob-ditaa.el

@@ -50,7 +50,6 @@
 (defun org-babel-execute:ditaa (body params)
   "Execute a block of Ditaa code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Ditaa source code block")
   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
         (out-file (cdr (assoc :file params)))
         (cmdline (cdr (assoc :cmdline params)))

+ 0 - 1
lisp/ob-dot.el

@@ -52,7 +52,6 @@
 (defun org-babel-execute:dot (body params)
   "Execute a block of Dot code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Dot source code block")
   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
         (out-file (cdr (assoc :file params)))
         (cmdline (cdr (assoc :cmdline params)))

+ 0 - 1
lisp/ob-emacs-lisp.el

@@ -58,7 +58,6 @@
 
 (defun org-babel-execute:emacs-lisp (body params)
   "Execute a block of emacs-lisp code with org-babel."
-  (message "executing emacs-lisp code block...")
   (save-window-excursion
     (let ((processed-params (org-babel-process-params params)))
       (org-babel-reassemble-table

+ 0 - 1
lisp/ob-gnuplot.el

@@ -132,7 +132,6 @@ code."
 (defun org-babel-execute:gnuplot (body params)
   "Execute a block of Gnuplot code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Gnuplot source code block")
   (require 'gnuplot)
   (let ((session (cdr (assoc :session params)))
         (result-type (cdr (assoc :results params)))

+ 0 - 1
lisp/ob-haskell.el

@@ -71,7 +71,6 @@
 
 (defun org-babel-execute:haskell (body params)
   "Execute a block of Haskell code with org-babel."
-  (message "executing haskell source code block")
   (let* ((processed-params (org-babel-process-params params))
          (session (nth 0 processed-params))
          (vars (nth 1 processed-params))

+ 0 - 1
lisp/ob-latex.el

@@ -60,7 +60,6 @@
 (defun org-babel-execute:latex (body params)
   "Execute a block of Latex code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Latex source code block")
   (setq body (org-babel-expand-body:latex body params))
   (if (cdr (assoc :file params))
       (let ((out-file (cdr (assoc :file params)))

+ 0 - 1
lisp/ob-mscgen.el

@@ -70,7 +70,6 @@
 is called by `org-babel-execute-src-block'.  Default filetype is
 png. Modify by setting :filetype parameter to mscgen supported
 formats."
-  (message "executing Mscgen source code block")
   (let* ((out-file (or (cdr (assoc :file params)) "output.png" ))
          (filetype (or (cdr (assoc :filetype params)) "png" )))
     (unless (cdr (assoc :file params))

+ 0 - 1
lisp/ob-ocaml.el

@@ -60,7 +60,6 @@
 
 (defun org-babel-execute:ocaml (body params)
   "Execute a block of Ocaml code with org-babel."
-  (message "executing ocaml source code block")
   (let* ((processed-params (org-babel-process-params params))
          (vars (nth 1 processed-params))
          (full-body (org-babel-expand-body:ocaml body params processed-params))

+ 0 - 1
lisp/ob-octave.el

@@ -89,7 +89,6 @@ end")
   (org-babel-execute:octave body params 'matlab))
 (defun org-babel-execute:octave (body params &optional matlabp)
   "Execute a block of octave code with org-babel."
-  (message "executing %s source code block" (if matlabp "matlab" "octave"))
   (let* ((processed-params (org-babel-process-params params))
          (session
 	  (funcall (intern (format "org-babel-%s-initiate-session"

+ 0 - 1
lisp/ob-perl.el

@@ -52,7 +52,6 @@
 (defun org-babel-execute:perl (body params)
   "Execute a block of Perl code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Perl source code block")
   (let* ((processed-params (org-babel-process-params params))
          (session (nth 0 processed-params))
          (vars (nth 1 processed-params))

+ 0 - 1
lisp/ob-python.el

@@ -61,7 +61,6 @@
 (defun org-babel-execute:python (body params)
   "Execute a block of Python code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Python source code block")
   (let* ((processed-params (org-babel-process-params params))
          (session (org-babel-python-initiate-session (first processed-params)))
          (result-params (nth 2 processed-params))

+ 0 - 1
lisp/ob-ruby.el

@@ -67,7 +67,6 @@
 (defun org-babel-execute:ruby (body params)
   "Execute a block of Ruby code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Ruby source code block")
   (let* ((processed-params (org-babel-process-params params))
          (session (org-babel-ruby-initiate-session (first processed-params)))
          (result-params (nth 2 processed-params))

+ 0 - 1
lisp/ob-sass.el

@@ -49,7 +49,6 @@
 (defun org-babel-execute:sass (body params)
   "Execute a block of Sass code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Sass source code block")
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
          (file (cdr (assoc :file params)))
          (out-file (or file (make-temp-file "org-babel-sass-out")))

+ 0 - 1
lisp/ob-sh.el

@@ -61,7 +61,6 @@
 (defun org-babel-execute:sh (body params)
   "Execute a block of Shell commands with org-babel.  This
 function is called by `org-babel-execute-src-block'."
-  (message "executing Shell source code block")
   (let* ((processed-params (org-babel-process-params params))
          (session (org-babel-sh-initiate-session (nth 0 processed-params)))
          (result-params (nth 2 processed-params)) 

+ 0 - 1
lisp/ob-sql.el

@@ -56,7 +56,6 @@
 (defun org-babel-execute:sql (body params)
   "Execute a block of Sql code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Sql source code block")
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
 	 (processed-params (org-babel-process-params params))
          (cmdline (cdr (assoc :cmdline params)))

+ 0 - 1
lisp/ob-sqlite.el

@@ -50,7 +50,6 @@
 (defun org-babel-execute:sqlite (body params)
   "Execute a block of Sqlite code with org-babel.  This function is
 called by `org-babel-execute-src-block'."
-  (message "executing Sqlite source code block")
   (let ((result-params (split-string (or (cdr (assoc :results params)) "")))
 	(vars (org-babel-ref-variables params))
 	(db (cdr (assoc :db params)))

+ 4 - 1
lisp/ob.el

@@ -350,7 +350,10 @@ block."
                 (setq result (org-babel-read-result))
                 (message (replace-regexp-in-string "%" "%%"
                                                    (format "%S" result))) result)
-            (setq result (funcall cmd body params))
+            (message "executing %s code block%s..."
+		     (capitalize lang)
+		     (if (nth 4 info) (format " (%s)" (nth 4 info)) ""))
+	    (setq result (funcall cmd body params))
             (if (eq result-type 'value)
                 (setq result (if (and (or (member "vector" result-params)
                                           (member "table" result-params))