From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] [Babel] Add line number to "Processing code block..." message Date: Mon, 11 Nov 2013 09:35:42 -0700 Message-ID: <87txfihp5t.fsf@gmail.com> References: <86li10mdny.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfuTR-0006D4-0m for emacs-orgmode@gnu.org; Mon, 11 Nov 2013 11:36:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VfuTM-00089h-90 for emacs-orgmode@gnu.org; Mon, 11 Nov 2013 11:36:24 -0500 Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]:35759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VfuTM-00089T-1u for emacs-orgmode@gnu.org; Mon, 11 Nov 2013 11:36:20 -0500 Received: by mail-pd0-f174.google.com with SMTP id z10so5428207pdj.19 for ; Mon, 11 Nov 2013 08:36:19 -0800 (PST) In-Reply-To: <86li10mdny.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 07 Nov 2013 16:31:29 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sebastien Vauban Cc: emacs-orgmode@gnu.org Hi Seb, Thanks for this patch, I've applied it and then tweaked the wording of the message. Best, "Sebastien Vauban" writes: > 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 > 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 -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D