From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: [Patch] Unicode support for the MS Windows clipboard Date: Thu, 27 May 2004 10:05:22 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <9681-Thu27May2004100522+0300-eliz@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1085641888 28772 80.91.224.253 (27 May 2004 07:11:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 May 2004 07:11:28 +0000 (UTC) Cc: sds@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu May 27 09:11:19 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BTF2t-0004G2-00 for ; Thu, 27 May 2004 09:11:19 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BTF2t-0007Wh-00 for ; Thu, 27 May 2004 09:11:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BTF0w-0006Iu-PG for emacs-devel@quimby.gnus.org; Thu, 27 May 2004 03:09:18 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BTF0M-0006Hu-R8 for emacs-devel@gnu.org; Thu, 27 May 2004 03:08:43 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BTEzo-0006AR-7U for emacs-devel@gnu.org; Thu, 27 May 2004 03:08:40 -0400 Original-Received: from [192.114.186.23] (helo=aragorn.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BTEzH-00063p-9I; Thu, 27 May 2004 03:07:35 -0400 Original-Received: from zaretski (pns03-196-231.inter.net.il [80.230.196.231]) by aragorn.inter.net.il (MOS 3.4.6-GR) with ESMTP id CYL29631; Thu, 27 May 2004 10:07:12 +0300 (IDT) Original-To: Benjamin Riefenstahl X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: (message from Benjamin Riefenstahl on Wed, 26 May 2004 20:01:22 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:24003 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24003 > From: Benjamin Riefenstahl > Date: Wed, 26 May 2004 20:01:22 +0200 > > As we just had another discussion on this, I sat down and wrote a > preliminary implementation of Unicode support for the MS Windows > clipboard, see attached patch. Thanks! > - Introduce a new variable `w32-clipboard-type' to use with > cut-and-paste instead of the hard-coded CF_TEXT. The default for > `w32-clipboard-type' is CF_TEXT, because CF_UNICODETEXT is not > compatible with 9x/Me, it uses more memory and CF_TEXT was used > before. Couldn't this be done without introducing Windows-specific options? AFAIK, the logic employed by Windows when it encodes clipboard text is quite simple, something like: if it cannot be encoded with the system codepage, use Unicode. Why cannot Emacs simply follow this logic? Also, AFAIK CF_UNICODETEXT _can_ be used on Windows 9x, as any program like clipbrd.exe or ClipConvert will show you. > - Drop optimizations for ASCII-only text. This is mostly because I > couldn't get all combinations straight in my mind, between this, the > `last_clipboard_text' mechanism and CF_UNICODETEXT. Is that optimization indeed an optimization? That is, does it give us any significant speed-up? Can you measure the speed of pasting a large chunk of ASCII text in an Emacs that has this optimization and compare it to the speed of pasting non-ASCII text?