mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-24 01:18:56 +00:00
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.
This commit is contained in:
parent
0bd9981e0d
commit
1234afcc54
|
@ -1018,8 +1018,11 @@ portions of results lines."
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(if (re-search-forward org-babel-result-regexp nil t)
|
(if (re-search-forward org-babel-result-regexp nil t)
|
||||||
(let ((start (progn (beginning-of-line 2) (- (point) 1)))
|
(let ((start (progn (beginning-of-line 2) (- (point) 1)))
|
||||||
(end (progn (goto-char (- (org-babel-result-end) 1)) (point)))
|
(end (progn
|
||||||
ov)
|
(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)
|
(if (memq t (mapcar (lambda (overlay)
|
||||||
(eq (overlay-get overlay 'invisible)
|
(eq (overlay-get overlay 'invisible)
|
||||||
'org-babel-hide-result))
|
'org-babel-hide-result))
|
||||||
|
|
Loading…
Reference in a new issue