emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Sebastien Vauban <sva-news@mygooglest.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] [Babel] Add line number to "Processing code block..." message
Date: Mon, 11 Nov 2013 09:35:42 -0700	[thread overview]
Message-ID: <87txfihp5t.fsf@gmail.com> (raw)
In-Reply-To: <86li10mdny.fsf@somewhere.org> (Sebastien Vauban's message of "Thu, 07 Nov 2013 16:31:29 +0100")

Hi Seb,

Thanks for this patch, I've applied it and then tweaked the wording of
the message.

Best,

"Sebastien Vauban" <sva-news@mygooglest.com> 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 <sva-news@mygooglest.com>
> 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

  parent reply	other threads:[~2013-11-11 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=87txfihp5t.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sva-news@mygooglest.com \
    /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).