unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: global-set-key  [? \ M-ö]
Date: 28 May 2003 13:53:12 -0400	[thread overview]
Message-ID: <5ln0h7q7p3.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: mailman.6914.1054137212.21513.help-gnu-emacs@gnu.org

> Yes, but the bug might be a design bug.  If that is so, we cannot tell
> users "please wait for a few years until we redesign the darn thing."

Of course, but I haven't seen such a thing w.r.t binding-non-ASCII-keys
and unibyte.

>> In the OP's case, I'm pretty sure the problem is that Emacs does not
>> properly set the keyboard coding-system.

> IIRC, there's more here than meets the eye.  Binding non-ASCII keys in
> a .emacs requires that (a) Emacs reads the key correctly from the init
> file and converts it to the internal representation that the user
> meant, and (b) that keyboard decoding produces a code that matches
> what was read from the init file.  It could be a bit tricky to satisfy
> both in a given language environment, since .emacs files generally
> don't have coding cookies.

We're talking about adding a unibyte-cookie, right ?
So we can assume that adding a coding-cookie is an acceptable cost
if it saves us from a unibyte-cookie.

> Also, if I'm not mistaken, non-ASCII keys
> with modifiers are very hard to express unless you go unibyte.

I've never heard of any such difficulty.  [?\M-é] works fine here.
Oh wait, you're probably referring to "\M-é", which probably won't work,
indeed.  But the "keys in a string" thingy should best be forgotten
anyway: either use a vector or use `kbd'.

>> I don't think the manual should encourage to use workarounds (e.g. set
>> the unibyte:t cookie in your .emacs) rather than real fixes (set the
>> keyboard coding system properly).

> Unless setting keyboard coding system doesn't always solve the
> problem, that is.

Setting the unibyte cookie doesn't either always solve the problem.
Right now I know of no case where setting the unibyte cookie solves
the problem while setting the keyboard-coding-system doesn't, which
is why I suggest we recommend setting the keyboard-coding-system.
Of course, there might be cases where a unibyte-keyboard with
unibyte-.emacs works better, but I haven't seen them yet.


        Stefan


PS: BTW, when I say keyboard-coding-system I also mean locale-coding-system
(since that's what is used in X and in W32 for the keyboard events).

  parent reply	other threads:[~2003-05-28 17:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19 19:55 global-set-key [?\ M-ö] Martin aus Chemnitz
     [not found] ` <87of1ybr5p.fsf@bach.composers>
2003-05-19 21:44   ` global-set-key [? \M-ö] Jesper Harder
2003-05-21  7:41   ` global-set-key [?\ M-ö] Martin aus Chemnitz
2003-05-21 15:55     ` global-set-key [? \M-ö] Stefan Monnier
2003-05-22  9:59       ` global-set-key [?\ M-ö] Martin aus Chemnitz
2003-05-22 13:24         ` global-set-key [? \M-ö] Stefan Monnier
2003-05-22 16:43           ` global-set-key [?\ M-ö] Martin aus Chemnitz
2003-05-22 17:41             ` global-set-key [? \M-ö] Stefan Monnier
2003-05-22 19:01               ` global-set-key [?\ M-ö] Martin aus Chemnitz
2003-05-22 20:49                 ` global-set-key [? \M-ö] Stefan Monnier
2003-05-24  9:18                 ` global-set-key [?\ M-ö] Eli Zaretskii
2003-05-24  9:02             ` global-set-key [? \M-ö] Harald Maier
2003-05-24  9:16     ` global-set-key [?\ M-ö] Eli Zaretskii
     [not found]     ` <mailman.6685.1053767730.21513.help-gnu-emacs@gnu.org>
2003-05-24 15:10       ` global-set-key [? \ M-ö] Stefan Monnier
2003-05-28  3:49         ` Eli Zaretskii
     [not found]         ` <mailman.6886.1054093722.21513.help-gnu-emacs@gnu.org>
2003-05-28  9:17           ` Kai Großjohann
2003-05-29 10:45             ` Martin aus Chemnitz
2003-05-29 11:56               ` Kai Großjohann
2003-05-29 12:35                 ` Martin aus Chemnitz
2003-05-29 13:13                   ` Kai Großjohann
2003-05-29 13:55                     ` Martin aus Chemnitz
2003-05-29 14:19                       ` Kai Großjohann
2003-05-29 14:31                     ` Stefan Monnier
2003-05-28 14:38           ` Stefan Monnier
2003-05-28 15:49             ` Eli Zaretskii
     [not found]             ` <mailman.6914.1054137212.21513.help-gnu-emacs@gnu.org>
2003-05-28 16:51               ` Kai Großjohann
2003-05-28 19:58                 ` Eli Zaretskii
     [not found]                 ` <mailman.6936.1054151969.21513.help-gnu-emacs@gnu.org>
2003-05-29  8:23                   ` Kai Großjohann
2003-05-29 13:43                     ` Eli Zaretskii
2003-05-28 17:53               ` Stefan Monnier [this message]
2003-05-28 20:04                 ` Eli Zaretskii
     [not found]                 ` <mailman.6937.1054152210.21513.help-gnu-emacs@gnu.org>
2003-05-28 20:29                   ` Stefan Monnier
2003-05-29  8:25                     ` Kai Großjohann
2003-05-25 23:22       ` global-set-key [?\ M-ö] Martin aus Chemnitz
2003-05-26  0:05         ` global-set-key [? \ M-ö] Stefan Monnier
2003-05-26  5:22         ` global-set-key [?\ M-ö] Kai Großjohann
2003-05-26  6:23           ` Kai Großjohann
2003-05-26 17:21         ` Eli Zaretskii
2003-05-22 16:38 ` global-set-key [?\M-ö] Kai Großjohann

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=5ln0h7q7p3.fsf@rum.cs.yale.edu \
    --to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
    /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.
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).