[O] Move (the children of) a subtree to another subtree programmatically

2018-09-14 Thread Marcelo de Moraes Serpa
Hi there,

I'm trying to figure out the best way to move the children of a subtree to
another one. The use-case is simple: I have another lisp function that
creates a new item in an orgfile for me everyday with the current date and
gives it focus. In the case below, it'd have created `<2018-01-01`> above
`<2017-12-31>`, that works already:

* <2018-01-01>
* <2017-12-31>
** TODO Foobar
** DONE Barfoo

As part of that, I'd also want to move all TODO items from the previous day
to the next day. I'm not sure how to do it though. I tried using
`org-map-entries` with an `if` to exclude the direct parent (the date item)
and then use `org-cut-subtree` and `org-paste-subtree` but for some reason
emacs hangs. I couldn't figure out how to use `org-refile` programmatically
though.

Considering I have access in elisp to both a `to` and `from` variables,
where `to` is `<2018-01-01>` and from is `<2017-12-31>` and that I want to
move all *non-DONE` items from `from` to `to`, how would I go about doing
that?

Thanks in adance!

- Marcelo.


[O] orgalist list item spacing

2018-09-14 Thread Eric Abrahamsen
I'm a happy user of orgalist, it's very nice to be able to have basic
Org structures in email.

One thing I noticed is that if a paragraph line wraps so that the last
line has a number followed by a full stop, orgalist treats that as a
list item. It seems to me that text should not be considered a list item
unless there's a blank line above it. Ie, this is currently considered a
list item:

This is an email talking about some future plans that will take place in
2020. This line with the 2020 is considered a list item.

  As evidenced by the indent automatically applied to this line.
  
C-j fixes it, as usual.

Is this a bug, or a configurable option, or just the way it's supposed
to work?

Thanks,
Eric