From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas Newsgroups: gmane.emacs.help Subject: Re: unable to bury buffer Date: Sat, 09 Nov 2024 04:54:35 +0530 Message-ID: <864j4htiks.fsf@gmx.net> References: <85ed3u3w34.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14625"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 09 00:25:21 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t9YLx-0003jQ-Id for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 09 Nov 2024 00:25:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9YLN-0002ab-6c; Fri, 08 Nov 2024 18:24:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9YLL-0002aN-Uo for help-gnu-emacs@gnu.org; Fri, 08 Nov 2024 18:24:43 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9YLK-00089e-8c for help-gnu-emacs@gnu.org; Fri, 08 Nov 2024 18:24:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1731108280; x=1731713080; i=jimjoe@gmx.net; bh=JDHYeoorzs/Lgw0qqhAJOWN65AMKrw4g/aS49Bbd7c8=; h=X-UI-Sender-Class:From:To:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=ZPH3XY2OV7byqMAmGjG2riVT3bgXOY2B2+Gsl5coXIHJw5k0Qj6lpp8xszcGZcLg eo1dukVHtkSWTE0j39ivnobSOHnOR87LS44SSEqj8xOfvL6CUpNjd3CDYy/HjsHWT 4kok2r3N/3KtPTVlN5EHR9vGY0+gkvwGRfHp+T/DGqLfGSDOHdu36hqHNJ3/qvXGg +136hrut3+dicYYsJ0zYDuMFvcv2Vn3iLfcnAIH2OB2Jpdv/wpYvZzb41IuFii6NH kDI3bL+jT+jYjXT4P7xlShhcGY1EEq4isK+kujRLEh9VfiSPlRUcdDgOIUdr6c6d/ hEPw+yBjWS4qjb5rlA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-3493 ([42.108.29.235]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MS3mt-1tFyP60L0N-00R46V for ; Sat, 09 Nov 2024 00:24:40 +0100 In-Reply-To: <85ed3u3w34.fsf@gmail.com> (Sivaram Neelakantan's message of "Sat, 02 Nov 2024 13:29:11 +0530") X-Provags-ID: V03:K1:aJRg17IrR5GwGSlFLDO21DizNVhS/uCIGnfM9DhFrtRb8ekphKf 38ygOtJXViV/zszEt0qe0+3TPuB/DOYj10gDXXBeCJcML+12OkUD6ql1XO2dc2uaBWouien SHW1eDxriHOGTjrRk+fBLmD85GyemOCD7sXc/jGrkOEoCcNL8mWMvdyZVuC5K4TCUGnH2kA XlqEbSZ0XJWTRBlpQGVYA== UI-OutboundReport: notjunk:1;M01:P0:mhwPdHkfVkM=;w6tdw0BnebMYo/bqAmykiyFEa9w UOOvdRH+ptS9C/ttO1sQeX/9uRlJI5aLejlBW4tatL4lbmR+9f/Be+yFBq5GwUN4WPoyEysR4 JPyjxfIU74AsuaqvuS+RMnZubQdnnVUdxJXAcMjjRGlOhxXoCv6F8sY0CvMJAmJJscPIJu5WS LYGe0spFXf8BdFuQbQCarjw9oPr5hdTm/Gaa1ljb5cH+xFlUSBDxVO3nejryr8QYwUUOVyXtY xRr6MpoNa79/307eryAEUUQ/M8tELEi0Xz2VXFYnEc7qbIHp0UVI1I4vN90xe7Sw5DsII8ktn O52bT/PizLiwIQhSUJu8BaFnqldsJr7l3ZePO6mD7+f8lQH2Pl2eHeuG8C5WQjOiniV13VAqj WpSvqhYnmWuhEZMor/VCavfRUT1jF1aGN9DXUm8Vl4KYCLrDYTrPlctvlkq7DfgT27ghRT6su Kh/ea2mZAGERwc3asTigK79oFjHY3HdK26taqurz/+F5tL1Scb5xX4vHydfUtBP0+KDhVLAM4 5zl9BRU3EIuwIg3OHOCzlsPfwwNK5/2fUv+ImcGgT8OzCMg9IFEVgWxm5SjMwYQB6bfCj139D n4xpyqmqCGXal9REuZekm4YKWXGPC7P3D+r1aQEFHO1kY93krXGUDbkiS2/D0RnBBy04s/thq hMOKa+Bndt/Jsz5Y7BD8MtE7EpL4FK3HGgCAZcH7Op7uO/IWM1nqb2v17X2HgOFGtxMUb1j6k dZQbay33GwZ6YIuwxlEf5h2rDK0DkhNzdGmfX7FULe57oNnRQgyms3HEmyEXmxlMjxViHxr1 Received-SPF: pass client-ip=212.227.17.22; envelope-from=jimjoe@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148296 Archived-At: 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. --