* unable to bury buffer
@ 2024-11-02 7:59 Sivaram Neelakantan
2024-11-08 23:24 ` James Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Sivaram Neelakantan @ 2024-11-02 7:59 UTC (permalink / raw)
To: help-gnu-emacs
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?
--8<---------------cut here---------------start------------->8---
(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)
--8<---------------cut here---------------end--------------->8---
sivaram
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: unable to bury buffer
2024-11-02 7:59 unable to bury buffer Sivaram Neelakantan
@ 2024-11-08 23:24 ` James Thomas
0 siblings, 0 replies; 2+ messages in thread
From: James Thomas @ 2024-11-08 23:24 UTC (permalink / raw)
To: help-gnu-emacs
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.
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-08 23:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-02 7:59 unable to bury buffer Sivaram Neelakantan
2024-11-08 23:24 ` James Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).