Cheatsheet

Evil mode keybindings

Root buffer:

  • s, telega-filter-map. u for unread, m for mention, / for reset, f for folder, t for type, s for search,
    • a for Interactively select a Chat filter to add to active filter,
    • e for Edit and reapply filters list.
    • i for “important”. Defaults to mentions and unmuted chats with unread messages or reactions.
  • C, telega-chat-create. Interactively create new chat.

Chat buffer, a.k.a chatbuf:

  • Za, telega-chatbuf-attach. Attach anything, including stickers.
  • Zf, telega-chatbuf-attach-media. Attach FILENAME as media.
  • Zv, telega-chatbuf-attach-clipboard. Attach clipboard to the chatbuf as photo. Requires an image in clipboard.
  • zz, telega-chatbuf-recenter-1. Recenter message at point.
  • M-x telega-msg-remove-text-spoiler. Remove text spoiler. Sometimes you can use <RET>.

Image view in chatbuf:

  • {, telega-image-prev. Show previous image in chat.
  • }, telega-image-next. Show next image in chat.

g A for chatbuf navigation:

  • u, telega-chatbuf-next-unread. Goto next unread message in the chatbuf.
  • > or r, telega-chatbuf-read-all. Jump to the last message and mark all messages as read.
  • @ or m, telega-chatbuf-next-unread-mention. Goto next unread mention or search for last mention starting from message at point.
  • !, telega-chatbuf-next-unread-reaction. Goto next unread reaction in chatbuf.
  • o, telega-chatbuf-next-outgoing. Goto next outgoing (sent by me) message or search for last outgoing message.
  • ^ or P, telega-chatbuf-goto-pinned-message. Go backwards to last pinned message for the chatbuffer. If not found, go to the latest pinned message. Note: it remembers the last pinned message viewed and searches from there, outliving the chatbuf’s lifetime.
  • s, telega-chatbuf-inplace-search. Search backward in the chatbuf. If C-u is given, then search forward instead.

g a for Telegra prefix map:

  • t, telega. Switch to root buffer.
  • b, telega-switch-buffer. Interactively switch to an opened CHAT’s buffer.
  • c, telega-chat-with. Start messaging with CHAT-OR-USER.
  • s, telega-saved-messages. Switch to “Saved Messages” chatbuf.
  • u, telega-switch-unread-chat. Switch to next unread message in next unread CHAT. Press again to highlight the unread message.

On message at point:

  • i, telega-msg-edit. Start editing the MSG.
  • <tab>, telega-button-forward. Move forward or backward (<backtab>) to next visible/active button.
  • T, telega-msg-open-thread-or-topic.
    • MSG could be a channel post, in this case open thread in the discussion group.
    • Or MSG could be in supergroup, then filter messages to the corresponding thread or topic.

Common keys:

  • g?, telega-describe-*. Show info about various items, e.g. USER, CHAT and MSG.
  • q. Quit window.
    • In chatbuf, you may need to use C-u q to force close window.
    • This is because after a
      • pop-to-buffer (telega-chat--pop-to-buffer and telega-msg-open-thread-or-topic) or
      • pop-to-buffer-same-window (telega-webpage--instant-view and telega-image-view-file) call
    • and returning from the pop up,
    • the quit-restore window parameter is reset to nil from (same (#<buffer *Telega Root*> 1 #<marker at 582 in *Telega Root*> 198) #<window 3 on ◀ [redacted]> #<buffer ◀ [redacted]>), where #<buffer *Telega Root*> is the prev-buffer that quit-window was supposed to display.
    • To workaround this, bind q to a workaround function in both maps of telega-chat-mode.
    • How to modify key bindings in chatbuf:
      • evil-collection-set-readonly-bindings binds q in telega-msg-button-map to #'quit-window.
      • telega-chat-mode’s keybindings are a combination of telega-msg-button-map and telega-chat-mode-map. The former takes precedence when a chat message is focused.
      • Therefore, both maps needs to be modified.
Message bindings (cursor on message):
\\{telega-msg-button-map}
Global chat bindings:
\\{telega-chat-mode-map}"

Completion

  • telega-company-username, backend to complete username. Start with @.
  • telega-company-hashtag, backend to complete hashtag. Start with #.
  • telega-company-emoji, backend to complete emojis. For stickers, use Za.
  • telega-company-botcmd, backend to complete bot commands. Only completes in a bot chatbuf.

Directories

  • telega-cache-dir, Directory for telegram downloads.

Getting Started

Installing Telega on macOS

  1. Install the Symbola font and configure unicode-fonts with Apple Color Emoji.
(after! unicode-fonts (push "Apple Color Emoji" (cadr (assoc "Supplemental Symbols and Pictographs" unicode-fonts-block-font-mapping))))
  1. Install dependencies with MacPorts. Optional dependencies are
    1. qrencode for log in.
    2. pngpaste for pasting image from clipboard.
sudo port install tdlib qrencode pngpaste
  1. Configure telega-server library prefix for tdlib.
(setq telega-server-libs-prefix "/opt/local")