コード例 #1
0
 def surrounding_text() -> SurroundingText:
     try:
         raw_info = rpc.call(
             "voicemacs-surrounding-text",
             [":chars-before", 30000, ":chars-after", 30000],
             # Use a very long timeout
             timeout=10,
             changes_state=False,
         )
     except porthole.PortholeConnectionError:
         return None
     return SurroundingText(text_before=raw_info["text-before"],
                            text_after=raw_info["text-after"])
コード例 #2
0
ファイル: company.py プロジェクト: ja-mesmugford/talon_config
 def emacs_company_highlight(number: int) -> None:
     """Move to a specific company candidate."""
     rpc.call("voicemacs-company-highlight", [number])
コード例 #3
0
ファイル: helm.py プロジェクト: ja-mesmugford/talon_config
 def emacs_helm_goto_line(line_number: int):
     """Move to a specific line in the helm buffer."""
     # HACK: Technically it does change the state, but it doesn't mater if
     #   we do it multiple times.
     rpc.call("voicemacs-helm-goto-line", [line_number],
              changes_state=False)
コード例 #4
0
ファイル: company.py プロジェクト: ja-mesmugford/talon_config
 def emacs_company_show_doc(number: int) -> None:
     """Pop doc for a specific company candidate."""
     rpc.call("voicemacs-company-pop-doc", [number])
コード例 #5
0
ファイル: company.py プロジェクト: ja-mesmugford/talon_config
 def emacs_company_complete(number: int) -> None:
     """Pick & complete a numbered company candidate."""
     rpc.call("voicemacs-company-complete", [number])
コード例 #6
0
 def org_set_todo(state: str) -> None:
     """Set the current item to a specific TODO state."""
     rpc.call("org-todo", [str(state)])
コード例 #7
0
ファイル: dired.py プロジェクト: ja-mesmugford/talon_config
 def emacs_dired_highlight(number: int) -> None:
     """Move cursor to a Dired candidate by number."""
     # HACK: Technically it does change the state, but it doesn't mater if
     #   we do it multiple times.
     rpc.call("voicemacs-dired-move-to-item", [number], changes_state=False)
コード例 #8
0
 def emacs_insert_yasnippet(snippet_name: str) -> None:
     """Insert a yasnippet by name."""
     rpc.call("voicemacs-insert-snippet", [snippet_name])