diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2013-04-26 09:37:25 -0600 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2013-04-26 09:38:33 -0600 |
commit | f285b7ed3d097dd1cbb55fa3c31bc92aa0149054 (patch) | |
tree | 695b50bcbe5a6489c8359f9ee4e2209c4a76f24d | |
parent | cb62841e06c6c8dbecd9a3366c8c0ff9e79fe855 (diff) | |
download | org-mode-f285b7ed3d097dd1cbb55fa3c31bc92aa0149054.tar.gz |
Defcustom controlling the wrapping of inline results
* lisp/ob-core.el (org-babel-inline-result-wrap): Defcustom controlling
the wrapping of inline results.
(org-babel-examplize-region): Use new defcustom controlling the
wrapping of inline results.
-rw-r--r-- | lisp/ob-core.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 9baff0c..8c1f09a 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -152,6 +152,12 @@ See also `org-babel-noweb-wrap-start'." :group 'org-babel :type 'string) +(defcustom org-babel-inline-result-wrap "=%s=" + "Format string used to wrap inline results. +This string must include a \"%s\" which will be replaced by the results." + :group 'org-babel + :type 'string) + (defun org-babel-noweb-wrap (&optional regexp) (concat org-babel-noweb-wrap-start (or regexp "\\([^ \t\n].+?[^ \t]\\|[^ \t\n]\\)") @@ -2169,8 +2175,9 @@ file's directory then expand relative links." (funcall chars-between end (save-excursion (goto-char end) (point-at-eol)))) (save-excursion (goto-char beg) - (insert (format "=%s=" (prog1 (buffer-substring beg end) - (delete-region beg end))))) + (insert (format org-babel-inline-result-wrap + (prog1 (buffer-substring beg end) + (delete-region beg end))))) (let ((size (count-lines beg end))) (save-excursion (cond ((= size 0)) ; do nothing for an empty result |