unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch for selection in Carbon Emacs
@ 2005-04-11 10:46 YAMAMOTO Mitsuharu
  2005-04-14 10:14 ` YAMAMOTO Mitsuharu
  2005-04-18  8:44 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 4+ messages in thread
From: YAMAMOTO Mitsuharu @ 2005-04-11 10:46 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1839 bytes --]

The attached is a patch for selection/clipboard in Carbon Emacs.

  * Addresses the following bugs:

    [Emacs/Carbon/Mac OS X] clipboard-coding-system affects internal kill&yank
    http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-03/msg00133.html

    [osx] edit/paste menu item always disabled
    http://lists.gnu.org/archive/html/emacs-devel/2004-10/msg00101.html

  * Supports Unicode data in clipboard

    Selection-coding-system also affects pasting Unicode data from the
    clipboard.  First, the clipboard data is converted to the data
    encoded in selection-coding-system *using the converter provided
    by the system*, and then Emacs decodes its result with
    selection-coding-system.  If the first conversion failed, then
    Emacs decodes the original clipboard data as UTF-16 data.  I did
    so in order to avoid subtle difference between Unicode mappings.

As in other platforms, selection names are specified by Lisp symbols.
But unlike X11, not all selection names take part in interapplication
communication.  If a selection name has a string value for the
property `mac-scrap-name', then the data exchange with the selection
becomes that with the scrap (an interapplication storage in Mac) whose
name is the string.  For example, mac-win.el has the following line:

  (put 'CLIPBOARD 'mac-scrap-name "com.apple.scrap.clipboard")

and thus the selection CLIPBOARD corresponds to the standard
clipboard, which is a scrap named "com.apple.scrap.clipboard".

Neither PRIMARY nor SECONDARY is associated with a scrap by default,
so they are used inside Emacs only.

Selection data types and scrap flavor types are related in a similar
way:

  (put 'mac-TEXT    'mac-scrap-flavor-type "TEXT")
  (put 'mac-UNICODE 'mac-scrap-flavor-type "utxt")

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

[-- Attachment #2: diff-selection.gz --]
[-- Type: application/octet-stream, Size: 11062 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-18  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11 10:46 Patch for selection in Carbon Emacs YAMAMOTO Mitsuharu
2005-04-14 10:14 ` YAMAMOTO Mitsuharu
2005-04-18  8:44 ` YAMAMOTO Mitsuharu
2005-04-18  9:32   ` Miles Bader

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).