From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 04:46:47 2021 Received: (at submit) by debbugs.gnu.org; 4 Aug 2021 08:46:47 +0000 Received: from localhost ([127.0.0.1]:42709 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCY3-00075k-HT for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:46:47 -0400 Received: from lists.gnu.org ([209.51.188.17]:49466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCY2-00074W-5Q for submit@debbugs.gnu.org; Wed, 04 Aug 2021 04:46:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBCY1-0005vo-TX for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 04:46:45 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBCY0-0005ib-1a for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 04:46:45 -0400 Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DB7382000D for ; Wed, 4 Aug 2021 08:46:40 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Revert buffer? Yes/No/Maybe Organization: LINKOV.NET Date: Wed, 04 Aug 2021 11:45:18 +0300 Message-ID: <87im0la99d.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=juri@linkov.net; helo=relay7-d.mail.gandi.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, 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-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) There is a new short keybinding to revert the current buffer - just 3 keys: 'C-x x g'. But then it asks for a confirmation with 4 keys: 'y e s RET' that is even longer than the command keys. This defeats the purpose of having the short key sequence. Does 'C-x x g' really need a confirmation? I propose to revert the buffer immediately after typing 'C-x x g'. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 05:02:45 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 09:02:45 +0000 Received: from localhost ([127.0.0.1]:42745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCnV-0001to-9d for submit@debbugs.gnu.org; Wed, 04 Aug 2021 05:02:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCnT-0001q5-6v for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 05:02:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=w9/yA9dUh16DBHMNAcUrUH7c2ELc2Xr4hUgEAUIWWnU=; b=j0fuQWzNgWfoARjpogGO9GInOp 4ng2T3RBgZ1KMFW/cuZcNGpga6s9SHCnS4XoZ6OHFtdHL9HWg3jfltM2mY3ijdWeK+Kdr5LuTFw1t BQtEhoR4et3/TYJDiadg9EbgnkQByO/MUGq0q4sG0LQxT2XaAxa9DJcoksALZc5as3Sc=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBCnK-0005uE-LX; Wed, 04 Aug 2021 11:02:37 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> Date: Wed, 04 Aug 2021 11:02:34 +0200 In-Reply-To: <87im0la99d.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 04 Aug 2021 11:45:18 +0300") Message-ID: <87h7g5lh05.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > There is a new short keybinding to revert the current buffer - > just 3 keys: 'C-x x g'. But then it asks for a confirmation > with 4 keys: 'y e s RET' that is even longer than the command keys. > T [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: > There is a new short keybinding to revert the current buffer - > just 3 keys: 'C-x x g'. But then it asks for a confirmation > with 4 keys: 'y e s RET' that is even longer than the command keys. > This defeats the purpose of having the short key sequence. > Does 'C-x x g' really need a confirmation? > > I propose to revert the buffer immediately after typing 'C-x x g'. I think I agree... if the buffer hasn't been changed. So we could bind it to a new command, like revert-buffer-command, that would call revert-buffer with NOCONFIRM if the buffer hasn't been edited? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 05:03:18 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 09:03:18 +0000 Received: from localhost ([127.0.0.1]:42749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCo2-0001uw-Ic for submit@debbugs.gnu.org; Wed, 04 Aug 2021 05:03:18 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:55481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBCo0-0001un-BM for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 05:03:17 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Gfm4309X2z1s6D4; Wed, 4 Aug 2021 11:03:14 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Gfm424wCQz1qr03; Wed, 4 Aug 2021 11:03:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id IJYxZ3WgAsTo; Wed, 4 Aug 2021 11:03:13 +0200 (CEST) X-Auth-Info: Bg/4BgAyfteopmtBLc2p6SJr6yNGPGDSPE8Uw77IHWexBBX0PTyL7qEKevY3gCqX Received: from igel.home (ppp-46-244-185-37.dynamic.mnet-online.de [46.244.185.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 4 Aug 2021 11:03:13 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 73AA92C25FF; Wed, 4 Aug 2021 11:03:13 +0200 (CEST) From: Andreas Schwab To: Juri Linkov Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> X-Yow: CHUBBY CHECKER just had a CHICKEN SANDWICH in downtown DULUTH! Date: Wed, 04 Aug 2021 11:03:13 +0200 In-Reply-To: <87im0la99d.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 04 Aug 2021 11:45:18 +0300") Message-ID: <87mtpxwpim.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) On Aug 04 2021, Juri Linkov wrote: > There is a new short keybinding to revert the current buffer - > just 3 keys: 'C-x x g'. But then it asks for a confirmation > with 4 keys: 'y e s RET' that is even longer than the command keys. > This defeats the purpose of having the short key sequence. > Does 'C-x x g' really need a confirmation? I don't see why confirmation should depend on how the command is executed. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 06:06:39 2021 Received: (at submit) by debbugs.gnu.org; 4 Aug 2021 10:06:39 +0000 Received: from localhost ([127.0.0.1]:42793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBDnH-0003RG-Ht for submit@debbugs.gnu.org; Wed, 04 Aug 2021 06:06:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:34530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBDn1-0003Qk-2x for submit@debbugs.gnu.org; Wed, 04 Aug 2021 06:06:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBDn0-0002iS-SY for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 06:06:18 -0400 Received: from heytings.org ([95.142.160.155]:39056) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBDmz-0002fz-4g for bug-gnu-emacs@gnu.org; Wed, 04 Aug 2021 06:06:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1628071573; bh=I16QUiIMYl7t+J78kRSFTBPdfNICkLgdppcxshLstN8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=Zfi/p5uFALrjGOUwgjItdyJm21Bp8GzKL7/ZEP3cERXnFvQQK6uboh63/3LZJI4Al vO8OJIHLn+86xWa4JuaL2XdtKy0I/8OF7Wk3SyI/Q2NfLB+LoQowdLISYJsrXswQSy HTUi/hMLoihpjFmd0Wr5QYYLYs8S4J/9c2+rnzMbII+cIlyxTud6dz6jCwm1BYKlX5 lpABJgPPGc3kTrEiYlGrsSusKuiw9vHOirS3YU7KzazFpmfqH5fEMEeGcy1k005rQa b21w6NJQvirIYo5Wuy3KmBgFsdxqROzYBxIonoSDMULQGa9e7beoGKCcYLanVPlcaD LidC+4ImhhDrA== Date: Wed, 04 Aug 2021 10:06:12 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe In-Reply-To: <87h7g5lh05.fsf@gnus.org> Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <87h7g5lh05.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: bug-gnu-emacs@gnu.org, 49869@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) >> There is a new short keybinding to revert the current buffer - just 3 >> keys: 'C-x x g'. But then it asks for a confirmation with 4 keys: 'y e >> s RET' that is even longer than the command keys. This defeats the >> purpose of having the short key sequence. Does 'C-x x g' really need a >> confirmation? >> >> I propose to revert the buffer immediately after typing 'C-x x g'. > > I think I agree... if the buffer hasn't been changed. So we could bind > it to a new command, like revert-buffer-command, that would call > revert-buffer with NOCONFIRM if the buffer hasn't been edited? > What about: (defun revert-buffer-short-confirm (&optional args) (interactive (list (not current-prefix-arg))) (cl-letf (((symbol-function 'yes-or-no-p) 'y-or-n-p)) (revert-buffer args))) (global-set-key (kbd "C-x x g") 'revert-buffer-short-confirm) ? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 08:06:00 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 12:06:00 +0000 Received: from localhost ([127.0.0.1]:43004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFeq-0002cC-GO for submit@debbugs.gnu.org; Wed, 04 Aug 2021 08:06:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFep-0002bt-5C for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 08:05:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56756) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBFej-0006Hj-Gz; Wed, 04 Aug 2021 08:05:53 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1093 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBFei-0007C3-Ry; Wed, 04 Aug 2021 08:05:53 -0400 Date: Wed, 04 Aug 2021 15:05:44 +0300 Message-Id: <83pmutl8iv.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87im0la99d.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 04 Aug 2021 11:45:18 +0300) Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Wed, 04 Aug 2021 11:45:18 +0300 > > There is a new short keybinding to revert the current buffer - > just 3 keys: 'C-x x g'. But then it asks for a confirmation > with 4 keys: 'y e s RET' that is even longer than the command keys. > This defeats the purpose of having the short key sequence. > Does 'C-x x g' really need a confirmation? It's quite a drastic measure, so I think it does need a confirmation. E.g., if the changes you revert exceed the value of undo-limit, you could really lose your edits. Since we now have the use-short-answers option, why is it a problem to have to confirm, if you could make it a single key? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 08:22:13 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 12:22:13 +0000 Received: from localhost ([127.0.0.1]:43014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFuX-000301-4r for submit@debbugs.gnu.org; Wed, 04 Aug 2021 08:22:13 -0400 Received: from heytings.org ([95.142.160.155]:35386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFuV-0002zs-13 for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 08:22:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1628079729; bh=+a+k2FcIe14KYrY5gJv1X5n+3aKYAcHgRYEgLSlkUQU=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=tJ763LBY64Mhfi9I0pcanwTSEwKBQDCfnB7AuyqLqg0exhHJxbywFLn525mk3hS4B SmD98kXs34tDWEByZZahjvKPihvzBY9Nrkr9+Ps2b2+GipURhI4hlAb7ChL7+XUgGK PEEGr7xi18E+1j3txuOxNU4xgNovIukX5JledQHwFyykr86H+EAGw7RKmskzxWqXYb BjLEkyEwQeVkgwoa7OHXOcUihV6mhEg8Vg/xtksz3LKga1QFxbWahMsuWKJuZM0cGe nZBTy6z5MEzGZ3UiOlSFWaPe4+8noqkuSLmtE03Vv/tyfqh3eEEHkYLu623D4c1k1q hlBgkmYyfszrg== Date: Wed, 04 Aug 2021 12:22:09 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe In-Reply-To: <83pmutl8iv.fsf@gnu.org> Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> There is a new short keybinding to revert the current buffer - just 3 >> keys: 'C-x x g'. But then it asks for a confirmation with 4 keys: 'y e >> s RET' that is even longer than the command keys. This defeats the >> purpose of having the short key sequence. Does 'C-x x g' really need a >> confirmation? > > It's quite a drastic measure, so I think it does need a confirmation. > E.g., if the changes you revert exceed the value of undo-limit, you > could really lose your edits. > > Since we now have the use-short-answers option, why is it a problem to > have to confirm, if you could make it a single key? > I had forgotten about use-short-answers, it makes the proposed solution even shorter: (defun revert-buffer-short-answer (&optional args) (interactive (list (not current-prefix-arg))) (let ((use-short-answers t)) (revert-buffer args))) (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 08:24:08 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 12:24:08 +0000 Received: from localhost ([127.0.0.1]:43018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFwO-000330-Ga for submit@debbugs.gnu.org; Wed, 04 Aug 2021 08:24:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBFwN-00032m-GV for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 08:24:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57590) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBFwI-00055Y-1d; Wed, 04 Aug 2021 08:24:02 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2234 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBFwH-000120-53; Wed, 04 Aug 2021 08:24:01 -0400 Date: Wed, 04 Aug 2021 15:23:57 +0300 Message-Id: <83im0ll7oi.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Wed, 04 Aug 2021 12:22:09 +0000) Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 04 Aug 2021 12:22:09 +0000 > From: Gregory Heytings > cc: Juri Linkov , 49869@debbugs.gnu.org > > (defun revert-buffer-short-answer (&optional args) > (interactive (list (not current-prefix-arg))) > (let ((use-short-answers t)) > (revert-buffer args))) > > (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) If you propose this as something people who want this could do in their init files, then I agree. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 08:37:46 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 12:37:46 +0000 Received: from localhost ([127.0.0.1]:43072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBG9a-0003RE-2T for submit@debbugs.gnu.org; Wed, 04 Aug 2021 08:37:46 -0400 Received: from heytings.org ([95.142.160.155]:35412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBG9Y-0003R6-L2 for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 08:37:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1628080663; bh=wOYGf20KUVMcWsQHlaZAy6qiZl4XzHjldIi+rpEUinA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=iUADksZO4YPmz0s7sY9H+qQbR3F1XKC2XEFQUEsz3tGE2HUByrrEM1w/fag4ZebId SicjMB/lwpxUpuxjylmGWMwoGi4+abc3TX5SWlNHdrQaPxZC3Ro5o32PN3oXyXpcL3 hoLJ3zO8LZjTzqG8p8DHHlAhHWq8exS0M6AO8a/a8vnmkXs1+gtBCmvZNo3iB1y9lO +M47POdYcYak22M+0MNJoQpAqd2KBpFlF8JDSKMl0pC1DA1PRWM2ET577XYuc3kkzD ynMxYz+QQNBDiF/UfwZ2KvQy2e7jazjsNZ3Ddzr8zUpn6Z3VwLlgyx6+RW5DyP5lDr JVzpk7LVuRr+w== Date: Wed, 04 Aug 2021 12:37:43 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe In-Reply-To: <83im0ll7oi.fsf@gnu.org> Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> (defun revert-buffer-short-answer (&optional args) >> (interactive (list (not current-prefix-arg))) >> (let ((use-short-answers t)) >> (revert-buffer args))) >> >> (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) > > If you propose this as something people who want this could do in their > init files, then I agree. > No, I propose this as a solution to Juri's problem, instead of his proposed solution to "revert the buffer immediately" with C-x x g, which is indeed too drastic. Something even better to take Lars' suggestion (do not ask confirmation when the buffer has not been modified) into account: (defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes) (interactive (list (not current-prefix-arg))) (let ((use-short-answers t) (noconfirm (not (buffer-modified-p)))) (revert-buffer ignore-auto noconfirm preserve-modes))) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 08:54:10 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 12:54:10 +0000 Received: from localhost ([127.0.0.1]:43082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBGPR-0003sO-PC for submit@debbugs.gnu.org; Wed, 04 Aug 2021 08:54:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBGPP-0003s8-PB for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 08:54:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58230) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBGPJ-0000zV-PT; Wed, 04 Aug 2021 08:54:01 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4223 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBGPI-0005Ca-Fv; Wed, 04 Aug 2021 08:54:01 -0400 Date: Wed, 04 Aug 2021 15:53:54 +0300 Message-Id: <83h7g5l6al.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: (message from Gregory Heytings on Wed, 04 Aug 2021 12:37:43 +0000) Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 04 Aug 2021 12:37:43 +0000 > From: Gregory Heytings > cc: juri@linkov.net, 49869@debbugs.gnu.org > > >> (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) > > > > If you propose this as something people who want this could do in their > > init files, then I agree. > > > > No, I propose this as a solution to Juri's problem, instead of his > proposed solution to "revert the buffer immediately" with C-x x g, which > is indeed too drastic. Something even better to take Lars' suggestion (do > not ask confirmation when the buffer has not been modified) into account: I don't think we need to cater to personal preferences by adding new commands. The user option exists so that users could customize the behavior to their liking without requiring us to provide a solution for every personal taste. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 09:30:49 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 13:30:49 +0000 Received: from localhost ([127.0.0.1]:43109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBGyu-00050Y-VZ for submit@debbugs.gnu.org; Wed, 04 Aug 2021 09:30:49 -0400 Received: from heytings.org ([95.142.160.155]:35476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBGys-00050M-HA for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 09:30:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1628083844; bh=0t6A8z5QL1jUQmpCbCCunp7iktCKyOCYB5tA3xg+8Rc=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=gDNtCVzNq1jjGvpAFxYd/xqZgnwYlvju5gT3cBdfu8uoI7DZ2n+Kbm1ev6wQvbECn xImqPS2zXfxoE08HLoOGx4/QCzBXbOgw/MLmvlNv3QBZ5LrTryAyHDaSZmvg2QY4ZI 6CVpCCLpMLvpQ6R7ZErNXltSFUVFunm5JUyBBOlSFDe2Cv03nQaIXBHYx46f7dEjZr FyqY+I2NpxRSHfMqx5PljaTHxNQrLi9tMYERw32i5SMKEXSinprDxv9r75o1U4lzLi FLHVsYmmliBGGVHNa2fTiLM2jQc4JVTUOQ0VMjuYsJ4BW4LyC6gTjL0e4SiLj+CfS7 ujxVvRmUKXNlg== Date: Wed, 04 Aug 2021 13:30:44 +0000 From: Gregory Heytings To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe In-Reply-To: <83h7g5l6al.fsf@gnu.org> Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> No, I propose this as a solution to Juri's problem, instead of his >> proposed solution to "revert the buffer immediately" with C-x x g, >> which is indeed too drastic. Something even better to take Lars' >> suggestion (do not ask confirmation when the buffer has not been >> modified) into account: > > I don't think we need to cater to personal preferences by adding new > commands. The user option exists so that users could customize the > behavior to their liking without requiring us to provide a solution for > every personal taste. > I don't know. I did not ask for this, but Juri's remark (that with a default configuration the confirmation uses more keystrokes than the command itself) makes sense to me. And setting the user option has a global effect, not just on this particular command. But it's up to the maintainers to decide what's the right way to go. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 04 17:00:07 2021 Received: (at 49869) by debbugs.gnu.org; 4 Aug 2021 21:00:07 +0000 Received: from localhost ([127.0.0.1]:45269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBNzj-0001yl-3v for submit@debbugs.gnu.org; Wed, 04 Aug 2021 17:00:07 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:55873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBNzh-0001wo-1r for 49869@debbugs.gnu.org; Wed, 04 Aug 2021 17:00:05 -0400 Received: (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id E8E95C0004; Wed, 4 Aug 2021 20:59:57 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe Organization: LINKOV.NET References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> Date: Wed, 04 Aug 2021 23:43:43 +0300 In-Reply-To: <83pmutl8iv.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 Aug 2021 15:05:44 +0300") Message-ID: <87lf5h53u0.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Since we now have the use-short-answers option, why is it a problem to > have to confirm, if you could make it a single key? The problem is that by default the length of the key sequence when the user decides to revert the current buffer is 7 keys: 'C-x x g y e s RET' With the patch provided by Gregory the default length will be reduced to 4 keys: 'C-x x g y' or to 3 keys when there are no unsaved changes. The yes/no question is still asked when revert-buffer is called automatically - that makes sense. But when the user decided to revert the buffer explicitly, why require to type more keys? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 01:48:58 2021 Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 05:48:58 +0000 Received: from localhost ([127.0.0.1]:45650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWFV-0006nP-Pq for submit@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWFU-0006nC-5Y for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55756) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWFO-00010N-J7; Thu, 05 Aug 2021 01:48:50 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3188 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWFO-0000Fw-6d; Thu, 05 Aug 2021 01:48:50 -0400 Date: Thu, 05 Aug 2021 08:48:49 +0300 Message-Id: <83wnp0jvb2.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87lf5h53u0.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 04 Aug 2021 23:43:43 +0300) Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <87lf5h53u0.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 49869@debbugs.gnu.org > Date: Wed, 04 Aug 2021 23:43:43 +0300 > > > Since we now have the use-short-answers option, why is it a problem to > > have to confirm, if you could make it a single key? > > The problem is that by default the length of the key sequence > when the user decides to revert the current buffer > is 7 keys: > > 'C-x x g y e s RET' > > With the patch provided by Gregory the default length > will be reduced to 4 keys: > > 'C-x x g y' > > or to 3 keys when there are no unsaved changes. First, you can have those 4 keys if you customize use-short-answers; no changes in Emacs are necessary. And second, are you talking only about reverting when there are no unsaved changes? If so, what are the use cases when you need to do such a thing, and why? Perhaps such use cases justify a separate command and key binding, like "C-x RET r" does for one such use case. > But when the user decided to revert the buffer explicitly, > why require to type more keys? In general, when there are unsaved changes? To let the user think one last time before doing something potentially very destructive. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 06:43:46 2021 Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 10:43:46 +0000 Received: from localhost ([127.0.0.1]:45992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBaqn-0005mU-Rd for submit@debbugs.gnu.org; Thu, 05 Aug 2021 06:43:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBaqm-0005mG-9J for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 06:43:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jE8P2efZ3/gc8Q6xUi9V6lEOQ/4A6ZWEvOWJZqeQiV0=; b=LICGC3Fi2gmoORhl/Tp7smraHd pkZNY07fIHYPjULohJE0SdtN57YYxkSoru6RJ6mqwvQgEQ2vDjpHer5MDWVRyNYk8ROMn0ZgNW4jP iGDqDi04JtxUkdwI1K3XjNYTYoTCk/0jSMo8RCDLCj438PRq/ymaRPUPulnG0hPx01XA=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBaqc-0002dq-Hn; Thu, 05 Aug 2021 12:43:37 +0200 From: Lars Ingebrigtsen To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> Date: Thu, 05 Aug 2021 12:43:34 +0200 In-Reply-To: <83h7g5l6al.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 Aug 2021 15:53:54 +0300") Message-ID: <87v94ki33d.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > I don't think we need to cater to personal preferences by adding new > commands. The `C-x x g' binding is new in Emacs 28, and we can bind it to a command that we thing is a good one. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: Gregory Heytings , juri@linkov.net, 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > I don't think we need to cater to personal preferences by adding new > commands. The `C-x x g' binding is new in Emacs 28, and we can bind it to a command that we thing is a good one. Eli Zaretskii writes: > And second, are you talking only about reverting when there are no > unsaved changes? If so, what are the use cases when you need to do > such a thing, and why? When a file changes outside of Emacs. It happens a lot, especially after doing "git pull". But... looking at how Emacs handles this in other similar commands, I'm not convinced that the `y e s RET' is excessive in `C-x x g': For instance, if you `C-x C-f M-n RET' (which was the previous way to revert the buffer (but didn't work reliably because of DWIM)), it'll also ask you to type `y e s RET' afterwards. So for user interface consistency, I think it might make sense to leave `C-x x g' as is -- at least in the default case. Perhaps there should be a user option to customise the level of prompting here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 07:08:16 2021 Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 11:08:16 +0000 Received: from localhost ([127.0.0.1]:46060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBbEW-0006Qz-4G for submit@debbugs.gnu.org; Thu, 05 Aug 2021 07:08:16 -0400 Received: from heytings.org ([95.142.160.155]:36552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBbET-0006Qq-U3 for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 07:08:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1628161692; bh=D/eJfcqpy8x1Nbt8wrXAvvIx/GnOLbGad1g1k36g2eA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=ZRQTirDHgg6WHofUQ4Drk/V3JL1kwIW1NCTm6fqF36/VUEQPmNpE27gf6HZVKYw68 Lqxgl7KvBlV0R/KCRrKlGbhopW49CekZj6BLbXQdxamSkHKDV0/BtD25KolR5SrTBt m/WU2YA0wlh8vcQZ04UKho8Y8uwrmUq0bYLI7yMl+5Rp3UM7b1TCevV4M6H+9/mTpy CKVXDeKe1MoiYf5K9SW1zPjFlcvcWPEk4/eBSw1syEvz/xWlsqvkScsAy8LK24sgey UcPVf7RUnkWDF+LD5FUUieaLKA9z81m3JUuP1VIDC7f6fYlDr7I0hMT9dLmc8lXYJO H6w/fPFyNzJJA== Date: Thu, 05 Aug 2021 11:08:12 +0000 From: Gregory Heytings To: Lars Ingebrigtsen Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe In-Reply-To: <87v94ki33d.fsf@gnus.org> Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> <87v94ki33d.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 49869 Cc: Eli Zaretskii , juri@linkov.net, 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > Perhaps there should be a user option to customise the level of > prompting here. > Like this: (defcustom revert-buffer-short-answer nil "") (defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes) (interactive (list (not current-prefix-arg))) (if revert-buffer-short-answer (let ((use-short-answers t) (noconfirm (not (buffer-modified-p)))) (revert-buffer ignore-auto noconfirm preserve-modes)) (revert-buffer ignore-auto noconfirm preserve-modes))) (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) ? From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 05 19:40:50 2021 Received: (at 49869) by debbugs.gnu.org; 5 Aug 2021 23:40:50 +0000 Received: from localhost ([127.0.0.1]:48631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBmyo-0000mN-E8 for submit@debbugs.gnu.org; Thu, 05 Aug 2021 19:40:50 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:39919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBmym-0000m8-Ph for 49869@debbugs.gnu.org; Thu, 05 Aug 2021 19:40:49 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id E9AB5100002; Thu, 5 Aug 2021 23:40:41 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe Organization: LINKOV.NET References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <87lf5h53u0.fsf@mail.linkov.net> <83wnp0jvb2.fsf@gnu.org> Date: Fri, 06 Aug 2021 02:33:55 +0300 In-Reply-To: <83wnp0jvb2.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Aug 2021 08:48:49 +0300") Message-ID: <87bl6bcw6s.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> The problem is that by default the length of the key sequence >> when the user decides to revert the current buffer >> is 7 keys: >> >> 'C-x x g y e s RET' >> >> With the patch provided by Gregory the default length >> will be reduced to 4 keys: >> >> 'C-x x g y' >> >> or to 3 keys when there are no unsaved changes. > > First, you can have those 4 keys if you customize use-short-answers; > no changes in Emacs are necessary. > > And second, are you talking only about reverting when there are no > unsaved changes? If so, what are the use cases when you need to do > such a thing, and why? Perhaps such use cases justify a separate > command and key binding, like "C-x RET r" does for one such use case. I discovered this problem while editing source code in one Emacs instance, and updating the source file in `emacs -Q`. To get an updated version of the file in `emacs -Q` required typing 4 more keys after every revert. >> But when the user decided to revert the buffer explicitly, >> why require to type more keys? > > In general, when there are unsaved changes? To let the user think one > last time before doing something potentially very destructive. The question was why require typing more keys when there are no unsaved changes. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 02:20:10 2021 Received: (at 49869) by debbugs.gnu.org; 6 Aug 2021 06:20:10 +0000 Received: from localhost ([127.0.0.1]:48932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBtDG-0004Tm-1o for submit@debbugs.gnu.org; Fri, 06 Aug 2021 02:20:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBtDE-0004TX-Oh for 49869@debbugs.gnu.org; Fri, 06 Aug 2021 02:20:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37902) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBtD9-0003ti-8u; Fri, 06 Aug 2021 02:20:03 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2622 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBtD8-0002FH-TF; Fri, 06 Aug 2021 02:20:03 -0400 Date: Fri, 06 Aug 2021 09:20:03 +0300 Message-Id: <83tuk3hz70.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87bl6bcw6s.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 06 Aug 2021 02:33:55 +0300) Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <87lf5h53u0.fsf@mail.linkov.net> <83wnp0jvb2.fsf@gnu.org> <87bl6bcw6s.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: 49869@debbugs.gnu.org > Date: Fri, 06 Aug 2021 02:33:55 +0300 > > > And second, are you talking only about reverting when there are no > > unsaved changes? If so, what are the use cases when you need to do > > such a thing, and why? Perhaps such use cases justify a separate > > command and key binding, like "C-x RET r" does for one such use case. > > I discovered this problem while editing source code in one > Emacs instance, and updating the source file in `emacs -Q`. > To get an updated version of the file in `emacs -Q` required > typing 4 more keys after every revert. If this is a frequent use case, we could have a separate command for it. > >> But when the user decided to revert the buffer explicitly, > >> why require to type more keys? > > > > In general, when there are unsaved changes? To let the user think one > > last time before doing something potentially very destructive. > > The question was why require typing more keys > when there are no unsaved changes. In the use case you described, depending on the situation, you could still be in danger of losing important parts of the buffer text, even though you have no unsaved changes. E.g., imagine that for some reason the file on disk is empty or omits most of your current buffer contents. Wouldn't you in general want at least the check for size differences between the two, with a request for confirmation if the sizes differ too much? And maybe also time stamp differences? IOW, this use case seems to really call for a separate command with a separate logic. If we provide such a command, then perhaps we could make it omit the confirmation prompt when invoked with C-u, for those cases where you know in advance you want to revert unconditionally, for example if it was you who made the external changes just now. But I don't think it makes sense to tweak the general-purpose revert-buffer command in this direction, as revert-buffer supports many other use cases, where this kind of shortcut could produce disastrous results. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 06 05:21:15 2021 Received: (at 49869) by debbugs.gnu.org; 6 Aug 2021 09:21:15 +0000 Received: from localhost ([127.0.0.1]:49079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBw2U-0003Gl-WF for submit@debbugs.gnu.org; Fri, 06 Aug 2021 05:21:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:34918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBw2T-0003GS-Jz for 49869@debbugs.gnu.org; Fri, 06 Aug 2021 05:21:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yKq9OXJ+K3CPchCBchTs8o4n2iXGPedDPkS1KQeQAGk=; b=K7oh3xtgP1QQX3QcadqgQrlFjS aC9R2VPGUYKVj7zxLxPOcvEev6UyCx02Azx28hjwgiPp+R5WYGmt7mV6tlokQIz7oStyiwhhnftmq OwDkGI7hVRlY0uyRfHy0PlkmKXVOci9jil3fDdTTINXtF0Kc+ANuTIGu25GYHELWLu8U=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBw2J-0001q9-T3; Fri, 06 Aug 2021 11:21:06 +0200 From: Lars Ingebrigtsen To: Gregory Heytings Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> <87v94ki33d.fsf@gnus.org> Date: Fri, 06 Aug 2021 11:21:03 +0200 In-Reply-To: (Gregory Heytings's message of "Thu, 05 Aug 2021 11:08:12 +0000") Message-ID: <877dgzc4jk.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gregory Heytings writes: > Like this: > > (defcustom revert-buffer-short-answer nil "") > > (defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes) > (interactive (list (not current-prefix-arg))) > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: Eli Zaretskii , juri@linkov.net, 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Gregory Heytings writes: > Like this: > > (defcustom revert-buffer-short-answer nil "") > > (defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes) > (interactive (list (not current-prefix-arg))) > (if revert-buffer-short-answer > (let ((use-short-answers t) > (noconfirm (not (buffer-modified-p)))) > (revert-buffer ignore-auto noconfirm preserve-modes)) > (revert-buffer ignore-auto noconfirm preserve-modes))) > > (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) Yes, something like that looks pretty nice. But probably under a different name (at least for the user option) to avoid confusion with the `revert-buffer' command. Uhm... I have no ideas. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 03:24:24 2021 Received: (at 49869) by debbugs.gnu.org; 10 Aug 2021 07:24:25 +0000 Received: from localhost ([127.0.0.1]:58331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDM7c-0003nb-Oo for submit@debbugs.gnu.org; Tue, 10 Aug 2021 03:24:24 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:35333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDM7a-0003mw-ML for 49869@debbugs.gnu.org; Tue, 10 Aug 2021 03:24:23 -0400 Received: (Authenticated sender: juri@linkov.net) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 25CED100005; Tue, 10 Aug 2021 07:24:14 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe Organization: LINKOV.NET References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> <87v94ki33d.fsf@gnus.org> <877dgzc4jk.fsf@gnus.org> Date: Tue, 10 Aug 2021 10:12:29 +0300 In-Reply-To: <877dgzc4jk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 06 Aug 2021 11:21:03 +0200") Message-ID: <87k0kucbt2.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49869 Cc: Gregory Heytings , Eli Zaretskii , 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> (defcustom revert-buffer-short-answer nil "") >> >> (defun revert-buffer-short-answer (&optional ignore-auto noconfirm preserve-modes) >> (interactive (list (not current-prefix-arg))) >> (if revert-buffer-short-answer >> (let ((use-short-answers t) >> (noconfirm (not (buffer-modified-p)))) >> (revert-buffer ignore-auto noconfirm preserve-modes)) >> (revert-buffer ignore-auto noconfirm preserve-modes))) >> >> (global-set-key (kbd "C-x x g") 'revert-buffer-short-answer) > > Yes, something like that looks pretty nice. But probably under a > different name (at least for the user option) to avoid confusion with > the `revert-buffer' command. > > Uhm... I have no ideas. :-) Maybe revert-buffer-quick? From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 10:40:16 2021 Received: (at 49869) by debbugs.gnu.org; 10 Aug 2021 14:40:16 +0000 Received: from localhost ([127.0.0.1]:60245 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSvQ-0002QU-0q for submit@debbugs.gnu.org; Tue, 10 Aug 2021 10:40:16 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:5922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSvN-0002QK-Nj for 49869@debbugs.gnu.org; Tue, 10 Aug 2021 10:40:15 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17AEbiSi025454; Tue, 10 Aug 2021 14:40:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=fl2C6CQrNub3RUUwMvV11VH+y+qrcFjsn9sZwIJuFNI=; b=y+ts1hMCTEXvWVxk6aaGZoq6x7b+aK5DGYkf68zo678+Si816lH/Yearz0b1ttgSD+h9 D+CheoLRA739M/+p2Lbf3QCHaoSf8YpIex7jpsj9ic37GrFaDWW5LCJW4UzZkRq8fibW lsHAXngBBTwjt63kXhjaFhbkAHOGvOAj+CYT6Plq40nduuWNzpfi0wfd9JPaEHAW8lC2 hHn6RnvxlwlV5wLgY7Nxa6HMxj52/rLXcghPw7p7TjfRFVX5BFF1cYPHL8mZn1t9d93m piA5D1psu0rTUuz4DVcnhJ6na0rXdljE6ZVjdJvRqn8q3DqMt3IE/HfnsW98vnJFMKrv aQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=fl2C6CQrNub3RUUwMvV11VH+y+qrcFjsn9sZwIJuFNI=; b=agcItNBUOsUIC476rcouHdrdPqG8t1hqkDKI0ziHnO+JejLN0Y0wA/19UdEZrYVKkyz/ DUyDkjuLibogpaXYhOnN34suxdHh+742/UbmRcVT3qB079eP5UCIKnXvjoJTwgzuYkX/ 5hzsJVkrtlxZGZJ4GRC54BnK/vWjVS9yMeLN3/kFJDY1Vz4ThcYyWGKh6fjqYikrEgJ4 YSyvCH0s5H0Z0aADZB5BjRMzEaHd42DO3/UG07IUet+K2oZegbOAKKVpbbUn15EZCInf cnTXpuGFq2FZOlXyycrcfccAv80NsHDGWHYe5dKc8/MHwgbOQGHpkAwv12i8cukNXAgL UQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3aay0fv16y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Aug 2021 14:40:12 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 17AEa7el093230; Tue, 10 Aug 2021 14:40:11 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2177.outbound.protection.outlook.com [104.47.59.177]) by userp3030.oracle.com with ESMTP id 3abjw4hb0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Aug 2021 14:40:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nB2hLLw9VzsBhyPf1/lWEWOKONy65xVhuD78PzYoViLJS6+XUvh0S5zs9QsLW0Tosd+fUZzJi6yLyjIdG4byMqruky4M27sxbQsxgWGpHj8oYGEqwHqSb94+PzEY8+mO0p27nezwihbt1vEEbYRDvMgFbtMV4Tm6k/a/wMrGEBPwqb+OYi5l+bhPOtsk1RH6OzcBBFciJjGh+cfGRgn8rsVKXH2QoGRslZNXISsoLBq5IHJayoMlTiRpnX0ewux4ooOR24XULBdCp687vnP9T0oVRGEMfXNuYMBb3SajOPAbY80blAnpfBQPBvbsbhcF3UHerojlw1d6O7R2dLl5qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fl2C6CQrNub3RUUwMvV11VH+y+qrcFjsn9sZwIJuFNI=; b=ZL0/EPGsNysVjfcZ2DnAP0ODAw5/DOBoYfhOOC2poS1rBaJu7ITr8sBWi4YoxVpVjZqAxVlvyc6OKP6/6BNoMdZEGtaJG8mk6hw1mzRW8KcQF2XhHMkDuULgsNOjki8Xu8DR0iyB6e638pfVPj+NMf8OiEj2qzVWnL7qDENiqTlYAjkBlYiwpgIG5JaxNcef4pmD90WRG5awx54V9TIRfI1DCFddkVAtHQuv6tOi2nSllYhr167ylBQRl4VPJHPk90wcU2+8dfmAoEKDdDNCyySY463TEl3w3F8EyQZXupnJ5rEq528NdwoSzorQGp4nC8V77AwdUZlqlOwIuvuDsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fl2C6CQrNub3RUUwMvV11VH+y+qrcFjsn9sZwIJuFNI=; b=a+8/wfozXpn7YvPXRO5+R4YYt4/SHDs4UGrYMC8HpTqif2mlxpfeAcRJFtNrRl+pJIZAIt22YK+3ilyoisQiLtrgESNHJ4nVuCXrCb5YQjJHl6Dfzr+PvXHv5/a6TzSK44JvRmuTUaQ70S9hQB1wuL1r2HhGKSJ/MN6PHuVN34o= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3719.namprd10.prod.outlook.com (2603:10b6:a03:122::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.17; Tue, 10 Aug 2021 14:40:09 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a59e:fa26:ffe4:615b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a59e:fa26:ffe4:615b%3]) with mapi id 15.20.4394.023; Tue, 10 Aug 2021 14:40:09 +0000 From: Drew Adams To: Juri Linkov , Lars Ingebrigtsen Subject: RE: [External] : bug#49869: Revert buffer? Yes/No/Maybe Thread-Topic: [External] : bug#49869: Revert buffer? Yes/No/Maybe Thread-Index: AQHXjbj6eoGxddFeLkKH7kJZ8h0p66tszrBw Date: Tue, 10 Aug 2021 14:40:08 +0000 Message-ID: References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> <87v94ki33d.fsf@gnus.org> <877dgzc4jk.fsf@gnus.org> <87k0kucbt2.fsf@mail.linkov.net> In-Reply-To: <87k0kucbt2.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linkov.net; dkim=none (message not signed) header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 854944df-9446-4d38-2c42-08d95c0cc098 x-ms-traffictypediagnostic: BYAPR10MB3719: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: //4MLA7FLJ08xlMUyp90CZU+ZP9ro6h/TGUwmNxeaUcm9pKVBhPtUJ54Lu5wDnZ8TwWIXK3ZG+LVihbIw5dEq/Ohk9ax8KdIJFOHGsM6k4IIBN7KNibfNHFk5133M8YK7vpfVhx2VorFnz//5C54T19bRn1s3zJMXHA7Z+RVZQb+cu1cLJ0i/OsbY6jBktVUk2z6/2mVgEjSvx5dgtfMhO6n8rvX0ivaD8fdMTHgSe7EqWX6zo/NfoBj+mThlbofj1w770WVwEfH5kw//2d6sRVWzzKvY1siruYSMVGKrom4hf22dypW+xUmFOUy879K6Nzdwd/wnFsLJ2b4p05f6oPcxDcy0dRxkczN/+y9IKPnenCXDnXAT3UldzbA8M4frAAt9+Hi/OFwJIJzFtVPqYmGvHM5RX1BnBe/AuVXC810jQTupCnoUHox/59X5HF17RXHz40greNZlwTjQx9xClr5tUTtcSUdP2jXET0os9WsGV13SRL5xndFIzroU9ePPpw+mdtow0EMIKh0ME8V+3RmXGqCqnecd0mUnyGum5UjG4w/L9gpsWOJM9pSmWXOn+31rZXhTs2js9pxnwwFjr/ABaZhqIEB2ygINDVLu8td2qGDXXYH+VtY2cguzAvW6laWEqSgBXjV63361JA5KjPddDLorJS0yv/Wfn1JEvFYeAealXqo8B80Lo1uPqfaAJaw3UJuDmrSY9r2cVsdDA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(346002)(136003)(396003)(366004)(376002)(2906002)(110136005)(4744005)(76116006)(33656002)(26005)(66946007)(9686003)(6506007)(54906003)(83380400001)(186003)(55016002)(8676002)(8936002)(316002)(478600001)(52536014)(5660300002)(71200400001)(44832011)(38100700002)(4326008)(7696005)(66446008)(86362001)(64756008)(66556008)(66476007)(122000001)(38070700005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vHviDO8hyE+f/pkSWssY7oRkE8u4E/LwXN0BD4C8WDAxI1dsIcC7RRNn1D3z?= =?us-ascii?Q?71rRnsa2kA4uxwTU3tjP2E2E1sjBNimmOiiZ1AjG5Gx+vy7bmCJ7ClPEAJaA?= =?us-ascii?Q?IWMf1OntcFV8Bdx5UYH0ynINbU0MZtD9EA3SSygueiczdRwuQmyqJj9Ls/uJ?= =?us-ascii?Q?b61LzxDf4ecBy50xb7hCp7yJbljLGXrZBTjV/ApZwcNitm8AEZwBtJpQ0xxP?= =?us-ascii?Q?Ir0A4nj3p5nI8KLAJHtgPQANwGY+V2uNKwzH9kJ/9P/Kqm5F3E0fg7v3dnre?= =?us-ascii?Q?JHEnh0UBetIeZWBCb7bUuZ2hMYCkDSg8A7d5gb0H52NYqcRApYbLpudo/r4R?= =?us-ascii?Q?/jtD4aEl7M7tK/sNYaCm0eDU8EWyhQlL5g9CfdUmi/iWQLFYUxuqvHepxDaQ?= =?us-ascii?Q?lNKQYB6aaiIIO1a6Xisns6f7wy19P7Ya1VrYlGVzbTwx1Bj5pJO3yhwmGTjE?= =?us-ascii?Q?bjeMD02fm0J6SY0mrKtX7oqCMnEcTgONKoA02S2q0ymWaHCfqfPzU1+nbdVs?= =?us-ascii?Q?hXFkLWkOf+5MoWPXhQ5o6d7Aq2L0cW5eDdzrzebpiKIwZUP/XB9eMfIJnPzB?= =?us-ascii?Q?7yTyHTfYTQxB6Tgl48lpvuoGO323teuPte0gyLvIF9rOv2dzWXcs7adQQYNh?= =?us-ascii?Q?DihBsnpd8TaHycHmNNKT5jx6c0p4aZrdexEzFNyb0bQPHRBxZEaOAmsYDj45?= =?us-ascii?Q?p0A2jKeTaOqSozm6Mi5+81rRkdQDHigXTPbgfI19LDrg27SnDUKfVQmUsfYP?= =?us-ascii?Q?Jz9okEH1dkaRH3hCqNnLv7lHLCS4ykl2xNuyGUHIrOQspsJrfBFPJCDa9AVx?= =?us-ascii?Q?0rISz2jds+7y3BEmO0E3cWTRRa2zDlzXsXy3LtsNzjyN5eie0QPC+SrcdPhW?= =?us-ascii?Q?9SDxiUBhNSWnF5aJJ0hhDq9TVQqURUuNjp4xo8zWiqeWS32ljcq7NDjmVPjd?= =?us-ascii?Q?2XgeMui7vIFqQz5bO2ZNCsQR3OSu7ueq6yJsb1wwwD7p6MmkOVSi1yjmnW6J?= =?us-ascii?Q?hBW3ehYNlyaYPkqXmg7uhOta0xEpVasOKeu6E1fP98GgOes9IxpPskfFR2W+?= =?us-ascii?Q?WhU0T1bPyyLlThWOyxSBzv9WPU/hM3mz/X/atkEEh/a1De14YeKgGDMCRusC?= =?us-ascii?Q?i49jZgFWKzlY8U5cdTgOuTFWmLCBIFSrJSMc+VaaOmx54MqjnQrEYiskbo9Q?= =?us-ascii?Q?QdaeND1dov/sKGKbANpOffibgjwDE1JJrQheIYNNGBXVmRST643pddoPnA1I?= =?us-ascii?Q?6ovrB0Xa749AyNnXHVZoQVAdYWmk6of5VA8WXj3b2Jgc45QZpWXWbQU37W6q?= =?us-ascii?Q?8/AicBp7sdeQXYiedKSXbLlt?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 854944df-9446-4d38-2c42-08d95c0cc098 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2021 14:40:08.9261 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AU5Ztfazi9LRQwicfORINQfu+BLUOoda+ugmqYJ5K46JMtiIXZ7bSxCw4PGXtgPLO/8LOOT+7TA+tEv0F+FAQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3719 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=10072 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=883 malwarescore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108100093 X-Proofpoint-ORIG-GUID: Hm-T6wcS-2I8qkUOhyn5G75ysIRAG357 X-Proofpoint-GUID: Hm-T6wcS-2I8qkUOhyn5G75ysIRAG357 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 49869 Cc: Gregory Heytings , "49869@debbugs.gnu.org" <49869@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > > under a different name (at least for the user option) > > to avoid confusion with the `revert-buffer' command. >=20 > Maybe revert-buffer-quick? This is the real revert-buffer-quick. I bind it to F5, as that's the key for this everywhere in MS Windows. (defun revert-buffer-no-confirm () "Revert buffer without confirmation." (interactive) (revert-buffer t t)) And no, we shouldn't have sacrificed `C-x g' for global buffer reverting. Anyone could bind such a command; no need to waste another key by default. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 10:41:42 2021 Received: (at 49869) by debbugs.gnu.org; 10 Aug 2021 14:41:42 +0000 Received: from localhost ([127.0.0.1]:60253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSwk-0002T4-D1 for submit@debbugs.gnu.org; Tue, 10 Aug 2021 10:41:42 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSwe-0002SV-WE for 49869@debbugs.gnu.org; Tue, 10 Aug 2021 10:41:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3Fk3cg856rGOoalL9fwxZo74QIGqsypXzagS/Sz6oXE=; b=JTTZHdnMpCgSPKyhlMHVsPZUgv yXwGHck/VuafR4IJgTdUWW4SK0HtDhyS1Zar1jthcxe68uw+dhQpmgG2kHg5L3Va1rGdzTTTabXpf deJ7GL3NmEGty98tTTbplp2EtZxO7ByJrhQu6AG3zwqtRUGja8Y5BSf4mR0jWAARP9tI=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDSwT-0003Bg-W8; Tue, 10 Aug 2021 16:41:26 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#49869: Revert buffer? Yes/No/Maybe References: <87im0la99d.fsf@mail.linkov.net> <83pmutl8iv.fsf@gnu.org> <83im0ll7oi.fsf@gnu.org> <83h7g5l6al.fsf@gnu.org> <87v94ki33d.fsf@gnus.org> <877dgzc4jk.fsf@gnus.org> <87k0kucbt2.fsf@mail.linkov.net> Date: Tue, 10 Aug 2021 16:41:20 +0200 In-Reply-To: <87k0kucbt2.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 10 Aug 2021 10:12:29 +0300") Message-ID: <871r71z7jj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Maybe revert-buffer-quick? Yup. Now pushed to Emacs 28 -- it seems to have good ergonomics, but might need more polish. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49869 Cc: Gregory Heytings , Eli Zaretskii , 49869@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: > Maybe revert-buffer-quick? Yup. Now pushed to Emacs 28 -- it seems to have good ergonomics, but might need more polish. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 10 10:41:47 2021 Received: (at control) by debbugs.gnu.org; 10 Aug 2021 14:41:47 +0000 Received: from localhost ([127.0.0.1]:60258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSwp-0002TP-S3 for submit@debbugs.gnu.org; Tue, 10 Aug 2021 10:41:47 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDSwk-0002Sl-L8 for control@debbugs.gnu.org; Tue, 10 Aug 2021 10:41:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=j7L8tiU+G4tzwH4+3c/hIG2tXC/T1MNkOXppBPVGhH8=; b=uSWaZWrkh6EF7uV4cRY+rGxngB P1Z9sugDls0ysjMCX2pK/6MVvDfSspvYHb+KRCQnh+OBj0gjrc/NVDZhYN6XcYsiXzbG47xU8eOYT OjLRCFbNgWwjqdHavIAs7Zfp6JdCxKuUSwGlw+F07aN8chfLzaqnxu7/LPiE0IIfcpGs=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDSwc-0003Bp-Kf for control@debbugs.gnu.org; Tue, 10 Aug 2021 16:41:32 +0200 Date: Tue, 10 Aug 2021 16:41:28 +0200 Message-Id: <87zgtpxsyv.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #49869 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 49869 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 49869 28.1 quit From unknown Sun Jun 15 08:51:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Sep 2021 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator