From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#47075: [FEATURE REQUEST] kill-buffer: option to prompt to save Date: Thu, 11 Mar 2021 13:15:31 -0500 Message-ID: <20210311181531.u5vkl25o7qyefnzk@E15-2016.optimum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8822"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: NeoMutt/20180716 To: 47075@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 11 19:16:12 2021 Return-path: Envelope-to: geb-bug-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 1lKPr1-0002C1-BG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 19:16:11 +0100 Original-Received: from localhost ([::1]:46008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKPr0-0007eW-Bv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Mar 2021 13:16:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKPqs-0007dr-HO for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 13:16:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKPqs-0004Jx-8z for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 13:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lKPqs-0006SQ-4E for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 13:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Mar 2021 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47075 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Reporting Original-Received: via spool by submit@debbugs.gnu.org id=B.161548654324792 (code B ref -1); Thu, 11 Mar 2021 18:16:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Mar 2021 18:15:43 +0000 Original-Received: from localhost ([127.0.0.1]:54847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKPqZ-0006Rn-Jq for submit@debbugs.gnu.org; Thu, 11 Mar 2021 13:15:43 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:46762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lKPqX-0006Rf-Fi for submit@debbugs.gnu.org; Thu, 11 Mar 2021 13:15:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKPqX-0007Gl-9R for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 13:15:41 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:34519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKPqU-00042x-HB for bug-gnu-emacs@gnu.org; Thu, 11 Mar 2021 13:15:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1615486534; bh=IJCxnnLekIXIpSyD8dtDnnls1UqmSckreIZ1smxnGPI=; h=X-UI-Sender-Class:Date:From:To:Subject; b=Kwkad1iQ0b2Fby5S+9bWY8F8VLfExvOkcnNoItbXyu0iJU0XtBbYCQ2BwSE9wFCFS 9JoOFNG+TgPetv95rOMIHJXd5XdvJ2C7bXkhvnsZLVvZ5UtH2iWxlUnEVIByheK1js Bq+QmUlxG1P8wZij8/zpEciXbKWvQFxcL9a9FGsc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([70.19.86.82]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MYeR1-1lFgkI3T4V-00VdBZ for ; Thu, 11 Mar 2021 19:15:34 +0100 Content-Disposition: inline X-Provags-ID: V03:K1:zAFNOZ94XAx1jnd9Ed/90qhFjBKDIsRXfViQ4PyCSIZeQxOAVZd 0yAk172Oh8MEJWmtBzJjU9AkR/64nLDFiZMAjhzbuEkDz6zgse80Gez2oaiGfRDzW75+dTF Cf2A2yOVDnGtrn+6chIH8fj+jlP4AKAgCVmSsP6psMDpEy+ibcItyfMO2sFaDRdrxAd98BF Iv7dB1CMWBOqg/nRHvHFA== X-UI-Out-Filterresults: notjunk:1;V03:K0:+bP/1WrV5u4=:lbWFDs2oqBHMNAhd1quzyw ZJC41OC8WZp6G2NIzkszKxhbv0JfXLyO5JlYsA5zpPABQA3u8z8au/AT1yiIHo2v2hDvI/SiI j9SxniPzSDFTpG7Sm+xQ8Qz4SUt4A5k+xaRUBkmCBToohoGE+CfVWk6tyZRgMH89jnqtHPWt8 rCGtf64GYT0EqQNYy2+1pVY9Hnb7JwCWHTmnIZgiQsmWmObR6KXL7rEGv83HW7ZwquHk3uWCT XSNaT9hEZ2KuxImxDAF2HFzLK5xPWvUfoa4OcZvJT/ylcK/rYLurYOzXgn4qMTsvaqC3jP4m5 jhzmt84YIrgLWXArwkwQ3eLQkY7NnObHJ7ul9dCyUGkV43ClN4NTXW99qifsCWJ99uZfbwuJU tfZN/Fa6eQWphs1wK7Tp42l8w4+CawkfIjHd58/24S9xPZe921UYbIXVYPVHHM8Ak8JZvLJnb 8FHBVFQqE9Fdrp0jeEUrqHlDf4acdMRs0L2swYZaYzORPO7TdiUbNTAq6ahjZtV2hCZV4IqOn 9J6m6QPkptTnVJW1+E5OW4e9j2QaqADAR0aFjMJn/uwt+wld1ClktLvSDaWjbtz8A3jX9Merd 89Nny4UEFNg5o4DZ24e6vRKpwgXaqhXM2pS25x2R5sLapEXY2Xl/ikcxQYw3wjgKwmE/eGaqB sxXnKxd8BD5/n3zAscPpzJOly/dHKLUoMpd67zL6xfYEez8XQnh2BVnxgdLSttArGuq8poEyb IT2RTQUVZyvjiA/DSZXj8QfAis1NZ03OsGE8+HQLIjW6rRK2eHqyC01XsShRtEkohu/r8IxM Received-SPF: pass client-ip=212.227.17.20; envelope-from=boruch_baum@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:202086 Archived-At: Evaluating function `kill-buffer' for a modified file buffer leads to a prompt "foo modified, kill anyway (y or n)". Thus, for the common case of a user wanting to save and kill a modified buffer, the user must at this point perform three operations: respond no to the prompt, save the file, perform the kill-buffer operation a second time. It would be more convenient for the prompt to offer an option to 'save and kill' the buffer, so that no extra steps be required. I had wanted to offer a patch for this, but I couldn't find the elisp function that was directly causing the prompt. My guess is that it is directly called by the C source code for function kill-buffer, but I don't have the C source code available. If so, the idea would likely be to replace a call to y-or-n-p with a read-char loop, checking for (y Y n N s S). =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0