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: Tue, 30 Mar 2010 19:07:59 +0300 Organization: JURTA Message-ID: <878w9akv49.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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1269966053 30991 80.91.229.12 (30 Mar 2010 16:20:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 16:20:53 +0000 (UTC) Cc: Emacs development discussions To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 30 18:20:49 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 1NweBM-0007mJ-He for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 18:20:48 +0200 Original-Received: from localhost ([127.0.0.1]:40639 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NweBL-0006FP-M3 for ged-emacs-devel@m.gmane.org; Tue, 30 Mar 2010 12:20:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NweBE-0006Dw-Jd for emacs-devel@gnu.org; Tue, 30 Mar 2010 12:20:40 -0400 Original-Received: from [140.186.70.92] (port=53659 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NweBB-00069E-Qg for emacs-devel@gnu.org; Tue, 30 Mar 2010 12:20:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NweBA-0002Ij-Gf for emacs-devel@gnu.org; Tue, 30 Mar 2010 12:20:37 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:48434 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NweBA-0002IR-BJ for emacs-devel@gnu.org; Tue, 30 Mar 2010 12:20:36 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.68.10.cable.starman.ee [82.131.68.10]) by mx1.starman.ee (Postfix) with ESMTP id C4F6E3F4077; Tue, 30 Mar 2010 19:20:29 +0300 (EEST) In-Reply-To: (Stefan Monnier's message of "Sat, 27 Mar 2010 16:37:21 -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:122920 Archived-At: >>>> + ((eq completions-format 'line) >>>> + ;; One-line format >>>> + (setq str (query-replace-descr str))) >>> But this will not just change the string displayed, but also the string >>> inserted by the yank. We need to distinguish the two. >> Maybe to put the `display' property with the value "^J" on newlines? > > That would only work if this property is removed when the string in > subsequently inserted. 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. -- Juri Linkov http://www.jurta.org/emacs/