From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Rainer M Krug <Rainer@krugs.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: progress indicator for code blocks?
Date: Tue, 02 Sep 2014 10:19:26 -0400 [thread overview]
Message-ID: <m2vbp6jea9.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <m2wq9mbct6.fsf@krugs.de> (Rainer M. Krug's message of "Tue, 02 Sep 2014 11:18:29 +0200")
No, it does not seem to work for me. C-g kills the current evaluation
for me.
Rainer M Krug <Rainer@krugs.de> writes:
> Thanks for this snippet - I think something along these lines should be
> included into org out-of-the-box.
>
> There are many cases where I simply use C-g to go back to emacs while
> the evaluation is still running - would your snippet still work?
>
> Rainer
>
>
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> John Kitchin <jkitchin@andrew.cmu.edu> 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
next prev parent reply other threads:[~2014-09-02 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-30 13:02 progress indicator for code blocks? John Kitchin
2014-08-31 12:03 ` John Kitchin
2014-09-02 9:18 ` Rainer M Krug
2014-09-02 14:19 ` John Kitchin [this message]
2014-09-03 4:55 ` Nick Dokos
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=m2vbp6jea9.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=Rainer@krugs.de \
--cc=emacs-orgmode@gnu.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).