unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Carsten Dominik <carsten@orgmode.org>
Subject: Re: org-copy-visible does not work with x-select-enable-primary
Date: Mon, 10 Sep 2018 13:00:24 -0400	[thread overview]
Message-ID: <jwva7opb87f.fsf-monnier+gmane.emacs.devel@gnu.org> (raw)
In-Reply-To: 23446.24671.697405.158351@frac.u-strasbg.fr

> (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 ()





      parent reply	other threads:[~2018-09-10 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 12:15 org-copy-visible does not work with x-select-enable-primary Alain.Cochard
2018-09-10 14:49 ` Eli Zaretskii
2018-09-10 15:20   ` Alain.Cochard
2018-09-10 17:27     ` Eli Zaretskii
2018-09-10 17:00 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwva7opb87f.fsf-monnier+gmane.emacs.devel@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=carsten@orgmode.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).