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#47150: [External] : bug#47150: 28.0.50; Incorrect major-mode in minibuffer Date: Mon, 22 Mar 2021 19:42:21 +0000 Message-ID: References: <877dm9nsii.fsf@gmail.com> <40f3c845-ba30-4112-bb3c-9c06c1f106d3@www.fastmail.com> 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="22037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "47150@debbugs.gnu.org" <47150@debbugs.gnu.org>, Alan Mackenzie , Sheng Yang To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 22 20:43:23 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 1lOQSR-0005dH-DW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 20:43:23 +0100 Original-Received: from localhost ([::1]:34368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOQSQ-0003PU-Dv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Mar 2021 15:43:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOQS9-0003Oh-T0 for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 15:43:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47184) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOQS6-0006dx-Fq for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 15:43:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOQS6-0007kt-Do for bug-gnu-emacs@gnu.org; Mon, 22 Mar 2021 15:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Mar 2021 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47150 X-GNU-PR-Package: emacs Original-Received: via spool by 47150-submit@debbugs.gnu.org id=B47150.161644215229760 (code B ref 47150); Mon, 22 Mar 2021 19:43:02 +0000 Original-Received: (at 47150) by debbugs.gnu.org; 22 Mar 2021 19:42:32 +0000 Original-Received: from localhost ([127.0.0.1]:58727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOQRc-0007jw-9d for submit@debbugs.gnu.org; Mon, 22 Mar 2021 15:42:32 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:42398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOQRa-0007jh-8w for 47150@debbugs.gnu.org; Mon, 22 Mar 2021 15:42:30 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 12MJe15l079232; Mon, 22 Mar 2021 19:42:24 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-2020-01-29; bh=ICL9shq9Q7wS86XuUHeb3KiaCytyuQQUWxu8naKY2uc=; b=dSlPaUAhDtHJWMeDqp18JnIrRgBJSAediGn21ggd70QqO7T/OxVWR10HlahXtMGmQwd5 8/4tRI7S5lcfCkG7TTZVhsoo+d/RSM7ChQR0SV1nVGplRO1uBuX/c5ceBewRar9A5gSi puY/bh1phz9QKWlGsLRPKXgnLRU/sDXqK/e5WjL1/bYnMEy2MLm56lJU5z7Czhbsj8IE 16WiaEw1INRo+FcdhUN8YWpS24NQGiDAjMABeZXrZiKN7eVHLqEqDS6eKVJjgNQWZ8uv 6Mz7L+hQo0LSxcNGtI61KRgHMMYKuXxDC2v4IGfeWh+Ro6UMB/egxpL+CSqmP7pKc1UJ xg== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 37d9pmvm4q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Mar 2021 19:42:24 +0000 Original-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 12MJeboe193415; Mon, 22 Mar 2021 19:42:23 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by userp3030.oracle.com with ESMTP id 37dtywgpb9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 22 Mar 2021 19:42:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqCTV1sDiNr+SlSN2d726JfjBOal2bqjLIqdauuC4GgTkwWATnoAC+0n0tsSvAhaV6u0RMtF2vwfOGsSI0nFUDe8bvowdQJIf8ylX3Eq1jn0s/0E+Rswzx3LBObtzyf2zumnc/Bo050mm9rqjhGu9YvqSQ+Hlgbtt03ypT3cv7WyBsbHUTSMgF1246bF9Cc8VxFXiscp6TcbhtmPYvHiSz17//49n1dOM4277MZIFyXViHfx30+R3DKKrv0IshyyrPs7Bl4h7swi267C3AjxBGtFP6UsSi2+tkgnNXy+cxDfTeWCc3hJhz6KxfVdya9hdzeLCkqjKw6VcDj/OIDLRA== 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=ICL9shq9Q7wS86XuUHeb3KiaCytyuQQUWxu8naKY2uc=; b=d3+0IzB7y5/PNl7ANw3IN7+fHgTKJR3j2htzWhD/7FR5dWiPpU8KBsgb+ayP+oP5DXNfTE5hC+1eHFaiMH5I1wuBIB0qLvYOiB7wzIx1zTC6JehTWxaEBVtoR9eQ5LK/etz7MGVij9KY25lZ7quOGeuXV11j3XlQeF9DG4pbSt/qIlaQthx3yGnw3SQNDxYs1gaArShByk20+0y8ZW2ohtUKX1swJ/65NkhPaS7Q+gFsY9GgQ7tq3NUuuh+ojOcaWwBCywtBQlvGK3s/IbBstlV/FVwFYo0dW5cIGUPG4FvkZu4gTMYGIAIxyrgCHwXUk+nwWin6i7DuOSfMqZxVhQ== 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=ICL9shq9Q7wS86XuUHeb3KiaCytyuQQUWxu8naKY2uc=; b=obPQ57k8C4clat2V1DoxBufVTXqZXIPjhWIETOx9fi3nnzg48gw3Q7jMRJIM5pQDxUrWhyl8IjKCEFOMkP6Tu++S8mLwKWamXsLBOvJAQjgRjPC1XxoB5USlIklI8QDD2L7CDEkpTHrSFg1Ac0tW4vYZIzmqfUClkTJpjbMIAUU= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4634.namprd10.prod.outlook.com (2603:10b6:806:114::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Mon, 22 Mar 2021 19:42:22 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::b8d2:db6d:3e4b:d315%5]) with mapi id 15.20.3955.027; Mon, 22 Mar 2021 19:42:22 +0000 Thread-Topic: [External] : bug#47150: 28.0.50; Incorrect major-mode in minibuffer Thread-Index: AQHXH1HkSy92TZ2uh02eoEgOCtiSq6qQZhQQ In-Reply-To: Accept-Language: en-US Content-Language: en-US authentication-results: iro.umontreal.ca; dkim=none (message not signed) header.d=none;iro.umontreal.ca; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fd825fd-c94c-40eb-99ab-08d8ed6a9c79 x-ms-traffictypediagnostic: SA2PR10MB4634: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LJpcGpoMXuufd4sg8M3+F8smNpHa6BSKq6c2r8DXSj32nw5qswD1ihpZl4XBHNMTd9tu20goAB9BqiXA0kx5tK9FQBdvIfcZmbl6OWu7d6bqobIbjYPDEb2vGY/JjjnXErIGK+2uqor/WWgTyANJUFogKcRCSamw1DLV3RZUaQjo4oBBZwZPoq9c2/w1n5I/0LHr1izsiLpARJLaqpIcOR8z63+b/pdCg9uYfUHuAz7nnnemFuicewxCU/dAdyM3i716C+DLN9+ZIqHfMHeSORb9QOfdxn4bOJbrtMcdt7jQBQtU6PcW0Haa/QZiTn/QZrf+vMzzFsNFCWl8cocP9m14N+/b+vgCwp6yFyViPoLJZ5CiMn29FOI7n1G/xkjkzCgaxRogVHySxtMBkWPG1fstcmSM5pQR7KqTDPePXDw5gIEYfAGwgOq7y+nw/M4qcJ2Oxd5gMb0Dm02WW3l43RZV84wrUJcqlc1yOPBIQew93glZxjepvFHp7RTv+kRzsN15+ktXylW7XKhVWXuolnF38071C87RRX8bSzc6j677NoF91UcFwybFrkto/0UlZ3XPjCgXV4TTV6r79nO5dNnekk2h+sj4MjV75nOqAfNH628Yi+/Ud3JuBdgwgpksMoCdEjWMjiI/oFV1vP1qqeFGcamh1IJvaoquVg9y+YY= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(39860400002)(346002)(376002)(136003)(396003)(6916009)(54906003)(66946007)(5660300002)(8936002)(66556008)(6506007)(66476007)(26005)(186003)(7696005)(66446008)(83380400001)(76116006)(478600001)(296002)(44832011)(52536014)(316002)(64756008)(33656002)(4326008)(9686003)(38100700001)(71200400001)(55016002)(2906002)(86362001)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: 9DIzWyOjiojOIO4eliklcMAnk/oax6Nc5W6evxGU2NlxrLk+34uXUeBl5Uzma5/zbfvWRif/wZ2a+27UwJ8hqJpfdnV2GSgKOCaGCd1MST0ymD9mLlikJrM5p/2/w4hRAx1s2Q7Fk/OTE2fJ2Q2lRhy234kyniMaRzcl3rzJEz+YzS7LYM97ikMY6talufOQea6opJHzqlEK/nhLBwxejzPx6EvEGE43Jq3BNO9Lgld6a6ZNwZu8jNSRWU7Djk2w/gAs1LHHy4kuo7SzHbzm6L2MTm1n49UwEuKKZP+0OTaLhxEEgkJGfa2Zci1adv70XoMnTxEQZCeFC8wfCPtxBo9TZf/AEWqAes4DoVeucw3VmXiRUs+2u/oOTFqiN5PR+zvQ1avBpzg7HLAt5W58sbJ19Jikhcv+8rcSwzZ1GOlPcZhjfAu55uYuW9RXwhaIcSi3c0SPF/D/PGluj5I7TxoJURdShi8AuQ9e7+QuhykjtOTeoY1OST/5Dd6MSWJT1BqqMRt17ef+k8uzmyotghNgflM+dAuD/eri/drMCYyZVdVeg2rFx+KqzFrYYRSj5MndyHqIB7ZKscFJGY/FPcXkHW9TrzTxxhxdGvKt/Zl3rIZqUwW/muHugmPe45elhAUrRZ4TdU4JqIQnP5f8zh0SEsM5JjROKazE/A8ORSpDK4wvpXiChAkwRfxiDQ31Zxu5NhIS+qjcmTVS0ORedSYNN3bDqlONAzoMh+VlYlbw3RZ+AE0XWIZaY3NJ rOXcm83wmqyq9grcFt1SBYLTs8X8dRbncTEkWO707fm+JblAhw3Vv07MiJ0RiNCgcd3MOgmWygzIPhpvH+7O4KI5ByPkrj1AI7 x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fd825fd-c94c-40eb-99ab-08d8ed6a9c79 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2021 19:42:21.9829 (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: zWyQLsIAfgw1+YjvGHLmmLCWyuoaRwDH3Xj7kbC6ZAWgb7LzdJpCHjKAsBSAtOkOBr32crSy3QdcYJDlCcDUSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4634 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9931 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103220144 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9931 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 impostorscore=0 bulkscore=0 spamscore=0 adultscore=0 clxscore=1015 malwarescore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2103220144 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:202864 Archived-At: > >> I'm in favor of introducing a `minibuffer-mode`. > > Why? >=20 > Because that's already what "fundamental-mode + minibuffer-local-map" > is, tho without the benefit of all the associated conventions of a major > mode (e.g. C-h m to name just one). >=20 > >> Part of the question is also when and how that mode is activated (sinc= e > >> activating such a mode has the effect of deleting the local variables)= . > >> I think we should call `minibuffer-mode` every time we (re)activate > >> a minibuffer. > > Why? >=20 > So a minibuffer isn't affected by what happened in its previous invocatio= n. Can you give a quick example? I don't think I've ever noticed a minibuffer affected by what happened in a previous invocation. > >> The way I see it, `eval-expression` would want to use a new major mode > >> that derives from `minibuffer-mode`. > > Why change the major mode? >=20 > Why not. That's already what `eval-expression` does, except it does it > piecemeal instead of via the well known major-mode concept. >=20 > > What's involved, besides keymaps? >=20 > In the case of `eval-expression, potentially anything that applies to > a normal buffer seems to be applicable, e.g. indentation, > show-paren-mode, eldoc, font-lock, flymake, company-mode, you name it... Hm. Be careful what you wish for. > >> It would also provide a cleaner way to do what we currently do via the > >> `minibuffer-with-setup-hook` hack. > > Really? Everything that someone might do on that > > hook you would have passed as a function arg? >=20 > I don't think we could replace all uses of `minibuffer-with-setup-hook` > with that, no, at least not without additional changes (since my > suggestion only covers code which currently directly uses > `read-from-minibuffer`, so we'd at least have to change > `completing-read` so it too can take a major-mode as argument). Ugh. > > Why would you find that cleaner? >=20 > If you don't know, it's because you haven't looked at the implementation > of `minibuffer-with-setup-hook`, which is fundamentally inherently > brittle (tho it's sufficiently tuned that it's normally never a problem > in practice, of course). I thought you were saying it would be cleaner for _users_. My question was/is how it would be cleaner for users. > > Right. There was nothing missing before `minibuffer-inactive-mode' > > was added, except possibly the corner case you mentioned for > > a standalone minibuffer frame. (And I use such a frame, and I've > > never felt the need to use it in an "inactive" active way.) >=20 > Nobody forces you to use it. It should be harmless. > Have you suffered from the addition of `minibuffer-inactive-mode`? > I can't remember seeing many bug reports about it (although I was > worried when I added it). Right. That was my expectation too - harmless. (Though your comment above, about "anything that applies to a normal buffer makes me just a tiny bit nervous now.) And no, I've never suffered from `*-inactive-mode'. I've never found a use for it either. Can I ask what's wrong with what I suggested: One mode, not two; just change the name and provide a helpful doc-string that covers both active and inactive?