* Re: [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] [not found] <E1DgXAu-0006aF-PF@fencepost.gnu.org> @ 2005-06-10 1:53 ` Kenichi Handa 2005-06-10 5:12 ` jhd 0 siblings, 1 reply; 5+ messages in thread From: Kenichi Handa @ 2005-06-10 1:53 UTC (permalink / raw) Cc: id.brep In article <E1DgXAu-0006aF-PF@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes: > ------- Start of forwarded message ------- > Date: Thu, 9 Jun 2005 00:57:06 +0800 > From: Zhang Wei <id.brep@gmail.com> > To: emacs-pretest-bug@gnu.org > Subject: x-clipboard-yank doesn't decode utf-8 string [...] > When I select some text from Mozilla-firefox using left mouse > button, but without issuing cut/copy command explicitly, then I paste > in emacs with middle mouse button or C-y, everything is OK, > which means the X PRIMARY selection method works fine. > But if I issue cut/copy command explicitly after > selection (select Edit/copy from Mozilla-firefox's menu, or C-c), > and then paste in emacs using Edit/paste menu item, what I got is > undecoded utf string, something like this "\u60a8\u4e0a\u6b21", > it seems that the X CLIPBOARD selection method does not work. > The following patch could fix this problem, but I'm not sure if > it is the best way. > - ------------------------------------------------------------------------------ > *** x-win.el 2005-05-30 02:44:48.000000000 +0800 > - --- x-win.el.new 2005-06-08 23:38:30.330605432 +0800 > *************** > *** 2446,2452 **** > (interactive) > (let ((clipboard-text > (condition-case nil > ! (x-get-selection 'CLIPBOARD) > (error nil))) > (x-select-enable-clipboard t)) > (if (and clipboard-text (> (length clipboard-text) 0)) > - --- 2446,2452 ---- > (interactive) > (let ((clipboard-text > (condition-case nil > ! (x-selection-value 'CLIPBOARD) > (error nil))) > (x-select-enable-clipboard t)) > (if (and clipboard-text (> (length clipboard-text) 0)) > - ------------------------------------------------------------------------ Thank you for the report. As it seems that the patch is correct, I've just installed it. But, the above is a change to x-clipboard-yank and it seems that this function was introduced on 21 Jan 2004 (strangely that fact is not in ChangeLog). At that time x-selection-value was already there. That means there will be some reason for x-clipboard-yank not using x-selection-value. Does anybody know who wrote it? If you are the author, could you please confirm that the change doesn't break your intention? --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] 2005-06-10 1:53 ` [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] Kenichi Handa @ 2005-06-10 5:12 ` jhd 2005-06-10 5:40 ` Kenichi Handa 2005-06-10 22:36 ` Richard Stallman 0 siblings, 2 replies; 5+ messages in thread From: jhd @ 2005-06-10 5:12 UTC (permalink / raw) Cc: id.brep, rms, emacs-devel > > But, the above is a change to x-clipboard-yank and it seems > that this function was introduced on 21 Jan 2004 (strangely > that fact is not in ChangeLog). At that time > x-selection-value was already there. That means there will > be some reason for x-clipboard-yank not using > x-selection-value. Does anybody know who wrote it? If you > are the author, could you please confirm that the change > doesn't break your intention? The change occured 21 Jan 2004 and is in the ChangeLog: 2004-01-21 Jan Djärv <jan.h.d@swipnet.se> * term/x-win.el: Call menu-bar-enable-clipboard and make Paste use clipboard first. I probably did not know what x-selection-value does, as it is not documented. Jan D. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] 2005-06-10 5:12 ` jhd @ 2005-06-10 5:40 ` Kenichi Handa 2005-06-10 22:36 ` Richard Stallman 1 sibling, 0 replies; 5+ messages in thread From: Kenichi Handa @ 2005-06-10 5:40 UTC (permalink / raw) Cc: id.brep, rms, emacs-devel In article <FBA8D0E3-019B-452C-9BE4-10068E61BB00@swipnet.se>, jhd <jan.h.d@swipnet.se> writes: > The change occured 21 Jan 2004 and is in the ChangeLog: > 2004-01-21 Jan Djärv <jan.h.d@swipnet.se> > * term/x-win.el: Call menu-bar-enable-clipboard and make Paste > use clipboard first. Ah, I see. I only grepped "x-clipboard-yank". > I probably did not know what x-selection-value does, as it is not > documented. As I made it just as a helper function of x-cut-buffer-or-selection-value, I didn't put docstring. But, although I thought I put a comment on it, I've just noticed that the comment doesn't exist in the current source. Hmmm, perhaps, I made some mistake at the time of committing it. I'm sorry for making you confused. I've just added a comment on x-selection-value, and removed condition-case wrapping in x-clipboard-yank because that is done' in x-selection-value. --- Kenichi Handa handa@m17n.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] 2005-06-10 5:12 ` jhd 2005-06-10 5:40 ` Kenichi Handa @ 2005-06-10 22:36 ` Richard Stallman 2005-06-11 5:41 ` jhd 1 sibling, 1 reply; 5+ messages in thread From: Richard Stallman @ 2005-06-10 22:36 UTC (permalink / raw) Cc: id.brep, emacs-devel, handa [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 287 bytes --] The change occured 21 Jan 2004 and is in the ChangeLog: 2004-01-21 Jan Djärv <jan.h.d@swipnet.se> * term/x-win.el: Call menu-bar-enable-clipboard and make Paste use clipboard first. Would you please edit that to itemize the specific functions that were changed? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] 2005-06-10 22:36 ` Richard Stallman @ 2005-06-11 5:41 ` jhd 0 siblings, 0 replies; 5+ messages in thread From: jhd @ 2005-06-11 5:41 UTC (permalink / raw) Cc: id.brep, handa, emacs-devel > > 2004-01-21 Jan Djärv <jan.h.d@swipnet.se> > > * term/x-win.el: Call menu-bar-enable-clipboard and make > Paste > use clipboard first. > > Would you please edit that to itemize the specific functions that were > changed? Done. Jan D. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-06-11 5:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <E1DgXAu-0006aF-PF@fencepost.gnu.org> 2005-06-10 1:53 ` [id.brep@gmail.com: x-clipboard-yank doesn't decode utf-8 string] Kenichi Handa 2005-06-10 5:12 ` jhd 2005-06-10 5:40 ` Kenichi Handa 2005-06-10 22:36 ` Richard Stallman 2005-06-11 5:41 ` jhd
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).