From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50780: 28.0.50; [PATCH] Mention the 'r' key in ask-user-about-supersession-help Date: Fri, 24 Sep 2021 15:59:08 +0200 Message-ID: References: Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4484"; mail-complaints-to="usenet@ciao.gmane.io" To: 50780@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 16:00:19 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 1mTlkQ-0000on-20 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 16:00:18 +0200 Original-Received: from localhost ([::1]:35598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTlkN-00028o-Lu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 10:00:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTlkA-00025K-Bo for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTlkA-0007FD-0Y for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTlk9-0006SA-VM for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:00:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Sep 2021 14:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.163249196624720 (code B ref -1); Fri, 24 Sep 2021 14:00:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Sep 2021 13:59:26 +0000 Original-Received: from localhost ([127.0.0.1]:58935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTljZ-0006Qe-LO for submit@debbugs.gnu.org; Fri, 24 Sep 2021 09:59:25 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:36296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTljX-0006QW-UU for submit@debbugs.gnu.org; Fri, 24 Sep 2021 09:59:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTljV-0000Jk-RG for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 09:59:23 -0400 Original-Received: from sonic312-25.consmr.mail.ir2.yahoo.com ([77.238.178.96]:37588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTljR-0006k9-W1 for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 09:59:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1632491953; bh=7fAndipgFQJdOawKC8wqTD7NaXLpXePJcThSdSFlyCQ=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=BOoksUMdL64g1sYEsl7cxrYyaVCB6Ovs1MairOn1UAkLsKkgJstWkMVb43A5QZm5s+nRsocYX/Bm4lKlBq2t3S8ZJNWqkfLXnV/OP61YHXQX7oSZlvwaCsTvNn/gdUynYXdSVvvqCvSDB8lVS1bj02I5e5LwmmnC13m0/+pAdh+X82tY7tI3ZtlDOnzYkrh1TkALNSzlU92zB2krzilpr+PrYlzXcr3vm+A/Tr3xZEkU8gjsbcOXwvD5Gvc4fzyxM6wl9zwwjTZCraNvF8/1cfgnSA6GuC+zgpFbRq9ZZS44zjcVM4LiuQS7Pd8kYZcno/lxY6fWJWPy01bxMdSDow== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1632491953; bh=CRU5hwXGfrbqNxS0ct2McXheK1cmZh7Ho4MoqIzsfXr=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=W4KSbfbiU/lPSC+KjzNX5WcKI1zUYsDRtzQmsfHqw/LZerDCcf1+3KZR5unC918MyQv4dEiw8h42izsBQCNSHqONC7JDRIIlLYbTmZykC+UcVTRBQm70JLK/5+jv8O58ngLgV/u9mJ5kERi7W5cVZeGYxv4H0Td8OmZSpP3Bk+UwpOBTLgLhf6fSiZfdT15uiJgSkoF0kigqZ99+XLYXJqtLl7HxTQ7xSH71HPSzFU/A7WhkBwnkSGiRkUDteTuI/he7qGAYdyD1gqURD3/tS4cuMFggXJvThyI4TdR/oo9cg1OXL+Uarx4eukEvFhmBlX8j/rXsGdGTHyC4CZ86jA== X-YMail-OSG: vQIu6SwVM1mJ_6qxf4.nwBXGLZ_CbCZItiWHxmAkIzHOss3NJpPdn28qtVFa0SV 5Wsw3HY.PyukTtCoPUIik83ciblo404qVlG_7ArNaG9lrivqUGiB_lLkq27_dsF1iJsNTlgfSvQ4 FTR58kbTeqHojd9IlA2Kldo8r8fZUKWgwnz.x_vpiiTpTAsVEZcPNuTNKG51OSZB3472eEPLmZwR VWxC3nii6c1Kppr6Cuqx6H3u_zHPxqJcrIfcAdepLo5uVOM.AI2xK93U03bv6nhQ13zo3kxt2iJU KnufjvDUMlKXTxgBjLLzQoaEMVTKspPTiCUpnkIwWYQP5p.w0uZjc9glmgbiV5zCP1Bdvg1AWrjq Q1tB..GI8SHuyt44VNZ6kReY3CWFU2JK23ZZ1FxD1ZRVCnebgk5Yj8jCpGxlfTgEkwM7MBG9ddZb GLcPeLF7pT5dcfs42lHvqaoMN3WTzaJ2KeFE9jEdZ9YgYLsgm3aXYzTveXSJvje7COEUS.U.XmYW BF4sNUUSWnM1.R_tYMV8GwGO2DCp2Ca_MPX2Wn44vUdhZP2oV4JsJt8DFAPqy.baeNdKrgXqb7H0 dKZcjGqwxRzXNxefnaMttr4LplJiVqvaKBUCITpKM4sP3RsB8VRwtG.ugiWMnqJ4XGR1iv8LQ_Hs z_.vkf0qBzCRF52viMGGT_nIeW7sIjvCDu4FGWebbeExaaTOaVrtXkdXAd9aCKRier1en_Gbl5Lu ADlevM60lmIABjlmtoJ1UaXdGX9GfnYU2ez6tlMvQ9QJOKGGuqWbqn684WpwyAZ1Dez4xtv06h4I 4XB.Z8iibf7VJuj3WFGaayGwYxC0HlDGRXQn4OloQO X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Fri, 24 Sep 2021 13:59:13 +0000 Original-Received: by kubenode530.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 53b69dad520bd5fa367cfcd86540af43; Fri, 24 Sep 2021 13:59:09 +0000 (UTC) X-Mailer: WebService/1.1.19043 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.178.96; envelope-from=mardani29@yahoo.es; helo=sonic312-25.consmr.mail.ir2.yahoo.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:215302 Archived-At: --=-=-= Content-Type: text/plain When you edit a buffer whose underlying file has changed, Emacs presents a dialog to confirm if you really want to edit the buffer. The dialog, since 1996, offers to revert the file by pressing 'r', but the help message still mentions 'n' and then 'M-x revert'. As they are equivalent, the attached patch updates the help text to recommend pressing 'r'. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Mention-the-r-key-in-ask-user-about-supersession-hel.patch >From b1e4985bb70ec820d59984e1bab8223c11de941a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Fri, 24 Sep 2021 15:32:01 +0200 Subject: [PATCH] Mention the 'r' key in ask-user-about-supersession-help * lisp/userlock.el (ask-user-about-supersession-help): Replace "n, and then M-x revert-buffer" in the help message with "r", which does the same thing. --- lisp/userlock.el | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/lisp/userlock.el b/lisp/userlock.el index a38f6ac422..87a8b7b451 100644 --- a/lisp/userlock.el +++ b/lisp/userlock.el @@ -201,13 +201,10 @@ ask-user-about-supersession-threat (defun ask-user-about-supersession-help () (with-output-to-temp-buffer "*Help*" - (let ((revert-buffer-binding - ;; This takes place in the original buffer. - (substitute-command-keys "\\[revert-buffer]"))) - (with-current-buffer standard-output - (insert - (format - "You want to modify a buffer whose disk file has changed + (with-current-buffer standard-output + (insert + (format + "You want to modify a buffer whose disk file has changed since you last read it in or saved it with this buffer. If you say %s to go ahead and modify this buffer, @@ -216,14 +213,13 @@ ask-user-about-supersession-help from the file on disk. If you say %s, the change you started to make will be aborted. -Usually, you should type %s and then %s, -to get the latest version of the file, then make the change again." - (userlock--fontify-key "y") - (userlock--fontify-key "r") - (userlock--fontify-key "n") - (userlock--fontify-key "n") - revert-buffer-binding)) - (help-mode))))) +Usually, you should type %s to get the latest version of the +file, then make the change again." + (userlock--fontify-key "y") + (userlock--fontify-key "r") + (userlock--fontify-key "n") + (userlock--fontify-key "r"))) + (help-mode)))) ;;;###autoload (defun userlock--handle-unlock-error (error) -- 2.31.0 --=-=-=--