emacs-devel
[Top][All Lists]
Advanced

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

Re: allout encryption and non-ascii characters - a patch


From: Ken Manheimer
Subject: Re: allout encryption and non-ascii characters - a patch
Date: Mon, 13 Nov 2006 10:36:37 -0500

this is a new version of my allout patch that enables topic encryption
of non-ascii characters.

added to the previous fix is recognition of cases where the non-ascii
encoding is present in text that is being encrypted, but not accounted
for by the buffer encoding.  hence, encryption would make the
non-ascii chars invisible to emacs during-write detection of alternate
encodings, and so the encoding might not be properly accommodated when
the text is decrypted.  in such cases, allout detects that the
encoding of the text during encryption is different from the buffer's
encoding, and prompts the user to offer to preserve the encoding as a
file-local-variable.

this will not handle multiple incompatable encodings in the same file,
but emacs doesn't handle that, anyway.  encryption can hide the fact
of multiple encodings, such that some encrypted text will not be
presented correctly when decoded, but there's nothing to be done there
other than warning the user.  allout doesn't do that, but i'm not sure
there's enough recourse in that situation to make it worth the while.

i've tested this with some japanese-shift-jis (david smith's 筆は剣より強い。)
and iso-2022-7bit (a fancy ' apostrophe) encoded text (in separate
files), with good results.  it's possible that there is some other,
unaccounted problem causing the failure david was seeing, but i
suspect this is it, and in any case these fixes are helpful, and
should be applied.

since kim connected my posting about the encoding quandry with my
prior patch, that patch has not been applied, and this patch
incorporates that one.  it would be valuable to have these fixes in
the version of allout that's released with the full emacs 22 release,
so i'm anxious not to miss that.

the patch and changelog entry are attached, the changelog entry alone
is included inline, below.

--
ken
address@hidden
http://myriadicity.net

2006-13-05  Ken Manheimer  <address@hidden>

        * allout.el (allout-doublecheck-at-and-shallower): Clarify
        docstring.
        (allout-inhibit-aberrance-doublecheck): Rename from
        allout-during-yank-processing.
        (allout-do-doublecheck): Track allout-inhibit-aberrance-doublecheck
        name change.
        (allout-ascend): Provide for unusual case where some topic after
        the first in file is at lower depth than the first.
        (allout-shift-in): Ensure the offspring of the new containing
        topic are exposed.
        (allout-encrypt-string): Preserve the coding-system of the text,
        according to that of the containing buffer.
        (allout-toggle-subtree-encryption): When the text being encrypted
        requires a different coding system than that prevailing in the
        buffer, offer to preserve the coding system using a file local
        var.

Attachment: allout-patch.txt
Description: Text document

Attachment: ChangeLog-entry.txt
Description: Text document


reply via email to

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