Skip to content

Commit

Permalink
Get info of current session
Browse files Browse the repository at this point in the history
  • Loading branch information
ljos committed May 31, 2015
1 parent 238651c commit 548986d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/test-ob-prolog.el
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@
(error nil))
(org-babel-goto-named-src-block ,(symbol-name name))
(save-excursion
(ignore-errors
(org-babel-previous-src-block)
(end-of-line)
(ignore-errors ;; if there is no previous src block.
(let* ((info (nth 2 (org-babel-get-src-block-info)))
(session (cdr (assq :session info)))
(bound (point)))
(bound (progn
(org-babel-previous-src-block)
(end-of-line)
(point))))
(setq ,active-session
(unless (string= "none" session)
session))
(goto-char (point-min))
(while (search-forward (concat ":session " session) bound t)
(while (search-forward
(concat ":session " session) bound t)
(org-babel-execute-src-block)))))
(save-restriction ,@body)))
(unless ,visited-p
Expand Down

0 comments on commit 548986d

Please sign in to comment.