mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 05:32:51 +00:00
lisp/org.el (org-copy-visible): Fix when using overlays for folding
This commit is contained in:
parent
83bc81b750
commit
844bd9f1f1
17
lisp/org.el
17
lisp/org.el
|
@ -17716,18 +17716,11 @@ this numeric value."
|
|||
(interactive "r")
|
||||
(let ((result ""))
|
||||
(while (/= beg end)
|
||||
(if (eq org-fold-core-style 'text-properties)
|
||||
(progn
|
||||
(while (org-invisible-p beg)
|
||||
(setq beg (org-fold-next-visibility-change beg end)))
|
||||
(let ((next (org-fold-next-visibility-change beg end)))
|
||||
(setq result (concat result (buffer-substring beg next)))
|
||||
(setq beg next)))
|
||||
(when (invisible-p beg)
|
||||
(setq beg (next-single-char-property-change beg 'invisible nil end)))
|
||||
(let ((next (next-single-char-property-change beg 'invisible nil end)))
|
||||
(setq result (concat result (buffer-substring beg next)))
|
||||
(setq beg next))))
|
||||
(while (org-invisible-p beg)
|
||||
(setq beg (org-fold-next-visibility-change beg end)))
|
||||
(let ((next (org-fold-next-visibility-change beg end)))
|
||||
(setq result (concat result (buffer-substring beg next)))
|
||||
(setq beg next)))
|
||||
;; Prevent Emacs from adding full selected text to `kill-ring'
|
||||
;; when `select-enable-primary' is non-nil. This special value of
|
||||
;; `deactivate-mark' only works since Emacs 29.
|
||||
|
|
Loading…
Reference in a new issue