emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [PATCH] [Babel] Add line number to "Processing code block..." message
Date: Thu, 07 Nov 2013 16:31:29 +0100	[thread overview]
Message-ID: <86li10mdny.fsf@somewhere.org> (raw)

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

             reply	other threads:[~2013-11-07 15:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 15:31 Sebastien Vauban [this message]
2013-11-07 21:13 ` [PATCH] [Babel] Add line number to "Processing code block..." message 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

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86li10mdny.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@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 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).