[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clean mess encrusted on to Chinese pastes cut from outside emacs
From: |
Dan Jacobson |
Subject: |
Re: clean mess encrusted on to Chinese pastes cut from outside emacs |
Date: |
02 Jul 2001 10:05:21 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Eli" == Eli Zaretskii <eliz@is.elta.co.il> writes:
>> From: Dan Jacobson <jidanni@kimo.FiXcomTHiS.tw>
>> Newsgroups: gnu.emacs.bug
>> Date: 22 Jun 2001 16:53:19 +0800
>>
>> (defun dan-cleancrap-encrusted-onto-big5-chinese-pastes ()
>> "Cleanup mess encrusted onto Chinese characters when pasting items cut
>> from outside of emacs... wonder why there is such mess? This version
>> tested 1 whole minute. Should I really use \\\\t?"
>> (interactive)
>> (query-replace-regexp
>> "\e%/2\200\211BIG5-0\C-b\200\211BIG5-0\C-b\\([^ \\t]+\\)\e(B" "\\1" nil))
Eli> What is your selection-coding-system set to, and what was the
chinese-big5
Eli> application which put the text into the X selection? (Some
Netscape 4.76, rxvt, pydict, indeed any other application than emacs.
Eli> applications are known to produce wrong encoding of the text they put
Eli> into the X selections; Emacs cannot do much about that.)
The only problem I have is pasting into emacs items cut outside
emacs. All other combinations and directions are ok, including
cutting from within emacs then pasting outside of emacs. Also the
other programs can cut and paste amongst themselves fine.
By the way, I did (describe-variable (quote selection-coding-system))
and the help page didn't mention what file it was defined in... odd.
No wonder, in mule.el all there is is (setq selection-coding-system
coding-system))
no defvar... hmmm
By the way, doing C-x return X tab tab tab shows lots of choices, many
of which must certainly be aliases, but the user is given no hint
about that on this page, so might spend lots of time picking different
choices, when infact they are actually the same. [He might not know
about describe-coding-system.]
By the way
selection-coding-system's Documentation:
>Coding system for communicating with other X clients.
>When sending or receiving text via cut_buffer, selection, and clipboard,
>the text is encoded or decoded by this coding system.
maybe sometimes the user would need to set different values for
sending and receiving... perhaps add such a flexibility.
[I don't know how to check the value of selection-coding-system for
Netscape or rxvt, all I know is there is no problem between them.]
--
http://www.geocities.com/jidanni Tel+886-4-25854780 e-mail:restore .com.