Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

tracking causes buffer changes to be slow/flickring #69

Open
jgoerzen opened this issue Apr 17, 2018 · 1 comment
Open

tracking causes buffer changes to be slow/flickring #69

jgoerzen opened this issue Apr 17, 2018 · 1 comment

Comments

@jgoerzen
Copy link

Hi,

I have a weird problem. When I run weechat with weechat-tracking enabled, I see a number of odd behavior:

  • In mu4e, when I display a HTML message, instead of taking maybe 0.5s, it may take multiple seconds, with much flickering between a weechat buffer and various message-related buffers
  • Something simlar is visible in org-mode's agenda view (C-C a a) when selecting a task to view.
  • Even when switching buffers with C-x b, after pressing RET to select a buffer, a brief flicker is visible.

This behavior never occurs when weechat-tracking is omitted from weechat-modules, or when I haven't yet invoked any weechat commands in an emacs session.

I typically have 30 to 50 weechat buffers open.

The relevant configuration includes:

  (setq weechat-tracking-types '(:highlight :message))
  (setq tracking-frame-behavior nil)  ; Only selected frame
  (setq tracking-max-mode-line-entries 3)
  (setq tracking-position 'end)
  (setq weechat-auto-monitor-buffers 't)
  (setq tracking-sort-faces-first 't)

I attempted to set (setq tracking-ignored-buffers '(".*mu4e.*")) and also (setq weechat-sync-buffer-read-status 't) but neither resolved the problem.

@jgoerzen
Copy link
Author

FWIW, this workaround dramatically decreases the impact of this:

     (setq jgoerzen-tracking-timer nil)
     (defvar jgoerzen-tracking-fun)
     (defvar jgoerzen-tracking-args)

     (defun jgoerzen-weechat-window-configuration-change-timer ()
       (apply jgoerzen-tracking-fun jgoerzen-tracking-args)
       )
     (defun jgoerzen-weechat-window-configuration-change (orig-fun &rest args)
       (if jgoerzen-tracking-timer
           (cancel-timer jgoerzen-tracking-timer))
       (setq jgoerzen-tracking-fun orig-fun)
       (setq jgoerzen-tracking-args args)
       (setq jgoerzen-tracking-timer (run-at-time 200 nil 'jgoerzen-weechat-window-configuration-change-timer))
       )
     (advice-add 'weechat-window-configuration-change :around #'jgoerzen-weechat-window-configuration-change)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant