[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: org-copy-visible does not work with x-select-enable-primary
From: |
Stefan Monnier |
Subject: |
Re: org-copy-visible does not work with x-select-enable-primary |
Date: |
Mon, 10 Sep 2018 13:00:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (setq x-select-enable-primary t)
>
> In that case, for me, 'C-y' yanks both lines, instead of only
> 'foo...'.
AFAICT there's also the problem that after `C-x C-c v` the region is
still active. Those two problems are actually related and seem to be
fixed with the patch below.
Stefan
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 21d9cd8785..dbd81b0aeb 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -20666,6 +20666,7 @@ org-copy-visible
(let ((next (next-single-char-property-change beg 'invisible nil end)))
(setq result (concat result (buffer-substring beg next)))
(setq beg next)))
+ (setq deactivate-mark t)
(kill-new result)))
(defun org-copy-special ()