[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Ope
From: |
tomas |
Subject: |
Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region) |
Date: |
Thu, 19 May 2016 10:38:35 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, May 18, 2016 at 05:53:51PM +0200, Karl Voit wrote:
> * <tomas@tuxteam.de> <tomas@tuxteam.de> wrote:
[...]
> I once set this to 'utf-8 in my init.el. The Emacs help further
> suggests setting it to 'utf-16le-dos instead when running on
> Windows. With switching to this setting, the clipboard gets yanked
> properly! :-)
That's interesting, since Eli says it shouldn't be necessary on
Windows (and he sure knows a hell of a lot more about Emacs than
I do, and much more so specifically about Emacs on windows).
That'd mean that your Emacs is confused somehow, but why?
[...]
> Can you still show me how I yank and operate (string-replace) only
> on the yanked text?
I don't know exactly what you want to achieve (manual operation, or
ultimately some automatism?), but you might start here:
- after a (normal) yank, the last mark is at the start of the
yanked text and point at its end (but mark is not active).
So if you activate it, e.g. by
M-x eval-expression RET (activate-mark) RET
you get the just yanked stuff "selected". You'll have to
wrap some of that into commands to make it practical, though.
Season to taste.
- there isn't, AFAIK, a hook hanging off the yank event itself
(a pity, IMHO), but if you somehow manage to attach the text
property named 'yank-handler (having as value a function +
arg provided by you), then this function gets the chance to
do its thing just after yanking.
Search for "yank-handler" in the Emacs Lisp manual. I'm a
bit pressed now, but if you nudge me I'd be willing to whip
up an example.
regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlc9e4sACgkQBcgs9XrR2kYZOwCfQpAsCcNfDAh7YXGXMTAJIJMo
0c4AnRE/GyKY0fCri6uoQhQS+OcUNa/a
=6S6s
-----END PGP SIGNATURE-----
- Operating on yanked region, Karl Voit, 2016/05/18
- Re: Operating on yanked region, Yuri Khan, 2016/05/18
- Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Karl Voit, 2016/05/18
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), tomas, 2016/05/18
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Karl Voit, 2016/05/18
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Eli Zaretskii, 2016/05/18
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Karl Voit, 2016/05/18
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Eli Zaretskii, 2016/05/19
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region),
tomas <=
- Re: Emacs 24.5.1 has wrong charset on yanked text with Windows (was: Operating on yanked region), Yuri Khan, 2016/05/18
Re: Operating on yanked region, Eli Zaretskii, 2016/05/18
Re: Operating on yanked region, Eli Zaretskii, 2016/05/18