[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] if we operate on a subtree, perhaps we could adjust levels
From: |
Bastien |
Subject: |
Re: [O] if we operate on a subtree, perhaps we could adjust levels |
Date: |
Mon, 28 Jul 2014 17:05:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Hi Samuel and Achim,
Achim Gratz <address@hidden> writes:
> Samuel Wales writes:
>> you will notice that the decrypted subtree is actually at a higher
>> level than its parent. this is a violation of org structure.
>>
>> in consequence, it can silently swallow the entire rest of the file.
>>
>> this is not desired.
I see now, thanks.
>> is there a way to fix it?
>
> There's two ways I can think of:
>
> 1. Record the subtree level in a property before doing the encryption
> and compare that to the level after decryption. If there's no match,
> then promote or demote as appropriate.
I tried that way, but promoting and demoting the subtrees of the
encrypted entry is tricky.
> 2. Demote the whole subtree to toplevel before encryption and promote
> into the correct level on decryption, (much in the same way that
> includes are handled).
By "correct level on decryption" you mean toplevel? This would really
circumvent the problem.
Maybe we can store the level in a property on encryption and simply
throw a warning on decryption, letting the user decide whether she
wants to continue decrypting even when it may break the hierarchy.
What do you think?
--
Bastien
- Re: [O] if we operate on a subtree, perhaps we could adjust levels,
Bastien <=