[Arcana] emacs file encoding question, plus a bonus question

Jim Blandy jimb at red-bean.com
Mon Jun 2 13:40:14 CDT 2008


On Mon, Jun 2, 2008 at 11:06 AM, David Carlton <carlton at bactrian.org> wrote:
> On Sun, 1 Jun 2008 20:48:46 -0700, "Jim Blandy" <jimb at red-bean.com> said:
>> On Sun, Jun 1, 2008 at 8:13 PM, David Carlton <carlton at bactrian.org> wrote:
>
>>> Another problem with my XEmacs->GNU Emacs switch: every time I save my
>>> .bbdb file, I get a complaint about a coding mismatch.
>
>> Do you have non-ASCII characters in your BBDB?
>
> Probably.  Hmm, what's the easiest way to check for that?  There
> should be some one-line way of doing it, I'm just not coming up with
> one off the top of my head...

There may be some spiffy MULE way to do it, but I'd just search for
[^NUL-DEL], entering C-q C-@ for NUL and C-q DEL for DEL.

>> If not, have you tried exiting Emacs, deleting the "coding" line (I
>> think that's what's called the "coding cookie"), and then restarting
>> Emacs and using BBDB?
>
> Yes, I have done that.
>
>> If you do have non-ASCII characters in your BBDB, then I'm not quite
>> sure what to do.  Perhaps start with a fresh Emacs, visit the file
>> (letting the coding cookie set the file's encoding), get the buffer
>> marked modified, and then save it again?
>
> No, that doesn't work.  (Also, just a sanity check - "coding cookie"
> just means the -*-coding: line at the top of the .bbdb file, right?)

Booey.

> I don't know where utf-8-emacs was ever defined as a valid coding
> system, but it isn't in current GNU Emacs versions.  And I don't know
> how to define a new coding system offhand, and the info pages didn't
> seem to help.  I tried redefining bbdb-file-coding-system, but that
> didn't work, for reasons that may or may not have to do with the fact
> htat it's a defconst instead of defvar?

Since it's been so long since the last Emacs release, I suspect many
people are running Emacs out of CVS; I am.  (If you want to do this,
don't hesitate to ask for help.)  And in my emacs,
(coding-system-p 'utf-8-emacs) -> t.




More information about the Arcana mailing list