From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Harald Maier <harald@maierh.de>, 2375@emacsbugs.donarmstrong.com
Cc: Stefan Monnier <monnier@IRO.UMontreal.CA>
Subject: bug#2375: 23.0.90; ^ in gnus summary buffer does not work in the nextstep build
Date: Sat, 21 Feb 2009 15:38:07 +0900 [thread overview]
Message-ID: <wl7i3kgur4.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <m2eixsgzgt.fsf@ate.maierh>
>>>>> On Sat, 21 Feb 2009 05:56:18 +0100, Harald Maier <harald@maierh.de> said:
>> Oh, I get it: so hitting ^ doesn't do anything, but hitting ^ SPC
>> does trigger the Gnus command bount to ^. Yes, that makes sense.
>> We could supposedly improve this to actually make ^ call the proper
>> Gnus command directly, but the patch doesn't try to do that.
> On a German keyboard this behaviour would be confusing. ^ is a dead
> key so we always use the SPACE key to force it. It should be similar
> to the X11 build and there I have too to press the SPACE character
> to force the dead key. As David mentioned the only small problem is
> the "buffer read only" warning.
What do you think about the dead-key behavior in the Carbon port
(Emacs 22)? If it is reasonable enough, maybe the Cocoa/GNUstep port
can adopt its strategy.
Below is the code from the Carbon+AppKit port(*), which also uses the
NSTextInput protocol.
(*) ftp://ftp.math.s.chiba-u.ac.jp/emacs/emacs-22.3-appkit-1.2.tar.gz
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
(defconst mac-marked-text-underline-style-faces
'((0 . mac-ts-raw-text) ; NSUnderlineStyleNone
(1 . mac-ts-converted-text) ; NSUnderlineStyleSingle
(2 . mac-ts-selected-converted-text)) ; NSUnderlineStyleThick
"Alist of NSUnderlineStyle vs Emacs face in marked text.")
(defun mac-text-input-set-marked-text (event)
(interactive "e")
(let* ((ae (mac-event-ae event))
(text (cdr (mac-ae-parameter ae)))
(selected-range (cdr (mac-ae-parameter ae "selectedRange")))
(script-language (mac-ae-script-language ae "tssl"))
(coding (or (cdr (assq (car script-language)
mac-script-code-coding-systems))
'mac-roman)))
(let ((use-echo-area
(or isearch-mode
(and cursor-in-echo-area (current-message))
;; Overlay strings are not shown in some cases.
(get-char-property (point) 'invisible)
(and (not (bobp))
(or (and (get-char-property (point) 'display)
(eq (get-char-property (1- (point)) 'display)
(get-char-property (point) 'display)))
(and (get-char-property (point) 'composition)
(eq (get-char-property (1- (point)) 'composition)
(get-char-property (point) 'composition)))))))
active-input-string caret-seen)
;; Decode the active input area text with inheriting faces and
;; the caret position.
(put-text-property (* (car selected-range) 2) (length text)
'cursor t text)
(setq active-input-string
(mapconcat
(lambda (str)
(let* ((decoded (mac-utxt-to-string str coding))
(underline-style
(or (cdr (get-text-property 0 'NSUnderline str)) 0))
(face
(cdr (assq underline-style
mac-marked-text-underline-style-faces))))
(put-text-property 0 (length decoded) 'face face decoded)
(when (and (not caret-seen)
(get-text-property 0 'cursor str))
(setq caret-seen t)
(if (or use-echo-area (null cursor-type))
(put-text-property 0 1 'face 'mac-ts-caret-position
decoded)
(put-text-property 0 1 'cursor t decoded)))
decoded))
(mac-split-string-by-property-change text)
""))
(put-text-property 0 (length active-input-string)
'mac-ts-active-input-string t active-input-string)
(if use-echo-area
(let ((msg (current-message))
message-log-max)
(if (and msg
;; Don't get confused by previously displayed
;; `active-input-string'.
(null (get-text-property 0 'mac-ts-active-input-string
msg)))
(setq msg (propertize msg 'display
(concat msg active-input-string)))
(setq msg active-input-string))
(message "%s" msg)
(overlay-put mac-ts-active-input-overlay 'before-string nil))
(move-overlay mac-ts-active-input-overlay
(point) (point) (current-buffer))
(overlay-put mac-ts-active-input-overlay 'before-string
active-input-string)))))
(defun mac-text-input-insert-text (event)
(interactive "e")
(let* ((ae (mac-event-ae event))
(text (cdr (mac-ae-parameter ae)))
(script-language (mac-ae-script-language ae "tssl"))
(coding (or (cdr (assq (car script-language)
mac-script-code-coding-systems))
'mac-roman)))
(overlay-put mac-ts-active-input-overlay 'before-string nil)
(let ((msg (current-message))
message-log-max)
(when msg
(if (get-text-property 0 'mac-ts-active-input-string msg)
(message nil)
(let ((disp-prop (get-text-property 0 'display msg)))
(when (and (stringp disp-prop)
(> (length disp-prop) 1)
(get-text-property (1- (length disp-prop))
'mac-ts-active-input-string))
(remove-text-properties 0 (length disp-prop)
'(mac-ts-active-input-string nil)
msg)
(message "%s" msg))))))
(mac-unread-string (mac-utxt-to-string text coding))))
(define-key mac-apple-event-map [text-input set-marked-text]
'mac-text-input-set-marked-text)
(define-key mac-apple-event-map [text-input insert-text]
'mac-text-input-insert-text)
next prev parent reply other threads:[~2009-02-21 6:38 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 18:27 bug#2375: 23.0.90; ^ in gnus summary buffer does not work in the nextstep build Harald Maier
2009-02-18 21:15 ` David Engster
2009-02-18 23:51 ` Stefan Monnier
2009-02-19 12:35 ` David Engster
2009-02-19 18:29 ` Stefan Monnier
2009-02-20 3:46 ` Harald Maier
2009-02-20 13:03 ` David Engster
2009-02-20 15:18 ` Stefan Monnier
2009-02-20 15:41 ` David Engster
2009-02-20 21:14 ` Stefan Monnier
2009-02-21 0:45 ` David Engster
2009-02-21 4:56 ` Harald Maier
2009-02-21 6:38 ` YAMAMOTO Mitsuharu [this message]
2009-02-21 9:30 ` Harald Maier
2009-02-22 1:39 ` YAMAMOTO Mitsuharu
2009-02-24 5:00 ` Harald Maier
2009-02-24 5:09 ` YAMAMOTO Mitsuharu
2009-02-25 16:25 ` Stefan Monnier
2009-02-26 0:04 ` YAMAMOTO Mitsuharu
2009-02-26 15:21 ` Stefan Monnier
2009-02-27 0:09 ` YAMAMOTO Mitsuharu
2009-03-09 13:25 ` Stefan Monnier
2009-03-10 0:05 ` YAMAMOTO Mitsuharu
2009-03-10 17:18 ` Stefan Monnier
2015-02-13 7:18 ` Lars Ingebrigtsen
2016-01-21 23:31 ` Alan Third
2009-02-26 16:49 ` David Engster
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wl7i3kgur4.wl%mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=2375@emacsbugs.donarmstrong.com \
--cc=harald@maierh.de \
--cc=monnier@IRO.UMontreal.CA \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.