[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unable to bury buffer
From: |
James Thomas |
Subject: |
Re: unable to bury buffer |
Date: |
Sat, 09 Nov 2024 04:54:35 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Sivaram Neelakantan wrote:
> I wanted to hide the stats buffer but upon execution, the window is
> split as two bufferswith the scratch and report in it. How do I hide/bury
> the report?
>
> (defun my-use-package-report ()
> (when use-package-compute-statistics
> ;; Run the report in a new buffer and immediately bury it
> (with-current-buffer (get-buffer-create "*use-package statistics**")
> (use-package-report))
> ;; Bury the report buffer and keep the focus on *scratch*
> (bury-buffer)
> (switch-to-buffer "*scratch*")))
>
> ;; Add this to your init.el file,ideally at the end of it
> (add-hook 'after-init-hook #'my-use-package-report)
Put the (bury-buffer) inside the (with-current-buffer ...) block.
--