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: PRIMARY selection doesn't work Date: Sat, 04 May 2002 10:31:53 +0300 Sender: emacs-devel-admin@gnu.org Message-ID: <8962-Sat04May2002103152+0300-eliz@is.elta.co.il> References: <200204201749.NAA01838@sbcs.cs.sunysb.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1020497779 31514 127.0.0.1 (4 May 2002 07:36:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 4 May 2002 07:36:19 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 173u5b-0008CB-00 for ; Sat, 04 May 2002 09:36:19 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 173uBe-0000qe-00 for ; Sat, 04 May 2002 09:42:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 173u5N-00046u-00; Sat, 04 May 2002 03:36:05 -0400 Original-Received: from heimdall.inter.net.il ([192.114.186.17]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 173u2X-0003nx-00 for ; Sat, 04 May 2002 03:33:09 -0400 Original-Received: from Zaretsky ([80.230.2.40]) by heimdall.inter.net.il (Mirapoint Messaging Server MOS 3.1.0.54-GA) with ESMTP id BJN50408; Sat, 4 May 2002 10:33:07 +0300 (IDT) Original-To: kifer@cs.sunysb.edu X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 In-Reply-To: <200204201749.NAA01838@sbcs.cs.sunysb.edu> (kifer@cs.sunysb.edu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3572 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3572 > From: kifer@cs.sunysb.edu (Michael Kifer) > Date: Sat, 20 Apr 2002 13:49:27 -0400 > > EZ> Do you see any change in behavior if you change the value of > EZ> selection-coding-system? For example, what happens if you type > EZ> "C-x RET x latin-1 RET" and then mark a region of pure ASCII > EZ> characters and type "M-w"--can you paste that text into other > EZ> applications? Please also try with "C-x RET x compound-text RET". > > Absolutely -- it starts working! > Both latin-1 and compound-text work. Please see if the patch below solves the problem if you revert selection-coding-system to compound-text-with-extensions. Please try that both with pure ASCII text and some non-ASCII text in the selection. TIA Index: src/xselect.c =================================================================== RCS file: /cvs/emacs/src/xselect.c,v retrieving revision 1.113 diff -c -p -r1.113 xselect.c *** src/xselect.c 4 Mar 2002 23:40:59 -0000 1.113 --- src/xselect.c 4 May 2002 07:29:54 -0000 *************** lisp_data_to_selection_data (display, ob *** 1765,1775 **** *data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, (int *) size_ret, &stringp); *nofree_ret = (*data_ret == XSTRING (obj)->data); ! if (EQ (Vnext_selection_coding_system, ! Qcompound_text_with_extensions)) ! type = QCOMPOUND_TEXT; ! else if (NILP (type)) ! type = (stringp ? QSTRING : QCOMPOUND_TEXT); Vlast_coding_system_used = (*nofree_ret ? Qraw_text : Vnext_selection_coding_system); --- 1765,1780 ---- *data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, (int *) size_ret, &stringp); *nofree_ret = (*data_ret == XSTRING (obj)->data); ! if (NILP (type)) ! { ! if (stringp && *nofree_ret) ! type = QSTRING; ! else if (EQ (Vnext_selection_coding_system, ! Qcompound_text_with_extensions)) ! type = QCOMPOUND_TEXT; ! else ! type = (stringp ? QSTRING : QCOMPOUND_TEXT); ! } Vlast_coding_system_used = (*nofree_ret ? Qraw_text : Vnext_selection_coding_system);