From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: progress indicator for code blocks? Date: Sun, 31 Aug 2014 08:03:28 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54492) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XO3r6-0007ex-Bh for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 08:03:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XO3r0-0002p9-L4 for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 08:03:36 -0400 Received: from mail-qg0-x233.google.com ([2607:f8b0:400d:c04::233]:58219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XO3r0-0002p5-Fu for emacs-orgmode@gnu.org; Sun, 31 Aug 2014 08:03:30 -0400 Received: by mail-qg0-f51.google.com with SMTP id i50so4047375qgf.38 for ; Sun, 31 Aug 2014 05:03:30 -0700 (PDT) Received: from Johns-MacBook-Air.local (c-24-3-17-30.hsd1.pa.comcast.net. [24.3.17.30]) by mx.google.com with ESMTPSA id p20sm7771867qgp.41.2014.08.31.05.03.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 31 Aug 2014 05:03:29 -0700 (PDT) In-Reply-To: (John Kitchin's message of "Sat, 30 Aug 2014 09:02:47 -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: emacs-orgmode@gnu.org John Kitchin writes: I am currently using this bit of advice to change the color of code blocks while they are being executed so there is a visual hint something is happening. ;; give us some hint we are running (defadvice org-babel-execute-src-block (around progress nil activate) (set-face-attribute 'org-block-background nil :background "LightSteelBlue") (message "Running your code block") ad-do-it (set-face-attribute 'org-block-background nil :background "gray") (message "Done with code block")) > Hi all, > I am using org-mode in a class, and some students wondered if it was > possible for there to be a progress bar of some kind while a code block > is running. Right now Emacs just appears to lock up and there is no > indication anything is happening, especially the first time we run a > python block. > > I found make-progress-reporter and tried something like this:: > > #+BEGIN_SRC emacs-lisp > (defadvice org-babel-execute-src-block (around progress nil activate) > (let ((pr (make-progress-reporter "Running"))) > ad-do-it > (progress-reporter-done pr))) > #+END_SRC > > but there is no way to update it, so it doesn't quite do anything > useful. > > What I would really like is an hourglass or some spinning thing. Does > anyone know how to get that (in a cross-platform way)? -- ----------------------------------- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu