> On Apr 6, 2018, at 4:59 PM, Thomas S. Dye <t...@tsdye.com> >
[Tom's response covering the main issues deleted]
> Lawrence Bottorff writes:
>> I guess I need more information. For example, what is C-c
>> >> C-v v
>> exactly? Then C-x C-e? And M-x (symbol-function >>
`C-h k' is really your friend here. If you do not know it,
try typing it
twice `C-h k C-h k'.
As for the specific keystrokes mentioned above:
,----[ C-h k C-c C-v v ]
| C-c C-v v runs the command org-babel-expand-src-block
| org-mode-map), which is an interactive autoloaded compiled
| function in ‘ob-core.el’.
| It is bound to C-c C-v v, C-c C-v C-v.
| (org-babel-expand-src-block &optional ARG INFO PARAMS)
| Expand the current source code block.
| Expand according to the source code block’s header
| arguments and pop open the results in a preview buffer.
In your case, it shows that the `mtelsquare' src block
| (let ((x (quote 0)))
| (defun myelsquare (x)
| (* x x))
,----[ C-h k C-x C-e ]
| C-x C-e runs the command eval-last-sexp (found in
| is an interactive compiled Lisp function in
| It is bound to C-x C-e.
| (eval-last-sexp EVAL-LAST-SEXP-ARG-INTERNAL)
| Evaluate sexp before point; print value in the echo area.
| Interactively, with prefix argument, print output into
| Normally, this function truncates long output according to
| of the variables ‘eval-expression-print-length’ and
| ‘eval-expression-print-level’. With a prefix argument of
| however, there is no such truncation. Such a prefix
| also causes integers to be printed in several additional
| (octal, hexadecimal, and character).
| If ‘eval-expression-debug-on-error’ is non-nil, which is
| this command arranges for all errors to enter the debugger.
So with point at the end of the preview buffer for myelsquare
one `let' expression it it) it has the same effect as running
`eval-buffer'. viz, the elisp function `myelsquare' is
If you have gotten this far, there is an lisp function called
and the `symbol-function' expression will return its value
`eval'ed. I misspoke before. I should have said
M-: (symbol-function 'myelsquare) RET
And that value is `(lambda (x) (* x x))'. Which simply shows
defun'ed a function and what it is.
Once you have an elisp function, the natural way to call it
One thing you can do with LOB blocks is use them in header
args of src
blocks just as you would use calls to ordinary src blocks.