From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Babel more verbose? Date: Tue, 02 Sep 2014 13:30:21 -0400 Message-ID: References: <878um2dqdw.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOruX-0005IC-SW for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 13:30:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOruT-0007zz-7B for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 13:30:29 -0400 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:45204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOruT-0007za-2d for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 13:30:25 -0400 Received: by mail-qc0-f173.google.com with SMTP id w7so7256987qcr.32 for ; Tue, 02 Sep 2014 10:30:24 -0700 (PDT) In-Reply-To: <878um2dqdw.fsf@alphaville.bos.redhat.com> (Nick Dokos's message of "Tue, 02 Sep 2014 10:54:35 -0400") 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: Nick Dokos Cc: emacs-orgmode@gnu.org Nick Dokos writes: I found a message is not sufficient because I get another message from running the code block that looks like: Wrote /var/folders/5q/lllv2yf95hg_n6h6kjttbmdw0000gn/T/babel-27354lYd/ob-input-27354uxF and it obscures the first message so you cannot tell what is happening. Here is a another approach that simply puts an overlay to change the color of the text in the code block while running. #+BEGIN_SRC emacs-lisp (defadvice org-babel-execute-src-block (around progress nil activate) "create a buffer indicating what is running" (let ((ol (make-overlay (org-element-property :begin (org-element-at-point)) (org-element-property :end (org-element-at-point))))) (overlay-put ol 'face '(foreground-color . "blue")) ad-do-it (delete-overlay ol))) #+END_SRC > John Kitchin writes: > >> Try this: >> >> #+BEGIN_SRC emacs-lisp >> (defadvice org-babel-execute-src-block (around progress nil activate) >> "create a buffer indicating what is running" >> (let ((code-block (org-element-property :name (org-element-at-point))) >> (cb (current-buffer))) >> (split-window-below) >> (other-window 1) >> (switch-to-buffer "*My Babel*") >> (insert (format "Running %s" code-block)) >> (other-window 1) >> ad-do-it >> (kill-buffer "*My Babel*") >> (delete-other-windows))) >> #+END_SRC >> >> It will mess with your windows a bit, but it does what you want I think. >> > > Wouldn't a (message (format "Running %s" code-block)) be enough? > That would avoid all the window munging. > >> >> Gary Oberbrunner writes: >> >>> I have an org-mode babel program/document that takes about half an >>> hour to run (end result is a LaTeX or HTML doc with figures). It's a >>> mix of SQL and python. (The SQL is the slow part.) I'd really like it >>> if org-mode could tell me, while it's running, which named block it's >>> processing. Is there anything like that available? An option perhaps? > > -- > Nick > > > -- ----------------------------------- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu