emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modify-syntax-entry and UTF8?


From: Geoffrey Alan Washburn
Subject: Re: modify-syntax-entry and UTF8?
Date: Fri, 25 May 2007 14:20:53 -0400
User-agent: Thunderbird 2.0.0.4pre (X11/20070524)

Miles Bader wrote:
Geoffrey Alan Washburn <address@hidden> writes:
Still broken, at least in the latest CVS version of the emacs-unicode-2 branch. Is there another branch that I should be using (or alternately
have its changes merged into emacs-unicode-2)?

I'm using my own branch, derived from the CVS emacs-unicode-2 branch
(I don't think my personal changes are relevant to this area).

So how come it works for me but not for you?

I use the following command to invoke Emacs (where /tmp/m is your
message):

   env - TERM=xterm emacs -nw -Q /tmp/m

[The non-ascii chars are displayed as question-marks because Emacs
doesn't know what character set the terminal supports, but they still
match correctly.]

Okay, one difference was that I wasn't running emacs in terminal mode. However, I tried your example which worked and then reverted to my normal configuration and now that seems to be working too. So this really got me worried that I was just doing something really silly. However, if I start a fresh buffer and then use X11 "cut and paste" to copy ⟨ ⟩ into the buffer (instead of reading it from a file) it doesn't work. If I am editing a file that I've opened that already contains ⟨ ⟩ "cut and paste" a second pair, those match correctly as well. Alternately, if I first "cut and paste" and then use insert-file, matching behaves incorrectly. So I'm sure whether this is a configuration error on my part, or some bugginess regarding interaction with the X server. I was pretty sure that I emacs configured to use the correct encoding to start with

set-language-environment "utf-8")
(set-keyboard-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(prefer-coding-system 'utf-8)

I just checked and when opening a file with the pair of delimiters, describe-coding-system says

Coding system for saving this buffer:
  U -- utf-8-unix (alias: mule-utf-8-unix)

Default coding system (for new files):
  U -- utf-8 (alias: mule-utf-8)

Coding system for keyboard input:
  U -- utf-8 (alias: mule-utf-8)

Coding system for terminal output:
  U -- utf-8 (alias: mule-utf-8)

Coding system for inter-client cut and paste:
x -- compound-text-with-extensions (alias: x-ctext-with-extensions ctext-with-extensions)

Defaults for subprocess I/O:
  decoding: U -- utf-8-unix (alias: mule-utf-8-unix)

  encoding: U -- utf-8-unix (alias: mule-utf-8-unix)

whereas when I open a fresh buffer I get

Coding system for saving this buffer:
  Not set locally, use the default.
Default coding system (for new files):
  U -- utf-8 (alias: mule-utf-8)

Coding system for keyboard input:
  U -- utf-8 (alias: mule-utf-8)

Coding system for terminal output:
  U -- utf-8 (alias: mule-utf-8)

Coding system for inter-client cut and paste:
x -- compound-text-with-extensions (alias: x-ctext-with-extensions ctext-with-extensions)

Defaults for subprocess I/O:
  decoding: U -- utf-8-unix (alias: mule-utf-8-unix)

  encoding: U -- utf-8-unix (alias: mule-utf-8-unix)


If I change my .emacs so that it has

(prefer-coding-system 'utf-8-unix)

describe-coding-system reports both cases as identical to the first I quoted above. However, the behavior for working with a fresh buffer versus and opened file remains the same.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]