unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Subject: Patch for selection in Carbon Emacs
Date: Mon, 11 Apr 2005 19:46:26 +0900	[thread overview]
Message-ID: <wlk6n9ioal.wl%mituharu@math.s.chiba-u.ac.jp> (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

             reply	other threads:[~2005-04-11 10:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-11 10:46 YAMAMOTO Mitsuharu [this message]
2005-04-14 10:14 ` Patch for selection in Carbon Emacs YAMAMOTO Mitsuharu
2005-04-18  8:44 ` YAMAMOTO Mitsuharu
2005-04-18  9:32   ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlk6n9ioal.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).