org-editor/emacs_client.py

9 lines
240 B
Python
Raw Permalink Normal View History

import subprocess
def navigate_emacs_to_id(item_id):
item_id = item_id.replace('"', '\\"')
return subprocess.check_call([
'emacsclient', '-e', '(org-id-goto "{}")'.format(item_id)],
stdout=subprocess.DEVNULL,
)