[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: |
Samuel Wales |
Subject: |
Re: [O] if we operate on a subtree, perhaps we could adjust levels |
Date: |
Mon, 28 Jul 2014 12:08:05 -0700 |
org-yank-adjusted-subtrees?
On 7/28/14, Bastien <address@hidden> wrote:
> 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
>
>
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. And
ANYBODY can get it.
Denmark: free Karina Hansen NOW.