From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ken Manheimer" Newsgroups: gmane.emacs.devel Subject: Re: allout encryption and non-ascii characters Date: Tue, 7 Nov 2006 19:13:46 -0500 Message-ID: <2cd46e7f0611071613n1178ad9fxdde5b2c5cd52a874@mail.gmail.com> References: <877iyfjpbx.fsf@acm.org> <2cd46e7f0611011007g772df6dcn84b0e36c2a2dfe71@mail.gmail.com> <2cd46e7f0611041128k57da936vda14f79f35259d58@mail.gmail.com> <2cd46e7f0611060756k5f8caa92ocde9a2d24f907a8d@mail.gmail.com> <87wt68yrcu.fsf@acm.org> <2cd46e7f0611071522na96beeco70d0972572ed5e3a@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162944855 7452 80.91.229.2 (8 Nov 2006 00:14:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Nov 2006 00:14:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 08 01:14:12 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ghb4v-0006Tu-9K for ged-emacs-devel@m.gmane.org; Wed, 08 Nov 2006 01:14:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ghb4u-000266-MX for ged-emacs-devel@m.gmane.org; Tue, 07 Nov 2006 19:14:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ghb4g-00025r-S5 for emacs-devel@gnu.org; Tue, 07 Nov 2006 19:13:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ghb4e-00025e-V9 for emacs-devel@gnu.org; Tue, 07 Nov 2006 19:13:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ghb4e-00025b-P1 for emacs-devel@gnu.org; Tue, 07 Nov 2006 19:13:48 -0500 Original-Received: from [66.249.92.171] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Ghb4e-0007FZ-CV for emacs-devel@gnu.org; Tue, 07 Nov 2006 19:13:48 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so1462297ugf for ; Tue, 07 Nov 2006 16:13:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QboVAcxLFgsdwsRxWneh4raurmgj97qM/xS6RuGUDAdGL98Gp+k1/Are/JwGWT9C0VEg6gkDF4x2wNYRdWp/Jv0Rj1UdZefCQbIdiRWjXVuOIvNvTeuP0kvMzup7/E7P/rqhJwA57blR7sD2V3owpUbJGFzF7wUpyU7iqifluIQ= Original-Received: by 10.78.201.2 with SMTP id y2mr9013384huf.1162944826891; Tue, 07 Nov 2006 16:13:46 -0800 (PST) Original-Received: by 10.78.198.11 with HTTP; Tue, 7 Nov 2006 16:13:46 -0800 (PST) Original-To: davidsmith@acm.org In-Reply-To: <2cd46e7f0611071522na96beeco70d0972572ed5e3a@mail.gmail.com> Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:61936 Archived-At: i still am getting successful encryption/decryption turnaround of your text with a current cvs checkout. in the process i realized one elusive pitfall which could lead to a false negative, and want to warn you about it. you need to have some of the non-ascii text outside of an encrypted topic. otherwise, emacs auto-encrypts during the save, hiding the encoded characters from emacs non-ascii detection. it also auto-decrypts the current topic after the save, if it was plain text before, hiding the fact that the encryption happened from the user. you would notice that the non-ascii text isn't preserved across the save, but could miss that *emacs* could miss the non-ascii characters/alternate encoding because of the auto-encryption... thanks again... ken On 11/7/06, Ken Manheimer wrote: > i've replied to david, and i'm hoping we can track down the > discrepancy between our systems - i'm unable to reproduce his problem > with his text and my posted version of allout. in the meanwhile, the > request for testers still goes - encryption of non-ascii text with the > (attached) allout version with the fix (after saving and revisiting > the text file, to ensure that the buffer is set to the right > encoding). > > ken > > On 11/6/06, David Smith wrote: > > > Thanks very much for working on the coding-system related > > bug. Unfortunately, with the attached test file, it still > > fails. I've attached my test file; it's encoded with > > mule-utf-8, I'm using GNU Emacs 22.0.50.1 (i486-pc-linux-gnu, > > GTK+ Version 2.8.20) of 2006-10-23 on pacem, modified by Debian. > > > > Any pgg hackers with a clue on this? > > > > David > > > > "Ken Manheimer" writes: > > > > > though i haven't heard that anyone else has tested it, i would hate > > > for this allout patch to miss the release, and am confident enough > > > about its merits to ask that it be applied. > > > > > > the crucial thing the patch does is enable topic encryption of > > > non-ascii encodings. the encoding fix is only a few lines, but the > > > patch also eliminates a tradeoff in the last fix i submitted, > > > clarifies a variable name and some docstrings in the process, and > > > rectifies some assorted boundary-condition behaviors, as well. > > > -- > > > ken > > > ken.manheimer@gmail.com > > > http://myriadicity.net > > > > > > 2006-11-05 Ken Manheimer > > > > > > * 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. > > > > > > > > > > > > On 11/4/06, Ken Manheimer wrote: > > >> i have had some success with getting allout topic encryption to > > >> encrypt text so that characters in an alternate coding set are > > >> preserved. i am looking for people to test it - i am so unfamiliar > > >> with coding sets in general that i don't really know how to be sure it > > >> works generally! (i am excited, though, that i was able to round-trip > > >> some text with an elaborate <'> apostrophe that isn't preserved in the > > >> ascii character set, but is preserved in iso-2022-7bit.) > > >> > > >> i'm attaching a full copy of the revised allout.el for testing - make > > >> sure you're not getting byte code from an old version when giving it a > > >> go. and when you do test it, be sure that the file you're working > > >> with has a coding set which preserves the characters on rereading - > > >> the encryption depends on the buffer being in the right coding set. > > >> > > >> let me know whether or not it works for you, and if possible, the > > >> coding set of the trial ('Esc-x buffer-file-coding-set' will tell > > >> you). if i get good confirmation that this works, i'll submit a > > >> proper patch. > > >> > > >> thanks! > > >> > > >> On 11/1/06, Ken Manheimer wrote: > > >> > allout's use of pgg for encryption doesn't provide for non-ascii text, > > >> > and encoding is a realm where i seem to have less than zero > > >> > cluefulness. can anyone help me solve the problem posed below? > > >> > > > >> > ken > > >> > > > >> > On 11/1/06, an david smith wrote: > > >> > > > >> > > Hi Ken, > > >> > > > > >> > > I've been an allout user for a very long time. It's wonderful > > >> > > software. Thank you. > > >> > > > > >> > > Today I thought I'd try out the encryption support as I finally > > >> > > have a need for it but it doesn't properly handle non-ascii > > >> > > characters. pgg-output-buffer is created inside of pgg-gpg with > > >> > > mode of raw-text or binary and that is never converted back > > >> > > into the charset of the original cleartext. I do a lot of work > > >> > > in Japanese and so this is critical. > > >> > > > > >> > > I look at how gnus uses pgg and its charset handling but even > > >> > > in edebug I couldn't quite see how it was doing it correctly > > >> > > compared to how allout's method. > > >> > > > > >> > > If you have any insight I would really appreciate it. I will > > >> > > try to debug this in my own time but as you are the > > >> > > maintainer/author of the software involved, I hope you can at > > >> > > least nudge in me the right direction towards a fix. > > > > > > > > > > -- > > David D. Smith > > > > > > Test Text > > //_. Encrypt This > > 筆は剣より強い。 > > > > > > > > > > > -- > ken > ken.manheimer@gmail.com > http://myriadicity.net > > > -- ken ken.manheimer@gmail.com http://myriadicity.net