"Charles C. Berry" <[email protected]> writes:
> I attach 3 patches and a file of usage examples.
Thanks.
> + (let* ((el (org-element-context))
> + (beg (org-element-property :begin el))
> + (type (org-element-type el)))
> + (when (eq type 'inline-babel-call)
> + (goto-char beg)))
Nitpick: this looks like a lot of bindings for a dubious readability
improvement. What about:
(let ((datum (org-element-context)))
(when (eq (org-element-type datum) 'inline-babel-call)
(goto-char (org-element-property :begin datum))))
> + (bad-inline-p
> + (when inlinep
> + (or
> + (and (member "table" result-params) "`:results table'")
> + (and (listp result) "list result")
> + (and (string-match-p "\n." result) "multiline result")
`string-match-p' => `org-string-match-p'
> (cond
> ;; do nothing for an empty result
> ((null result))
> + ;; illegal inline result or params
Capital and final dot.
> + (when inlinep
> + (goto-char inlinep)
> + (setq result) (org-macro-escape-arguments result))
(setq result (org-macro-escape-arguments result))
> + (bad-inline-p) ;; do nothing
Single semicolon for end-of-line comments, and capital+final dot.
> +(defun org-babel-remove-inline-result ()
> + "Remove the result of the current inline-src-block or babel call.
> +The result must be wrapped in a `results' macro to be
> + removed. Extraneous leading whitespace is trimmed."
> + (let* ((el (org-element-context))
> + (post-blank (org-element-property :post-blank el)))
> + (when (memq (org-element-type el) '(inline-src-block inline-babel-call))
> + (org-with-wide-buffer
> + (goto-char (org-element-property :end el))
> + (let ((el (org-element-context)))
^^^
spurious space
This looks good. I think you can push them into master once the minor
issues above are fixed and if all tests pass.
Regards,
--
Nicolas Goaziou