all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Grant Rettke <gcr@wisdomandwonder.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: Nick Dokos <ndokos@gmail.com>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: babel completion notification
Date: Tue, 18 Mar 2014 21:00:47 -0500	[thread overview]
Message-ID: <CAAjq1md_bQsdijVwOxJQYj5+O=vZe7TamFzbGRDNTueFdTqqyg@mail.gmail.com> (raw)
In-Reply-To: <8738ifwpam.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]

The other options are prettier and the hook is more flexible; I had only
cared about
tangling though so I set this:

(defadvice org-babel-tangle (before org-babel-tangle-before activate)
  (message (concat "org-babel-tangle BEFORE: <"
                   (format-time-string "%Y-%m-%dT%T%z")
                   ">")))

(defadvice org-babel-tangle (after org-babel-tangle-after activate)
  (message (concat "org-babel-tangle AFTER: <"
                   (format-time-string "%Y-%m-%dT%T%z")
                   ">")))

For some reason couldn't get around advice working here, it was just never
run.


On Tue, Mar 18, 2014 at 9:32 AM, Eric Schulte <schulte.eric@gmail.com>wrote:

> > However, there is a problem:
> >
> > --8<---------------cut here---------------start------------->8---
> > #+name: notify
> > #+BEGIN_SRC emacs-lisp :results none
> > (shell-command "popup.py DONE")
> > #+END_SRC
> >
> > #+name: long-running
> > #+BEGIN_SRC shell :results output :post notify
> > sleep 5
> > echo DONE
> > #+END_SRC
> >
> > #+RESULTS: long-running
> > : nil
> > --8<---------------cut here---------------end--------------->8---
> >
> > The result seems to be the result of the notify block, not the
> > long-running one.
>
> Yes, that's how post blocks are supposed to work, they're normally used
> to post-process results.  You should add a variable to the post block
> and have it return that variable, e.g.,
>
> #+name: notify
> #+begin_src emacs-lisp :var data=""
> (shell-command "popup.py DONE")
> data
> #+end_src
>
> --
> Eric Schulte
> https://cs.unm.edu/~eschulte
> PGP: 0x614CA05D
>
>


-- 
Grant Rettke | ACM, AMA, COG, IEEE
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

[-- Attachment #2: Type: text/html, Size: 2971 bytes --]

      reply	other threads:[~2014-03-19  2:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-17 20:33 babel completion notification Ken Mankoff
2014-03-17 21:05 ` Eric Schulte
2014-03-17 21:39   ` Ken Mankoff
2014-03-17 22:03     ` Nick Dokos
2014-03-18  1:07       ` Eric Schulte
2014-03-18  2:44         ` Nick Dokos
2014-03-18 14:32           ` Eric Schulte
2014-03-19  2:00             ` Grant Rettke [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAjq1md_bQsdijVwOxJQYj5+O=vZe7TamFzbGRDNTueFdTqqyg@mail.gmail.com' \
    --to=gcr@wisdomandwonder.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    --cc=schulte.eric@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.