def behind_source(org_config_filename, verbose=False, dry_run=False):
command = 'emacs'
args = ['-batch',
'-l', org_config_filename,
'-l', 'ts-org-interaction.el',
'--eval=(ts-repl)']
spawn = pexpect.spawn(command, args, encoding='utf-8')
emacs_repl_wrapper = pexpect.replwrap.REPLWrapper(
spawn, "Lisp expression: ", None)
if dry_run:
o.DryRunSource.make_fn = make_fn
source = o.DryRunSource.from_emacs_repl(emacs_repl_wrapper,
verbose)
else:
o.Source.make_fn = make_fn
source = o.Source.from_emacs_repl(emacs_repl_wrapper, verbose)
source.get_tree = lambda: source.get_all_items(
['asana_id', 'asana_project_id'])
return source
评论列表
文章目录