unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>,
	57148@debbugs.gnu.org, 57147@debbugs.gnu.org, larsi@gnus.org,
	alain.cochard@unistra.fr
Subject: bug#57148: bug#57147: bug#57148: 27.2; Problem with kill-new
Date: Sat, 13 Aug 2022 19:54:25 +0800	[thread overview]
Message-ID: <8735e0uzny.fsf@yahoo.com> (raw)
In-Reply-To: <87wnbc5uwr.fsf@localhost> (Ihor Radchenko's message of "Sat, 13 Aug 2022 17:56:20 +0800")

Ihor Radchenko <yantar92@gmail.com> writes:

> I think that's because I accidentally replied to the report before it
> got registered by debbugs.
>
> Anyway, here is the recipe:
>
> 1. Create bug.el with the following contents:
> ----
> (custom-set-variables
>  '(select-enable-clipboard nil)
>  '(select-enable-primary t))
> (defun my/copy-const (beg end)
>   (interactive "r")
>   (setq deactivate-mark t)
>   (kill-new "Constant string"))
> ----
> 2. Create bug.org with the following contents:
> ----
> * headline
> Hidden text inside
> * another headline
> ----
> 3. emacs -Q -l /path/to/bug.el /path/to/bug.org
> 4. S-<TAB>
> 5. Move point to bob, activate mark, and select down to the eob
> 6. M-x my/copy-const
> 7. C-y
>
> Expected: "Constant string" is inserted
> Observed: Selected region is inserted.

This is intended behavior.  Deactivating the mark will always assert
ownership over the primary selection with the contents of the region.

See the doc string of `deactivate-mark' for more details.





  reply	other threads:[~2022-08-13 11:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 23:59 bug#57148: 27.2; Problem with kill-new Alain.Cochard
2022-08-12  0:34 ` bug#57147: " Ihor Radchenko
2022-08-12 15:53   ` bug#57148: " Lars Ingebrigtsen
2022-08-13  1:59     ` bug#57147: " Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13  2:43       ` Alain.Cochard
2022-08-13  6:15         ` bug#57148: " Eli Zaretskii
2022-08-13  9:21           ` Ihor Radchenko
2022-08-13  9:40             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13  9:56               ` Ihor Radchenko
2022-08-13 11:54                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-08-13 12:20                   ` bug#57148: " Ihor Radchenko
2022-08-13 12:28                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 12:32                       ` Lars Ingebrigtsen
2022-08-13 13:13                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-13 14:37                           ` Ihor Radchenko
2022-08-14  1:19                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=8735e0uzny.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=57147@debbugs.gnu.org \
    --cc=57148@debbugs.gnu.org \
    --cc=alain.cochard@unistra.fr \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=yantar92@gmail.com \
    /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).