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.help Subject: RE: [External] : Re: completing-read depricated initial-input Date: Fri, 24 Jun 2022 14:30:25 +0000 Message-ID: References: <86r13hubaw.fsf_-_@gnu.org> <86letphfke.fsf_-_@gnu.org> <86mte3lsj2.fsf_-_@gnu.org> <871qvfoce1.fsf@web.de> <87zgi2tqwt.fsf@dataswamp.org> 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="40120"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 24 16:44:46 2022 Return-path: Envelope-to: geh-help-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 1o4kY9-000AEs-9E for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 16:44:45 +0200 Original-Received: from localhost ([::1]:59776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4kY8-0008V8-CE for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 10:44:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4kKX-00026v-MQ for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 10:30:44 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:45090) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4kKU-0004gN-En for help-gnu-emacs@gnu.org; Fri, 24 Jun 2022 10:30:41 -0400 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25ODiWWC027340; Fri, 24 Jun 2022 14:30:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=j80qGjvxrKRn92ZguFdlwOtaLI9vTkIM9KintKddyrY=; b=VBbrAhcVOiWwSQfiswTIhPybPpwYWuXkEAAweOGhP/xItgCudZrtmL9un6LuYuv1Us/Q OqNqdhcBdQx6iKc6MLHYYlbnWSLiTc1/IEnki1tk6a+Sfdhv39ENuNW3zzG+50pqQSvW MIgWK/4R9/13DMMNvdrzrgqA4uOwVJXgpGqzYVApOGdhaTIKryeMoBAsv9NPt5NC0y19 aLl+Uo6mZCO1dwqK7ZidnjSTqU5XWWONV9PMrOXkd59EK7RPnmR2HX6b/kqkW7iK3tB2 Zj+F3rDD76npd6SYnfBnE6m3e8RA2h4kZEPke3mnVdKgpEEZpqHtExDdWe2kQy/Emlyp 6Q== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gs6kfdnmf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jun 2022 14:30:28 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25OEGpxU004865; Fri, 24 Jun 2022 14:30:27 GMT Original-Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam07lp2040.outbound.protection.outlook.com [104.47.51.40]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gtg5xfj6q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 Jun 2022 14:30:27 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l7D4TRuZJlKUEpt2miaYVv8O7gqMQy1um+eg4fzEHm6mwxXN51KMoL3u4BXZH03Wk0wTMH8yse6cSYScMm5pyxq2ABYTMqSZA90fMExXgg4z8ZjgY7j9++TpwPUxlAkKmUBOcI4US9NhVXrQO8GRJYjnYzTDLhhNxHfx4I1VPXcnEH5l3Fw67oTKlvYJlxy12xTTcoBI637Vw0kI+KG/1FcwZC1gnJRtW3798QTFe+05Wc4cq9GLd6xFqy5ZY/2JSJDQzdM7/dTtHSWT4x3zU8m8U7l6m23y5VGSIZN0TBRr2by3pqkro7GNTn7zv0HIM3nslghGuQKEdtrs5qrbaQ== 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=j80qGjvxrKRn92ZguFdlwOtaLI9vTkIM9KintKddyrY=; b=jB85Xc2RIEIhC8Js94ArAa29unhDl3lYnyuKFSWIS5TRsCogl2Ra23b1RcznERRkAhkaOZVO5Q6wzRZ6y9fXCeyE5sTQV0nMpse/RyOcY1JOxVKqbhoS3rl5tUXkOt1r1192XeN3BymRylcbj6gJuHve2w8yeL3awiQLUL0vbvvSLPzp3tOSENpbJtC72vN682RmikWTponLDRZRcvn9fpIZrs9ZwRGo1CH14oPwlOemArwTk6tidgreJ6qi9hOVRFX3u/rn6m4lw0lOUtNtbBYhU5uX/QTbjBhueWPseuX+Cvc7fP0/+MYmJ//j9KpFrYlOyKacBLl9QAhNSMCKnQ== 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=j80qGjvxrKRn92ZguFdlwOtaLI9vTkIM9KintKddyrY=; b=jmkH7yBna3+5wEdyMti53lSYJx+LXA6Jwa8JHVmVy2e/XGB6p1GzifjsPVKS3MY+ndL4r7eFErG82/vQ3ODL9AFAJfVRd6lbuOPW1VAnXRAuduQcuGW/PSwRl91QY8tDNXXDf4tWTrTU6OA8dmzO96nWviPDzbzAUBVgzGzSV3k= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CY4PR10MB1495.namprd10.prod.outlook.com (2603:10b6:903:2b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20; Fri, 24 Jun 2022 14:30:25 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%6]) with mapi id 15.20.5373.016; Fri, 24 Jun 2022 14:30:25 +0000 Thread-Topic: [External] : Re: completing-read depricated initial-input Thread-Index: AQHYh6P+aCznE1/qtky7ncXiV6SN/q1ei+eQ In-Reply-To: <87zgi2tqwt.fsf@dataswamp.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fdb2f9e1-a1ca-41b1-50ff-08da55ee1437 x-ms-traffictypediagnostic: CY4PR10MB1495:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wuuJPGCmBo8Ydb9qCtbu48mm4L2zuEasT2oOT3fpKD55XjMOXee5FXQ5CQMWsa64H3gbY8wlydBzOxDv076yPfL10Nb0ku2bbTzXTTrSoQDASOc8NO+W9g2QOsHxspa/Z7XVFvpCvMX0rqxBhxbZQP3Jl2FKe/eTrzuvNxyUbF5CnkSxxQt4d4JFH1pmEoR8x2U2IiVpu2f0Dy/ef3uq8FmMyP/keVWvqRWM0YFMsvDsQ28DcSRYqDp+6wlIF6YuH9MZWiQv7z8+P3AZBHabqZL1vzzvODOVNFQwwVE2Sv0IsBjHp1bvUAtn2B4+LhzTUhOYffzl7A/0dTcoPIDkwVFx0oBG3Cu2Yi9UCe7PC9c5dv8u1XUqggKBFnHpBlGEajgMP9xKYE0YcZgo0X9B/0uHx2yusJGNyyw0ytsGOTRSm5vUBMWROm2QvTaCI79E1E+0gXpExEeoYHqmBy1XO9YPAvfd6v+yBFXMuUTCNg0Oxz1hohoc4JPys09N1Iem3HMWyGPqtCBr+67QcX0IxT8y910ohKWi7qVqN7vvrv1f8GniE8OYl8Ty++CgcmFEXQMcUOeTf7rkwXPHmx+m5KCXY1Yi764rTapY6y42IX31pw3RdwpFvoo09i4CZYPvmbxLAWNSbKIHA3z487+iUHmD/zavYzqDUnZEAWZWAGSSHbVvWWwthMP40H4Na1gGYZlqGxT7fARUJWIBloF2j2kysTgjD+mLUoJWQf9qbKX3AH9Isp8XPSx9sWIyw L9opR/RTDFxhXGrjr2k84y3RL3EgUGOVORzjPlL/HgJqkQ= 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:(13230016)(376002)(366004)(346002)(39860400002)(136003)(396003)(9686003)(478600001)(38070700005)(8676002)(66476007)(26005)(316002)(76116006)(66556008)(110136005)(66446008)(71200400001)(83380400001)(64756008)(66946007)(8936002)(122000001)(86362001)(52536014)(38100700002)(33656002)(2906002)(186003)(41300700001)(44832011)(5660300002)(6506007)(55016003)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gPMHkirKjpN2WaG2tX1fbK79kI/Rc0JmBQNGLUQEbudIkU7Vx9bviK6h3451?= =?us-ascii?Q?QfFk2yTBRPac48FpeIzzNq2hgihKhW27NxorTZVKoIcrF6/JzyqkdZSUmj7r?= =?us-ascii?Q?V6W9U9oZLfxt2zw1eW7f3dk5k5D3tgD4zUoN2M9ZuvlJVFTOmmGKJTcwNTLV?= =?us-ascii?Q?ffc+N9Qu6Aw5M4njb2tfRRgLWL49ypkmJZIabTHVkCgFpVKn5YlsmD5TAUm6?= =?us-ascii?Q?/DLNOEEa2iMrMZSL+kuGjdjrhgscykS4K4InGzE2NnIurLSPhreXJghsMTbx?= =?us-ascii?Q?1HaZL7k+UNXdq63v6HNHG3EON4wcRuw2C8FEbna84hH0wYHruoK13DwoEHkb?= =?us-ascii?Q?KdiJwzxTRjRmrUTEBRXIMFGC5Az5n9lfWcuFKxuSwiWs46XOsQrF99PHXZ4j?= =?us-ascii?Q?E1vxoSHi9BPlBI6RwbKekz31owSYYbJ7OUluM6OXqvwt7k6CbhBLpSnJ0n9y?= =?us-ascii?Q?qzW0N6a4ABBC9zEvVTh0blqur5YitObOKLuFHWS7wPXJikfXjpJrsNVQ665k?= =?us-ascii?Q?v7fmf3iolALhuuBqg1Ejo5OtdwLIDpZDiNwYLKcACc3WEX77xxJAHWcRfUOv?= =?us-ascii?Q?1tDGMNxI2vDRzdSp/8bYy8C0mHH1C30qc/xk5jwPEYphhQJQUeaLwe2ToBAR?= =?us-ascii?Q?cP 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: fdb2f9e1-a1ca-41b1-50ff-08da55ee1437 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2022 14:30:25.5624 (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: FEzLgjF/fOm04+Xcqom0Kjd+AD8iW4LzihXoWaZ59U6oETgZGHZNeyUXDkcAcRwDeCwlj3ZvhAYQcroqnzc3og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR10MB1495 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-06-24_07:2022-06-23, 2022-06-24 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 phishscore=0 suspectscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206240056 X-Proofpoint-ORIG-GUID: xbTWMOrcgSck4MT3f8KoFPLvRUQsEiRa X-Proofpoint-GUID: xbTWMOrcgSck4MT3f8KoFPLvRUQsEiRa Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138075 Archived-At: > I already asked, what concept is the initial value? ... > "Why is the computer putting stuff there? It's > the area where the human user should put stuff." ... > There is only one use case (completion with a > common prefix) Please read (again?) what others have written. First, it's initial _input_, not initial value. It's about prefilling the minibuffer with particular text, which you can use any way you like (e.g. edit it). A common prefix is only one such use case. (For one thing, prefix completion isn't all there is nowadays.) As the arg to `completing-read', `read-from-minibuffer', `read-string', `read-buffer', `read-minibuffer', etc., it's unrelated to any default value. (More precisely, it's not _necessarily_ related.) There's no reason it shouldn't be possible to provide you an initial-input that's useful for editing, even one that might not be directly related to any default value. ___ As for inserting the _default value_ (not the INIT arg) in the minibuffer automatically: a user might want that. You might not; others might. This should be a user choice, not imposed one way or the other. As I said: If you often want to use or edit the default value, then consider setting `icicle-default-value' to non-`nil' and non-`t' [to insert it in the minibuffer]. If you rarely do so, then consider using `nil' or `t' [to not insert it]. As one user, I'm in the former camp: I often want to use or edit the default value, and as a result I prefer that it be inserted automatically. That is, I prefer to hit a key to delete it, in the (fewer) cases where I don't want it, than to have to hit `M-n' to insert it, in the (more numerous) cases where I do want it (including to edit it, rather than just accept it as is). Remember that minibuffer reading is not always, or even usually, a must-match situation. Even for completion, there's lax completion (REQUIRE-MATCH nil). With well-designed code a `completing-read' call with lax completion can nevertheless provide a helpful default value - e.g., one that I might want to edit slightly. Of course, a `completing-read' call that gives you a poor default value lessens the utility of using it, and so lessens the usefulness of inserting it. Again, this want-or-don't-want-DEF-inserted is akin to whether to use `delete-selection-mode'. I do use that mode. Users are different. And it's important, IMO, to have a single key to empty the minibuffer, regardless of where point is. In `icy-mode' that's `M-k', by default. Vanilla Emacs still has no such key. (Why not?) Neither (1) having to use `M-n' to insert the default, nor (2) having to use `M-k' to erase its automatic insertion, is super bothersome. Each can make sense and be preferred by some users. That's all. ___ Summary: 1. There are uses for an initial-input arg. 2. Automatic insertion of the default value can be useful and preferred by some users. Let users choose. 3. Emacs shouldn't deprecate, let alone get rid of, an initial-input arg for `completing-read'. In fact, it should consider adding one for some functions that don't have it - some of the `read-*' functions, for example.