Browse Source

DONE name named results if source block is named

Eric Schulte 16 years ago
parent
commit
6dab411a65
2 changed files with 14 additions and 5 deletions
  1. 2 1
      litorgy/litorgy.el
  2. 12 4
      rorg.org

+ 2 - 1
litorgy/litorgy.el

@@ -235,7 +235,8 @@ line.  If no result exists for this block then create a
                             (move-beginning-of-line 1) (looking-at "#\\+resname:"))
                           (progn ;; or we need to back up and make one ourselves
                             (goto-char end) (open-line 2) (forward-char 1)
-                            (insert "#+resname:") (move-beginning-of-line 1) t)))
+                            (insert (concat "#+resname:" (if name (concat " " name))))
+                            (move-beginning-of-line 1) t)))
                (point))))))
 
 (defun litorgy-insert-result (result &optional insert)

+ 12 - 4
rorg.org

@@ -3,10 +3,7 @@
 #+SEQ_TODO:  TODO PROPOSED | DONE DEFERRED REJECTED
 #+STARTUP: oddeven
 
-* Tasks [16/26]
-
-** TODO name named results if source block is named
-currently this isn't happening although it should be
+* Tasks [17/26]
 
 ** TODO command line execution
 Allow source code blocks to be called form the command line.  This
@@ -226,6 +223,17 @@ mean(mean(vec))
     out some lines, and then convert it to litorgy format for
     posterity. Same for a shell session either in a *shell* buffer, or
     pasted from another terminal emulator. And python of course.
+
+** DONE name named results if source block is named
+currently this isn't happening although it should be
+
+#+srcname: test-naming-named-source-blocks
+#+begin_src emacs-lisp 
+:namer
+#+end_src
+
+#+resname: test-naming-named-source-blocks
+: :namer
 ** DONE (simple caching) check for named results before source blocks
 see the TODO comment in [[file:litorgy/litorgy-ref.el::TODO%20This%20should%20explicitly%20look%20for%20resname%20lines%20before][litorgy-ref.el#litorgy-ref-resolve-reference]]
 ** DONE set =:results silent= when eval with prefix argument