all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: Re: kill-new may replace the wrong item
Date: Wed, 2 Jun 2010 22:33:28 +0100	[thread overview]
Message-ID: <AANLkTikKmz3YmVrzlwDAP0PJPbDnG7QA2vnhCxzk0EHk@mail.gmail.com> (raw)
In-Reply-To: <87y6exp5zi.fsf@mail.jurta.org>

On 2 June 2010 20:53, Juri Linkov <juri@jurta.org> wrote:
> Do you think `kill-do-not-save-duplicates' should take into account
> clipboard strings too and don't allow duplicates from clipboard?
> Maybe.  But should the same logic apply to the menu items of yank-menu?
> Should `menu-bar-update-yank-menu' use the value of `(car kill-ring)'
> that was *before* pushing clipboard into kill-ring, but the value of
> `replace' that is *after* pushing clipboard into kill-ring and
> comparing it with the new value of `(car kill-ring)'?

All I am trying to point out is there's something incorrect there.
When it detects the CAR is the same as the 'STRING' arg, there's
enough information to do something about it already, i.e.:

   (when (and kill-do-not-save-duplicates
              (equal string (car kill-ring)))
-    (setq replace t))
+    (pop kill-ring))
   (if (fboundp 'menu-bar-update-yank-menu)
       (menu-bar-update-yank-menu string (and replace (car kill-ring))))
   (when save-interprogram-paste-before-kill

is the old way of setting REPLACE to T is for the convenience of
menu-bar-update-yank-menu?

> --
> Juri Linkov
> http://www.jurta.org/emacs/

Leo



  reply	other threads:[~2010-06-02 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 21:32 kill-new may replace the wrong item Leo
2010-06-01 19:58 ` Juri Linkov
2010-06-02  3:10   ` Leo
2010-06-02  3:36     ` Leo
2010-06-02 19:53       ` Juri Linkov
2010-06-02 21:33         ` Leo [this message]
2010-06-03 19:17           ` Juri Linkov
2010-06-03 23:31             ` Leo

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=AANLkTikKmz3YmVrzlwDAP0PJPbDnG7QA2vnhCxzk0EHk@mail.gmail.com \
    --to=sdl.web@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.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.