From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: evaluation context in call statements
Date: Tue, 25 Jun 2013 21:53:49 +0200 [thread overview]
Message-ID: <874ncm55ma.fsf@Rainer.invalid> (raw)
In-Reply-To: 878v1y574d.fsf@Rainer.invalid
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
Achim Gratz writes:
> Rick Frankel writes:
Your lucky day is becoming a streak.
> Executing Call#2 will update the #+RESULTS for Call#1 (or actually the
> first matching #+RESULTS cookie in the whole document). I'd think it
> should also start looking for the results line from the point of call.
> I don't really get why it does this, maybe Eric knows where to look.
I'd think this should fix it.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ob-core-insert-results-at-the-point-of-call.patch --]
[-- Type: text/x-patch, Size: 1775 bytes --]
From 945d7d25a63077bae18c656768939f292b52bb44 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
Date: Tue, 25 Jun 2013 21:51:07 +0200
Subject: [PATCH] ob-core: insert results at the point of call
* lisp/ob-core.el (org-babel-execute-src-block): Ensure that head is
set to location of call if it is known. Pass through head to
`org-babel-find-named-result' so that it doesn't search from the
beginning of the file.
---
lisp/ob-core.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 4115912..36f42e1 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -662,8 +662,8 @@ (defun org-babel-execute-src-block (&optional arg info params)
(when (cdr (assoc :file params))
(setq result-params
(remove "file" result-params)))))
- (org-babel-insert-result
- result result-params info new-hash indent lang))
+ (org-babel-insert-result
+ result result-params info new-hash indent lang))
(run-hooks 'org-babel-after-execute-hook)
result)
(setq call-process-region
@@ -1839,7 +1839,11 @@ (defun org-babel-where-is-src-block-result (&optional insert info hash indent)
;; - return t if it is found, else return nil
;; - if it does not need to be rebuilt, then don't set end
;; - if it does need to be rebuilt then do set end
- name (setq beg (org-babel-find-named-result name))
+ name (setq beg (org-babel-find-named-result
+ name
+ (or org-babel-current-src-block-location
+ (nth 6 info)
+ (org-babel-where-is-src-block-head))))
(prog1 beg
(when (and hash (not (string= hash (match-string 5))))
(goto-char beg) (setq end beg) ;; beginning of result
--
1.8.3.1
[-- Attachment #3: Type: text/plain, Size: 187 bytes --]
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
next prev parent reply other threads:[~2013-06-25 19:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-25 17:34 evaluation context in call statements Rick Frankel
2013-06-25 19:21 ` Achim Gratz
2013-06-25 19:53 ` Achim Gratz [this message]
2013-06-25 20:06 ` Achim Gratz
2013-06-25 20:07 ` Michael Brand
2013-06-25 20:20 ` Achim Gratz
2013-06-25 20:55 ` Achim Gratz
2013-06-25 22:41 ` Eric Schulte
2013-06-26 6:29 ` Achim Gratz
2013-06-26 14:38 ` Rick Frankel
2013-06-26 15:13 ` Nicolas Goaziou
2013-06-26 15:29 ` Rick Frankel
2013-06-26 15:49 ` Eric Schulte
2013-06-26 15:06 ` Eric Schulte
2013-06-27 4:55 ` Achim Gratz
2013-06-27 6:22 ` Andreas Leha
2013-06-27 14:27 ` Achim Gratz
2013-06-27 23:12 ` Andreas Leha
2013-06-30 22:24 ` Eric Schulte
2013-07-01 10:23 ` Michael Brand
2013-07-01 13:11 ` Eric Schulte
2013-07-01 13:52 ` Michael Brand
2013-07-01 14:10 ` Eric Schulte
2013-06-26 8:38 ` Michael Brand
2013-06-26 14:54 ` Eric Schulte
2013-06-26 16:53 ` Michael Brand
2013-06-26 17:11 ` Eric Schulte
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=874ncm55ma.fsf@Rainer.invalid \
--to=stromeko@nexgo.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).