circe-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Circe-help] The width of a circe buffer window


From: Daniel Corbe
Subject: [Circe-help] The width of a circe buffer window
Date: Sun, 09 Feb 2014 11:08:10 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix)

As of circe 1.3 the width of a window containing a circe buffer is not
automatically detected.  So here's what I came up with:

(defun circe-auto-adjust-width ()
  (setq lui-fill-column (- (window-width) 2))
  (make-variable-buffer-local 'lui-fill-column))
(add-hook 'circe-chat-mode-hook 'circe-auto-adjust-width)

(defun circe-fix-channel-buffers ()
  (interactive)
  (dolist (server (circe-server-buffers))
    (with-current-buffer server
      (dolist (buf (circe-chat-buffers))
        (with-current-buffer buf
          (circe-auto-adjust-width))))))

It obviously has problems.  For example: we need to manually run
circe-fix-channel-buffers when you move a circe buffer to different
sized windows.  

But it's a start.

I'd certainly like to hear about a different approach.

  



reply via email to

[Prev in Thread] Current Thread [Next in Thread]