From: Samuel Wales <samologist@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Achim Gratz <Stromeko@nexgo.de>, emacs-orgmode@gnu.org
Subject: Re: if we operate on a subtree, perhaps we could adjust levels
Date: Mon, 28 Jul 2014 12:08:05 -0700 [thread overview]
Message-ID: <CAJcAo8v3LQSt7mCt9GPQ4a2UsnHx61Jk4NZO36rkeDue+Gn4cg@mail.gmail.com> (raw)
In-Reply-To: <87d2cpwg3r.fsf@bzg.ath.cx>
org-yank-adjusted-subtrees?
On 7/28/14, Bastien <bzg@gnu.org> wrote:
> Hi Samuel and Achim,
>
> Achim Gratz <Stromeko@nexgo.de> 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.
next prev parent reply other threads:[~2014-07-28 19:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 3:44 if we operate on a subtree, perhaps we could adjust levels Samuel Wales
2014-04-11 9:07 ` Bastien
2014-04-17 9:43 ` Samuel Wales
2014-04-17 10:12 ` Bastien
2014-06-09 4:54 ` Samuel Wales
2014-06-09 5:54 ` Achim Gratz
2014-07-28 15:05 ` Bastien
2014-07-28 19:08 ` Samuel Wales [this message]
2014-07-29 14:30 ` Bastien
2014-07-29 16:03 ` Achim Gratz
2014-07-29 21:32 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJcAo8v3LQSt7mCt9GPQ4a2UsnHx61Jk4NZO36rkeDue+Gn4cg@mail.gmail.com \
--to=samologist@gmail.com \
--cc=Stromeko@nexgo.de \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.