telega.el
telega.el copied to clipboard
[Feature] Wrap chats to window size.
Telega Setup
OS: Manjaro 18.1 Emacs: GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.17.3) of 2020-02-13 Telega: telega v0.6.0 (TDLib version 1.5.4)
Installed from Melpa
Current Behavior
Telega does not wrap messages to current windows size. I want to use telega when programming without to change buffers. So, I need to put it on a small width portion on my screen.
Steps to Reproduce
- C-u - 40 C-x 3 <- Split window an get a new one of about 40 chars width
- M-x telega
Possible Solution
Maybe, putting a variable somewhere to set telega minimum buffer width.
Thanks a lot. This client is awesome.
To setup telega in way you want, consider adding next to your init.el
:
(setq telega-inserter-for-chat-button 'telega-ins--chat-full-2lines)
(setq telega-chat-button-width 15)
(setq telega-root-fill-column (+ 7 telega-chat-button-width))
(setq telega-chat--display-buffer-action
'((display-buffer-reuse-window display-buffer-use-some-window)))
However, telega-inserter-for-chat-button
won't be applied at runtime. To apply it in runtime, eval this:
(put (get 'telega-chat 'button-category-symbol)
:inserter 'telega-ins--chat-full-2lines)
And then restart telega. Press Q in rootbuf to kill current telega. And then start it with M-x telega RET
Possibly related to #172