emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] [Babel] Add line number to "Processing code block..." message
@ 2013-11-07 15:31 Sebastien Vauban
  2013-11-07 21:13 ` Bastien
  2013-11-11 16:35 ` Eric Schulte
  0 siblings, 2 replies; 9+ messages in thread
From: Sebastien Vauban @ 2013-11-07 15:31 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Here is a small patch to improve the messages displayed by Org Babel when
processing code blocks: now, you get the line number added to the output, so
that you can easily find afterward which block had problems, if such things
were reported in the *Messages* buffer.

Best regards,
  Seb

From 9e8b74d881575318ff480f084ac10aea82696904 Mon Sep 17 00:00:00 2001
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
Date: Thu, 7 Nov 2013 16:24:53 +0100
Subject: [PATCH] Improve "Processing Org code block" message

* ob-exp.el (org-babel-exp-src-block): Improve message by adding line number.

---
 lisp/ob-exp.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index c8479e3..3874338 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -110,12 +110,14 @@ none ---- do not display either code or results upon export
 
 Assume point is at the beginning of block's starting line."
   (interactive)
-  (unless noninteractive (message "org-babel-exp processing..."))
   (save-excursion
     (let* ((info (org-babel-get-src-block-info 'light))
+	   (line (org-current-line))
 	   (lang (nth 0 info))
 	   (raw-params (nth 2 info)) hash)
       ;; bail if we couldn't get any info from the block
+      (unless noninteractive
+	(message "Processing %s code block at line %d..." lang line))
       (when info
 	;; if we're actually going to need the parameters
 	(when (member (cdr (assoc :exports (nth 2 info))) '("both" "results"))
-- 
1.7.9

-- 
Sebastien Vauban

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-13  8:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07 15:31 [PATCH] [Babel] Add line number to "Processing code block..." message Sebastien Vauban
2013-11-07 21:13 ` Bastien
2013-11-07 22:57   ` Sebastien Vauban
2013-11-08  7:23     ` Bastien
2013-11-08  9:07       ` Sebastien Vauban
2013-11-08  9:10         ` Bastien
2013-11-11 16:35 ` Eric Schulte
2013-11-11 16:58   ` Bastien
2013-11-13  8:39   ` Sebastien Vauban

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).