help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Annoying kill-ring behavior


From: Joost Kremers
Subject: Re: Annoying kill-ring behavior
Date: 4 Apr 2014 04:34:25 GMT
User-agent: slrn/pre1.0.0-18 (Linux)

Smith_RS wrote:
> On Thursday, April 3, 2014 9:52:17 AM UTC-7, Smith_RS wrote:
>> When I try to update the kill-ring "by hand" I find that when I try to 
>> access yank-menu it is no longer in sync with the kill-ring.
>> 
>> How do I fix that? The code in menu-bar.el doesn't really explain how it's 
>> kept in sync. What am I missing? Is there a hook somewhere?
>
> Never mind, I figured it out.

Did you check the doc string of `kill-ring'? There, you'll find the
warning not to use that variable directly. There are functions to update
the kill ring that you should use instead:

,----
| List of killed text sequences.
| Since the kill ring is supposed to interact nicely with cut-and-paste
| facilities offered by window systems, use of this variable should
| interact nicely with `interprogram-cut-function' and
| `interprogram-paste-function'.  The functions `kill-new',
| `kill-append', and `current-kill' are supposed to implement this
| interaction; you may want to use them instead of manipulating the kill
| ring directly.
`----

And although it doesn't say so, looking at the source shows that
the yank menu is also updated.

HTH


-- 
Joost Kremers                                   joostkremers@fastmail.fm
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]