3

During idle time with run-with-idle-timer I parse text around a point and update header-line-format.

Unfortunately I can't see update to header line unless I type any key. So I should trigger redisplay.

With (redisplay) header line isn't updated. With (force-window-update) it is updated.

I am not sure what function is appropriated for my usage scenario. There are also redraw-frame and redraw-display and possibly many others.

What function is more efficient in performance?

gavenkoa
  • 3,352
  • 19
  • 36

1 Answers1

2

(force-mode-line-update) or all with the optional t: "Force redisplay of the current buffer’s mode line and header line. With optional non-nil ALL, force redisplay of all mode lines and header lines. This function also forces recomputation of the menu bar menus and the frame title." Here is a link to the manual entry: https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Basics.html

lawlist
  • 18,826
  • 5
  • 37
  • 118