unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: No coding system in the modeline for unibyte buffers.
Date: Fri, 16 Jan 2009 21:11:47 -0500	[thread overview]
Message-ID: <jwvr6321yti.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <f7ccd24b0901161547i3260ea5fnfb680905a36a795d@mail.gmail.com> (Juanma Barranquero's message of "Sat, 17 Jan 2009 00:47:11 +0100")

> IIUC, a unibyte buffer should contain raw bytes, while a raw-text
> multibyte buffer would contain the same contents, converted to the
> internal utf-8 based Emacs representation.

Actually the raw-text part of a multibyte buffer only affects operation
when it is saved and loaded, so it can contain characters that are
not bytes.

> But I confess I'm puzzled why

>  M-x find-file-binary test.txt <RET>
>  M-: enable-multibyte-characters <RET>  => nil
>  C-u C-x =    ; over ñ

>         character:   (241, #o361, #xf1)
> preferred charset: iso-8859-1 (Latin-1 (ISO/IEC 8859-1))
>        code point: 0xF1
>            syntax: w 	which means: word
>          category: j:Japanese l:Latin
>       buffer code: #xC3 #xB1
>         file code: #xC3 #xB1 (encoded by coding system no-conversion)

> If I'm hopelessly wrong, I'm quite ready to be enlightened (and
> perhaps the docs will need work).

Indeed that's a bug in C-u C-x =.  It should pay attention to the
buffer's enable-multibyte-characters and then present #xf1 not as
a latin-1 char but as a raw-byte.


        Stefan




  reply	other threads:[~2009-01-17  2:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 15:59 No coding system in the modeline for unibyte buffers Juanma Barranquero
2009-01-16 16:36 ` Eli Zaretskii
2009-01-16 16:42   ` Juanma Barranquero
2009-01-16 16:42 ` Stefan Monnier
2009-01-16 16:46   ` Juanma Barranquero
2009-01-16 20:45     ` Stefan Monnier
2009-01-16 23:47       ` Juanma Barranquero
2009-01-17  2:11         ` Stefan Monnier [this message]
2009-01-17  2:24           ` Juanma Barranquero
2009-01-17 17:03   ` Richard M Stallman

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=jwvr6321yti.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /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).