unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: James Thomas <jimjoe@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: unable to bury buffer
Date: Sat, 09 Nov 2024 04:54:35 +0530	[thread overview]
Message-ID: <864j4htiks.fsf@gmx.net> (raw)
In-Reply-To: <85ed3u3w34.fsf@gmail.com> (Sivaram Neelakantan's message of "Sat, 02 Nov 2024 13:29:11 +0530")

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.

--



      reply	other threads:[~2024-11-08 23:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-02  7:59 unable to bury buffer Sivaram Neelakantan
2024-11-08 23:24 ` James Thomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864j4htiks.fsf@gmx.net \
    --to=jimjoe@gmx.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).