1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-10-18 02:19:46 +00:00

Merge branch 'bugfix'

This commit is contained in:
Ihor Radchenko 2024-10-12 10:49:43 +02:00
commit 76cd7e995a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -20653,11 +20653,15 @@ strictly within a source block, use appropriate comment syntax."
end))) end)))
;; Translate region boundaries for the Org buffer to the source ;; Translate region boundaries for the Org buffer to the source
;; buffer. ;; buffer.
(let ((offset (- end beg))) (let (src-end)
(save-excursion
(goto-char end)
(org-babel-do-in-edit-buffer
(setq src-end (point))))
(save-excursion (save-excursion
(goto-char beg) (goto-char beg)
(org-babel-do-in-edit-buffer (org-babel-do-in-edit-buffer
(comment-or-uncomment-region (point) (+ offset (point)))))) (comment-or-uncomment-region (point) src-end))))
(save-restriction (save-restriction
;; Restrict region ;; Restrict region
(narrow-to-region (save-excursion (goto-char beg) (narrow-to-region (save-excursion (goto-char beg)