From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#33076: bug#48798: 26.3; `define-minor-mode': Message should name the current buffer where enabled/disabled Date: Tue, 4 Jul 2023 15:08:49 +0000 Message-ID: References: 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="40896"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "33076@debbugs.gnu.org" <33076@debbugs.gnu.org>, "48798@debbugs.gnu.org" <48798@debbugs.gnu.org> To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 04 17:10:24 2023 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 1qGhfc-000ARu-K7 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 04 Jul 2023 17:10:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGhfJ-000268-Oh; Tue, 04 Jul 2023 11:10:05 -0400 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 1qGhfH-00025v-1p for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 11:10:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGhfG-0007PE-Pb for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 11:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGhfF-00015c-V5 for bug-gnu-emacs@gnu.org; Tue, 04 Jul 2023 11:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Jul 2023 15:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33076 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 33076-submit@debbugs.gnu.org id=B33076.16884833474057 (code B ref 33076); Tue, 04 Jul 2023 15:10:01 +0000 Original-Received: (at 33076) by debbugs.gnu.org; 4 Jul 2023 15:09:07 +0000 Original-Received: from localhost ([127.0.0.1]:36429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGheN-00013M-80 for submit@debbugs.gnu.org; Tue, 04 Jul 2023 11:09:07 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:65340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGheH-00012i-J5; Tue, 04 Jul 2023 11:09:06 -0400 Original-Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 364Eib1a002648; Tue, 4 Jul 2023 15:09:00 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-2023-03-30; bh=gFaxmxrv2wrDwHUo/ovs8DH4rIKn5IjPhzps2RMtTPA=; b=SgyxbupQWY+iFP+jyJYEMijFbB4rE7DTJBXURPKrKCKl0oX9PiauX1LmdF1x9mageeIi 0XevFmfhp3FVp9n3oBNJJiCTeGx3mVk/JpnElRKuhmeGhK4ZIh63oKt6eP15SMvLcMLE zlcJTGcD+GXtPDm3r2OMXMPHJtSrxX5nZ1XsoWSldZmXNXstIADVlLNTv3OfW6ypJrR9 S0R7rJJBRAHLDLuglM7zx7SpmWot9URoBH76mJ4ZxJbN6XpkNakG9mmqwtW4AtKpI7gW yLNxNacuXnvEXoUbV1LtJwVH+5X7zsT7uGGm4JlG55rox3eHnW66nJwMEAUrmMoINtym Fw== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rjb2bmu96-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jul 2023 15:09:00 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 364EVnMg010586; Tue, 4 Jul 2023 15:08:51 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3rjak4rcy9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 04 Jul 2023 15:08:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=anS0fC+krdv2Yx1lCIPwHTH8yZ0cSoIFf1Q4oUNczjiRwe4Jww1gMH2nfpKQgXeQJDGKs3OfKE12HCYGvT7oHZh1XzUoJuxzvhGDao+JmwyCqs7cXubTMpft4IZM1wPu4bQpf+3aMM6YNetWtPkxaTp+bMttnleUoZ6YTP8aV7B7L9h+JhiLeOGpdGYn8Mb0cbZRhagieXrJDU0Yc0y/YwvgxGmSP4u/20QNnDxbwNoJoXhRbSmLTsFnpwkxAf2q/JGyNp5sK6W+TBA6IDOzUOHkzMfwTERCxMCT0vE1Mb5pb2mdPt8sAjsaumfTc85V63uQVEx6q2qNDNjA2wUw8A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gFaxmxrv2wrDwHUo/ovs8DH4rIKn5IjPhzps2RMtTPA=; b=F05UJxeUny14MRkECrvsRoi7wOhZ6eqtHuLu5XkukaFfmsrQi4LXsDyhOFmH1GEsMDaiV13u8DPNDldTvdif84qtP1gQLuez7gZ1t9KwZGmZYZb5wl+hRFkNEverhBuL5WESjn5X3Wx8yQGXUesEGoD0o5Eix0sk8tQFhN6SyIp/SQxeqy2xcSpvwfyQLt1G/IVC9+/QrmxNODuptEGkZzN2oM9dDNzTnnFLwJmPgYkgz/2hJ7PnItNkNiWD/NiDM0RZhWzCKtLcqPMpTlQPnqAsbmB/d5g/gAPo055IRDzeUTZngcPVV8j9qZkSDAeJ5pcMv300BKT4qkdhY0HIVA== 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=gFaxmxrv2wrDwHUo/ovs8DH4rIKn5IjPhzps2RMtTPA=; b=mhhN5qtDNnpNO8sT/WmuRHEXJcZv6v38J6zaczymvaghzos12H3c8njyU0q9pxFgqzPVt8po6SFkWB1FrHKjSqgMoZVtwwZdl/UC1NSkACdsb3GyiEc0yGHdC4tF4hDVeZaU5Cenc1W2pDfcmj/N/gCM0MKsFwdKZkwm2ottmX8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB5788.namprd10.prod.outlook.com (2603:10b6:a03:3df::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 15:08:49 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::22c4:9389:291e:aeae]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::22c4:9389:291e:aeae%7]) with mapi id 15.20.6544.024; Tue, 4 Jul 2023 15:08:49 +0000 Thread-Topic: bug#48798: 26.3; `define-minor-mode': Message should name the current buffer where enabled/disabled Thread-Index: AdfC2M5h1NY5z8H+Q9WarldRvHEiJFwiPd2QHsjVhIA= In-Reply-To: Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SJ0PR10MB5788:EE_ x-ms-office365-filtering-correlation-id: b0a2fb7d-a6a9-478f-0510-08db7ca0924b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HM3YbDdUEl9I4DnR5+K6pzF+bzSSZYcG/MBpq8PKtaDChoPI4o1h6cr/4BtMLyF/ZssvBAbKNgcaaJ1UuuZZBB2c0XiTmReQzdbPgJ8CW8oL4SzKtmC4r2pl3dsrMVPofwNrB90wOep2chNpNCt6/q79nifaj456VjSQhKK0crAuJpipsCAqSEXWN5/vi7GoOovNEkRRgYKEWpzt4WUo9DQa2t2Bs6kKcVtIp1c25qfhPrbHxhhHFVC2vkHOp9ftV53i9Ln04pwQvfesO8rsPS7krsph9EzDB0/o26KiPzVugay3Klp5iA5+Sb8bOwZObMvN7tm4XeAZDv+MyYoEE1Whm0bbsWb7qMri2AVJ8JyfZWsOPcaIkorD/byCPiixnKUtvFHtS0lZYv2Yvt2GZHs7xxTewg75cEOCFdSGRTTy/igCcFcz2jeDzI0Sdl6PNoW53i92mBFXEfrFv85Lb4vEMdy5mIgwA1t2y8Z7UYyCSnzvVBI0qgee/jrXfLL4U/wWvoBrrG9ZpU6IZ0yI31TkKa5hRDZ3jvv2J7pLGGKaw5jml8lfUEiF/WSTsRBkVogY78K4T6kk4XewJ9q/dZ8cOhJktivpFYz02LQqoSp3Lw3kQt7gJzHPze5SvSYYkggsmiPUrQ9ZOrWvs3N7zQ== 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:(13230028)(366004)(396003)(136003)(39860400002)(346002)(376002)(451199021)(38070700005)(2906002)(41300700001)(52536014)(5660300002)(8676002)(8936002)(44832011)(15650500001)(33656002)(55016003)(6200100001)(6862004)(86362001)(186003)(478600001)(26005)(6506007)(9686003)(71200400001)(7696005)(450100002)(122000001)(76116006)(316002)(64756008)(4326008)(66446008)(66556008)(66946007)(38100700002)(54906003)(66476007)(83380400001)(81973001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: TUS34s5EDa6qYTXBM8F2WHp3UsJByVVwx55O7XKALJDwaX5D9k+fp3f2DLJWm/MtRNqKtcu75YpzVnbN55LyG3d85p6qCVP5D+tvbN+i7Dyj6XTPM8VTp/nXV9Eij+T396mFjIPZ8asmyrXJ1iW6NwLyM2oQHkq96wKx6ZCseBOBZW6GIzXp75PgS0+NGvQmHuunUdvoUkcPn7RBS7zB4hD6Kz9EKbk4rKWKkZ1rgrkhmlYEidr+ClN7y9h/YNiioVuH+DVH4vf4nF935K/dxpwepMm2b/UugDEt7hwtcn1WOknU6Ya3zmgW6rL84LXQNoxNj35gknabnw3YxjYsjuME/goeXUR3grYmS+B6+iw5KGNJ/2zi9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u9oOq2vqXxZwBy/+L1MjOqfjhq31R4w54iYr2cjINSDMd2h4FnlfBLNXNy54IohgH6kYIvNG+o/Hk3Zofd+2yPZ6gFEMzcwyJ32CwcdwToF3CGX4nr+NUFPWfHPt80BTdrfegdcIISiiNuGVR4sdpnIWBo0ZUG8tqYlwv1LVljc5Qk7nMsiur61so9XCEZ4OqKMAg+mu/0CQtsG0czohzNkUVt70VIV1UOkXQ0RQ jZT1FG659SygnwCtKJ 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: b0a2fb7d-a6a9-478f-0510-08db7ca0924b X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2023 15:08:49.3754 (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: ehZsA4JLkrFPOTeqJKbbAcBIAjQv8AtD3TEEmr/bpGX9iJ2pXKDhIk2HGdICeMhnW0bt9uLr2DdAtRkET9ytvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5788 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-04_09,2023-07-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 phishscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307040131 X-Proofpoint-ORIG-GUID: lahvDhhlzJu7B8C9Qs6ZO6HEDrD3eMWF X-Proofpoint-GUID: lahvDhhlzJu7B8C9Qs6ZO6HEDrD3eMWF 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264589 Archived-At: > > The same problem persists - bugs #33076 and #48798. > > > > It's quite possible to not notice - or even not be > > able to easily see - which buffer is current when > > it's changed to/from read-only. It just makes > > sense to tell users which buffer is involved. > > > > Really hard to believe this isn't obvious and the > > trivial fix wasn't applied. This just makes life > > that much harder for users, with no benefit to Emacs. >=20 > Perhaps the problem is more noticeable if buffers > are in separate frames. Especially since Emacs > has messed with frame focus so much (since Emacs > 26, at least). If the buffer you thought was > current with its window selected is not, for some > reason (e.g. gratuitous Emacs frame-focus switch), > then the message doesn't help at all if you have > multiple buffers in separate frames etc. >=20 > I'm guessing that this might be why Lars didn't > think this was a real problem. It might be less > noticeable if you're not a victim of Emacs's > gratuitous frame focus-switching. >=20 > But even if that's not the case, I see no reason > why this shouldn't be fixed. _Whatever_ the > reason might be why someone doesn't know or isn't > sure which buffer had the focus, why not have a > message that tells you what Emacs actually did? >=20 > Please reopen this bug and apply the trivial fix. > Thx. I'd really not like to have to redefine > `define-minor-mode' for my own use, just to fix > this annoyance. To me, this message improvement > for users should be a no-brainer. I'm asking again that this be fixed. I'm not asking that such a message be changed for all modes, i.e., a change in `define-minor-mode'. Whether that would be appropriate is TBD - a different question. It could be asked, but I'm not asking it here. =20 For this enhancement request I'm asking only that this be fixed for `read-only-mode'. In various situations it can be nonobvious which buffer's read-only state was changed. And there's really no good reason why the buffer name shouldn't be included in the msg. And no objective reason was given - the only reason given was that Lars subjectively found the fix to be "more annoying than informative". Whether or not the code below is the right fix is for you to decide. It gets the job done and shows what the behavior should be. I don't care how the fix gets implemented. (defun ro-echo-buffer () "Echo `buffer-read-only' value, showing buffer name." (message "Read-only mode is %s in buffer `%s'" (if buffer-read-only 'ON 'OFF) (current-buffer))) (add-hook 'read-only-mode-hook 'ro-echo-buffer) Please reconsider Emacs not letting users see this little bit of important info in the msg. ___ As for whether ON/OFF is kosher, vs the more verbose and less noticeable enabled/disabled: I think it should be. In fact, I think it's preferable, at least in a message. And Emacs itself sometimes says that a mode is "active" instead of "enabled". (e.g. allout.el, autorevert.el) I think uppercase ON and OFF stand out clearly in such a message, and that helps.