From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: kill-ring visualization Date: Wed, 31 Mar 2010 18:04:35 +0300 Organization: JURTA Message-ID: <87zl1o3et0.fsf@mail.jurta.org> References: <87y6hib6vi.fsf@mail.jurta.org> <87aatwv12t.fsf@mail.jurta.org> <87aatvogu3.fsf@mail.jurta.org> <87hbo2jmux.fsf@mail.jurta.org> <878w9akv49.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270049336 15994 80.91.229.12 (31 Mar 2010 15:28:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 31 Mar 2010 15:28:56 +0000 (UTC) Cc: Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 31 17:28:48 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NwzqZ-0004eq-3y for ged-emacs-devel@m.gmane.org; Wed, 31 Mar 2010 17:28:47 +0200 Original-Received: from localhost ([127.0.0.1]:53444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwzh3-0001w3-US for ged-emacs-devel@m.gmane.org; Wed, 31 Mar 2010 11:18:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwzaE-00080j-G1 for emacs-devel@gnu.org; Wed, 31 Mar 2010 11:11:54 -0400 Original-Received: from [140.186.70.92] (port=32894 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwzaC-0007ya-1z for emacs-devel@gnu.org; Wed, 31 Mar 2010 11:11:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwza5-0001PF-10 for emacs-devel@gnu.org; Wed, 31 Mar 2010 11:11:46 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:54887 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwza4-0001Ou-Px for emacs-devel@gnu.org; Wed, 31 Mar 2010 11:11:44 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.54.39.cable.starman.ee [82.131.54.39]) by mx1.starman.ee (Postfix) with ESMTP id C4F863F40B5; Wed, 31 Mar 2010 18:11:35 +0300 (EEST) In-Reply-To: (Stefan Monnier's message of "Tue, 30 Mar 2010 16:35:01 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:122976 Archived-At: >> In the patch I sent earlier, yank-pop doesn't insert the string selected >> from the *Completions* buffer. It searches for selected completion string >> in the kill-ring (using `member' that ignores the `display' property), >> gets its position in the kill-ring, and calls `yank' with this position >> as a numeric index. > > Yes, I noticed it, and the problem is that my yank happens to be advised > and that breaks it (because the advice occasionally adds elements to > the kill-ring). > > So, while I also started with such an approach, I ended up going the > more straightforward route of inserting the actual selected text, since > it's more reliable. `yank' and `yank-pop' use `current-kill' to rotate the yanking pointer in the kill ring. But maybe `yank-browse' should have its own yanking pointer? For instance, with the kill ring having the value: '("string1" "foo" "string2" "bar" "string3") this scenario would be useful: M-y str RET ;; the user types a substring "str" in the minibuffer ;; and RET inserts "string1" to the current buffer M-y ;; reinserts "string2" to the current buffer M-y ;; reinserts "string3" to the current buffer M-y ;; reinserts "string1" to the current buffer -- Juri Linkov http://www.jurta.org/emacs/