Ronan Waide <[EMAIL PROTECTED]> writes:

> Prior to the patch, BBDB didn't have any coding-system handling beyond
> whatever Emacs uses natively. I applied the patch because 
> (a) it didn't break my test setup
> (b) as described by the contributor, it solved a problem

Heh :-)

> Not to cast aspersions on the original patch, but perhaps I was a
> little hasty in applying it. Then again, that's what the CVS tree is
> for; if the patch /is/ causing problems, then maybe I should remove it
> again.

(Note that I downloaded the 2.35 tarball.  I thought this meant that
BBDB is one of the few packages where I'm not at the bleeding edge :-)

> I'm a bit vague on the whole area of coding-systems in Emacs, so if
> anyone would like to suggest a proper way of handling this, please
> do so.

I like the idea of using a different coding system for .bbdb.  I think
that a coding system which can encode everything should be used.  The
variable is not a bad thing since some people might wish to use grep
or some other tool on their .bbdb files.

Hm.

If it wasn't for the new variable, the following might be a 
backward-compatible from pre-variable BBDB to something new entirely,
without going via the 2.35 intermediary:

When reading, have BBDB apply the normal Emacs machinery for decoding
the file contents.  Take note of any "coding:" tag in the file.  If it
is there, just preserve it on write.  But if there is no "coding:"
tag, invoke the migration machinery as follows:

  - set-buffer-file-coding-system to `emacs-mule' (say)
  - add ";; -*- coding: emacs-mule; -*-" to the first line of the file
  - save

There could be a variable to choose something else than emacs-mule.

Maybe this could even work with the current code: if the variable
bbdb-file-coding-system is set, use that coding system instead of
`emacs-mule' in the coding tag.

Yes, I think that might be a nice overall approach.

What do you think?

An open problem is what to do about re-encoding of the file.  What
happens if there is a coding: foo tag there but the user would like to
store the file in the bar encoding?  Manually changing the encoding
and the coding tag is of course always possible; should BBDB offer any
additional support?

kai
-- 
Silence is foo!

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to