Uses writefile() with a flag when moving headline from one file to another instead of opening target file in the split view. Opening file in split view messes up the focus for me after headline is moved because it focuses the wrong window.
Consider both org and dotoo when figuring out the target filename. If buf is not loaded, find filename from loaded agenda file names.
This PR fixes 2 things:
writefile()
witha
flag when moving headline from one file to another instead of opening target file in the split view. Opening file in split view messes up the focus for me after headline is moved because it focuses the wrong window.org
anddotoo
when figuring out the target filename. If buf is not loaded, find filename from loaded agenda file names.