Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: pause info buffer redisplay #22

Open
felipeochoa opened this issue Nov 23, 2022 · 0 comments
Open

Feature request: pause info buffer redisplay #22

felipeochoa opened this issue Nov 23, 2022 · 0 comments

Comments

@felipeochoa
Copy link

I think the VS code extension has a pause button on the info buffer. I couldn't find this functionality, so added some quick and dirty advice to accomplish the same thing. Posting here in case helpful for others/someone wants to use this as inspiration for a PRhttps://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Pause.20emacs.20info

(defvar fov/lean4-pause-info nil "If non-nil, pause info buffer updates.")

(defun fov/lean4-info-buffer-redisplay (old-fun &rest args)
  "Suppress call to OLD-FUN if `fov/lean4-pause-info' is non-nil.  Otherwise call with ARGS."
  (unless fov/lean4-pause-info
    (apply old-fun args)))

(defun fov/lean4-toggle-info-pause ()
  "Toggle pausing of automatic info refresh."
  (interactive)
  (setq fov/lean4-pause-info (not fov/lean4-pause-info)))

(defvar lean4-mode-map)
(with-eval-after-load 'lean4-mode
  (advice-add 'lean4-info-buffer-redisplay :around #'fov/lean4-info-buffer-redisplay)
  (define-key lean4-mode-map (kbd "C-c C-p C-p") #'fov/lean4-toggle-info-pause))

https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/Pause.20emacs.20info

@mekeor mekeor added this to the 5. Features and Bugs milestone Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants