From: Constantine Kharlamov <Hi-Angel@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27442@debbugs.gnu.org
Subject: bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional
Date: Wed, 21 Jun 2017 22:55:58 +0300 [thread overview]
Message-ID: <9b98217a-be79-56ed-16a9-0c15622111c5@yandex.ru> (raw)
In-Reply-To: <83r2ydupg7.fsf@gnu.org>
On 21.06.2017 22:10, Eli Zaretskii wrote:
>> From: Constantine Kharlamov <Hi-Angel@yandex.ru>
>> Date: Wed, 21 Jun 2017 17:29:40 +0300
>>
>> x-clipboard-yank always uses clipboard content, which is exactly what I need. I.e. if I set (setq select-enable-clipboard nil) to not clutter my clipboard with kills, I only get content from the clipboard. (don't get me wrong, kill-ring is very cool, and I extensively use it in evil-mode. But I prefer to explicitly point when I want a content in the clipboard, which happens an order of magnitude rarer than usage of kill-ring).
>>
>> clipboard-yank uses a kill-ring instead.
>
> I see the same call to 'yank' in both clipboard-yank and
> x-clipboard-yank, so I'm not sure I understand what difference in
> behavior you see (you also didn't say which version of Emacs did you
> use).
Sorry. It's 26.0.50, Archlinux, emacs-gitᴬᵁᴿ. However the first time I saw the problem at least 1.5 year ago on Ubuntu. It's just that I never reported, but today I started worrying.
> Can you show a reproducible recipe starting from "emacs -Q"
> which could be used to see the problem?
>
> Thanks.
Well, for collecting the steps turned out `(clipboard-yank)` might have another subtle bug. But what I said still holds. Steps:
1. start `emacs -Q`
2. Press M-: to execute `(setq select-enable-clipboard nil)`
3. Copy a text in the system, i.e. outside of Emacs.
4. Press M-: to execute `(clipboard-yank)` (you'll get at the point a content from system clipboard)
5. Press M-< M-d (so now you have the word ";; This" in kill-ring)
6. Press M-: to execute `(clipboard-yank)`
You will see ";; This" got pasted at point, not the value in the system clipboard.
7. Press M-: to execute `(x-clipboard-yank)`
You will see content from the system clipboard got pasted at point.
The subtle bug I just found is an inconsistent behavior: if you skip the 4-th step, then at 6-th step you'll see the content from system clipboard. Which is actually what I'd want (i.e. the system clipboard content, not the inconsistent behavior, of course), but in long-term usage it pastes from kill-ring.
next prev parent reply other threads:[~2017-06-21 19:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 14:29 bug#27442: Un-obsolete x-clipboard-yank, or provide analogous functional Constantine Kharlamov
2017-06-21 19:10 ` Eli Zaretskii
2017-06-21 19:55 ` Constantine Kharlamov [this message]
2021-07-05 14:13 ` Lars Ingebrigtsen
2021-07-05 14:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-05 15:28 ` Lars Ingebrigtsen
2021-07-05 15:59 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-05 16:55 ` Eli Zaretskii
2021-07-05 20:11 ` Lars Ingebrigtsen
2021-07-05 20:24 ` Lars Ingebrigtsen
2021-07-06 11:21 ` Eli Zaretskii
2021-07-06 14:18 ` Lars Ingebrigtsen
2021-07-06 15:45 ` Eli Zaretskii
2021-07-06 16:20 ` Lars Ingebrigtsen
2021-07-06 17:15 ` Eli Zaretskii
2021-07-06 17:26 ` Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b98217a-be79-56ed-16a9-0c15622111c5@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=27442@debbugs.gnu.org \
--cc=eliz@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.