diff options
author | Eric Schulte <schulte.eric@gmail.com> | 2011-11-22 08:05:34 -0700 |
---|---|---|
committer | Eric Schulte <schulte.eric@gmail.com> | 2011-11-22 08:05:34 -0700 |
commit | 1234afcc54fd029d06b4c5642374b3be784651ee (patch) | |
tree | d2e007aae5a316fdaf27c31c0d50ba90c27b0344 | |
parent | 0bd9981e0d9ed64ff1426698692d15b9c8a1d439 (diff) | |
download | org-mode-1234afcc54fd029d06b4c5642374b3be784651ee.tar.gz |
correctly toggle visibility of named code blocks
* lisp/ob.el (org-babel-hide-result-toggle): Skip over header argument
lines when toggling named code block visibility.
-rw-r--r-- | lisp/ob.el | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1018,8 +1018,11 @@ portions of results lines." (beginning-of-line) (if (re-search-forward org-babel-result-regexp nil t) (let ((start (progn (beginning-of-line 2) (- (point) 1))) - (end (progn (goto-char (- (org-babel-result-end) 1)) (point))) - ov) + (end (progn + (while (looking-at org-babel-multi-line-header-regexp) + (forward-line 1)) + (goto-char (- (org-babel-result-end) 1)) (point))) + ov) (if (memq t (mapcar (lambda (overlay) (eq (overlay-get overlay 'invisible) 'org-babel-hide-result)) |