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.devel Subject: RE: [External] : Re: [PATCH] When deleting in bookmark menu, prompt for confirmation. Date: Wed, 5 May 2021 23:17:49 +0000 Message-ID: References: <87a6pcqy7s.fsf@red-bean.com> <83czu86o46.fsf@gnu.org> <835z006jpl.fsf@gnu.org> <87im3z3f8f.fsf@red-bean.com> <83zgxb67g2.fsf@gnu.org> <87mtt9sqh4.fsf@red-bean.com> <87czu58uso.fsf@gnus.org> <878s4tq8e6.fsf@red-bean.com> <874kfguail.fsf@red-bean.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="31944"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , "emacs-devel@gnu.org" To: Karl Fogel , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 06 01:18:55 2021 Return-path: Envelope-to: ged-emacs-devel@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 1leQn8-00086f-AN for ged-emacs-devel@m.gmane-mx.org; Thu, 06 May 2021 01:18:54 +0200 Original-Received: from localhost ([::1]:60836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leQn6-0004Rm-NE for ged-emacs-devel@m.gmane-mx.org; Wed, 05 May 2021 19:18:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leQmH-00041R-16 for emacs-devel@gnu.org; Wed, 05 May 2021 19:18:01 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:42726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leQmE-0005EH-Ko for emacs-devel@gnu.org; Wed, 05 May 2021 19:18:00 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 145NEJts103828; Wed, 5 May 2021 23:17:55 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=NnJL4Vi9aj/Si0Q4IwDG6SNczmDmClhy6BMRJAQJONw=; b=x0QICrCcsg9+5/LL8JcH1sVI6XJNQIKA/IGAJMzDMzyyMZriPZA4lS+x8/CtDyV/DerH 9Tj7uAOtPQLXBtgglZyO8vimCwoMT5uF1F0Yja6OjDzg5yK4QRhf9cu9asCvzHaRVGAs fvoSh78IUGokQWMuh/+P/4q3KaWsQiV/4fwmh0IzDHl4E1azxgRS1VVxYo6NzeDhluZb 6qErMX03W84WlHrDylJMC2XSozzhLilk3/hilPYZnyyJkotKCHQbixxY+gfS0+xQC1U/ JtE1X89qJPISnDmi9+ACmweKBZrSyu9rxQ1ESJI4r4rv6EQ2IJVwF1HrJBqp6DleS7W8 Pg== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 38bemjkcxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 May 2021 23:17:54 +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 145NFGKL011526; Wed, 5 May 2021 23:17:54 GMT Original-Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2177.outbound.protection.outlook.com [104.47.55.177]) by userp3030.oracle.com with ESMTP id 38bebubf7q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 05 May 2021 23:17:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jp/Mm2lXenprfmOZuDl3Pfc/84XsUyzjw4jo8ZVsu0q87C1PhcB0QfOxwIg4qDG8TAh4Zx7CZGmD1tvu9MdEswqCxlQSZ7jmwMCDb6kJgfyOqdzScONSQZG/wL2pJmL/E3nSCtuvrlk1H4hWehXfI63LZSQoV45C7f+o96uRTuK1+1a7cypsoDNK5ZfOcHKn2ay2vX8ZmJKGkoHkmfMoarFGV6rh7feH/p5XptYHUJfPYQLcc3AbrrH8aOEEuOEGG2lwARyj0FjSij2iVxhGBCieYSQblzeKaCdasHlZ9BCSCCbz+z8AOAtvWDgxoAMwubdNEvRjrSl7IR5Cm1PuLA== 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=NnJL4Vi9aj/Si0Q4IwDG6SNczmDmClhy6BMRJAQJONw=; b=L1INZUPfAnsOyWQUwXvxdllxx03JupfNuOOO9doWwnhpLtgsY09exJ18grci5+1VJZFCe7JmPp4H+DjWpLv/ef3Hgyn2a+ZxiChI8FDOLO8fYn3uNnBfT5oDq+jZROA3RXiclXuv2jYjBxPfxqKWCCZnfQ9izqE+p7wN5sUNzoEaxQbUl2z7C20nExSPwBnvcaWU8FepewPcQli6HAs/uWcyEqBTP7BirAzZu1KE81vp+Fup2mPWUqWI8Wnq1RG97pzUlFdQJaQ//2IEiyiUalXzPrJ2prkAaI+wA87v0AEYfwak2IMAEGdPOHsQhAtEdlc35oRBmchFkZgTsbvAXw== 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=NnJL4Vi9aj/Si0Q4IwDG6SNczmDmClhy6BMRJAQJONw=; b=usUT17aZyADRnDQMqFLF0ZpAknp5xGWgjW7Q1TCI1gIZJwM0LXEO8FUL/D2YeB7aHG3vZkWM8ucEUY5/BumTS2640/spUEjpHThfPZrcJpzfG1uVtrOGVUYVFckjRDBR3JQ4lzRc+RAoigzVh8LTetTkqiVy8TR51F8MPso24LU= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4457.namprd10.prod.outlook.com (2603:10b6:806:115::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Wed, 5 May 2021 23:17:49 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4087.044; Wed, 5 May 2021 23:17:49 +0000 Thread-Topic: [External] : Re: [PATCH] When deleting in bookmark menu, prompt for confirmation. Thread-Index: AQHXQfbx94MAZDqrRUW9ZpmvZVaXaarVfYVw In-Reply-To: <874kfguail.fsf@red-bean.com> Accept-Language: en-US Content-Language: en-US authentication-results: red-bean.com; dkim=none (message not signed) header.d=none;red-bean.com; 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: 037c0492-34c7-4db2-1681-08d9101bffbf x-ms-traffictypediagnostic: SA2PR10MB4457: 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: UJagYoxy9koTaXQoqcu9mWwIa+3HXFBmnIxICgEX+9h6B1y6+Dy1Qjvrc70CDiTRyGi69qVawbVbP6pJfDkJX0ZDNvF2Dqq7fKNbJ6KesnzSTZlWWN2X+hGrpdKpkaexB9XTsippf48XFjfI+G7G0MVZA8vQ/4tntB6ofODYdbNuo4rR+Fp9z7OFW+mXQ2ieJZzEiRijGWDr+Yz60syLhLl242AA/7dPlz9J91LaaMQca8k9N1dWtxxORRj5TpzxBblmxrwO8eMvFrxO3eIc0ZRj5Z9uCxVVWyctTZFn/wCNvDcFepOBuu2tzNqIvOOws6hN53s+vQKK/JcE8fQDEN45qx+Ep0XmnH6aQF0V2Pi/hWH4DseI5UAVjphilN0HfgCuIvLrJCD4ffaI9OTTJLH9H22L7v3CN+oPM7JMRpFvfqMU3ZS20TGQ4STL/U39FA/PE/28owBKGsMoBhWy7aMnoRlOfBb25adC+SCo2HXI6EwSsa0m9qE/PbeySgZnzSsYei7AW2I7iNPeSQYuGnbRQUL50VY6/Aa2dtPah5Ft9+59TpSV+iO+ZUrY4q22uc0EUtNW/XwZwURJk9/wzycDBCm/CpjwxqZWW+lisAk= 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:(396003)(376002)(136003)(366004)(346002)(39860400002)(66946007)(52536014)(26005)(2906002)(122000001)(9686003)(66446008)(71200400001)(478600001)(38100700002)(7696005)(76116006)(6506007)(86362001)(66556008)(66476007)(8936002)(33656002)(8676002)(186003)(55016002)(5660300002)(83380400001)(44832011)(110136005)(4326008)(54906003)(316002)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?7lAFkz2vtpq7moIIA2qW5FUfgrPq9iUj3lnMf/8C2MDkgHOh+F80X4/t8J21?= =?us-ascii?Q?iTBi+uH2Q/0oolxsM2pskdu/4Ewd9l9bqMIdodvyLj3/dX6C0V5QvdUuJDzk?= =?us-ascii?Q?T/BqLssCENtCO+GIyFdu9uF09lXEr0rZ90RXnL8pht3oOKYGtX6IrwL6aZgP?= =?us-ascii?Q?yMiYjUvQtXwAWHeJhDw/r70jzcd8aA02IqOniZf/kH+4XJJiK0bEHIRcxvh/?= =?us-ascii?Q?cCgn/hnvfuQVlnKSFBIKxjPZtA1fQWkagbTFmhUgQfeJrmQoFPLgPE3HPcvb?= =?us-ascii?Q?dIFeOLjADHux4PnSXkl92gJ4VDTjSNddMs309DD0gCOlpoaRsYFPEF8bnKMb?= =?us-ascii?Q?85AomuPW32+8m2LMPQ9eFunpbSISEII8MLfjblGFGtVYn7kkS/KvIqrbiVTq?= =?us-ascii?Q?D9EhmUdAFM3GV5btKQ8lmZnW4gapo/NS4eaekVDpBMfSV2dUq4s9xUQr4M8g?= =?us-ascii?Q?YwtUBhD2xkSRhn/WV+oyU42GDxypR1o3Axagc9gay+d7Y53OrdOdfGt/jESz?= =?us-ascii?Q?i9yVf9PtDmyYQEEPHH/FZFh1hoxEMh+gMNnUDEc0sp4eZiQDEU2SfiiX9/uF?= =?us-ascii?Q?LKruEaivo7wYG4tn/kvf+WNLPY42QdQ5BJvP2pTI2G8SlTyMyVCB6XK0jM+Q?= =?us-ascii?Q?GnSy 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: 037c0492-34c7-4db2-1681-08d9101bffbf X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2021 23:17:49.0102 (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: 8eA3ZE2EFABZNSN0bH9WJW9tgI4pjhppGsl0H6MYsIYHt54QLEJ41BL4fY66NY1p5S9hk9KkB6UI+cHy920BfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4457 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9975 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 phishscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105050161 X-Proofpoint-ORIG-GUID: F21P6F9Rjp05UL0QVKQ4ouB2-atdyRcz X-Proofpoint-GUID: F21P6F9Rjp05UL0QVKQ4ouB2-atdyRcz X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9975 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 adultscore=0 phishscore=0 impostorscore=0 priorityscore=1501 spamscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 mlxscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105050161 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L4=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268941 Archived-At: > >> Hmm, I can understand, but... let me give you my best argument > >> for why to do this instead of implementing undo: > > > > Makes a lot of sense to me, yes. > > While the idea of "undo" was brought up in response to your > > proposal and can indeed be seen as providing a similar > > functionality, I think the two are mostly orthogonal. >=20 > Glad to hear that. +1 to the rest of your analysis below, too, > including that last part about how for undo purposes the Bookmark > Menu buffer can be thought of as "visiting" the file in which > bookmarks are saved. (However, users are much less directly > exposed to the bookmark file than they are to the regular kind of > file that one visits, edits, and saves -- so the analogy fits > mostly but perhaps not perfectly. A person could in theory use > bookmarks regularly without ever needing to be aware that the file > even exists.) >=20 > I don't plan to implement the undo functionality myself. It's a > larger task than I want to take on. Or rather, if I were going to > find time to do something of that size in Emacs, there are other > things I would pick before this. However, it's good to have all > these thoughts archived here, in case anyone else decides to do > it. FWIW, I'm not warm to the idea of undoing operations, here. Consider undo in WDired. You can just as easily want to think of WDired as "visiting" a directory, but that's problematic. It's visiting a presentation of a directory listing. (Actually, the listing can be of several directories, or even of arbitrary files located anywhere.) We support undoing text changes to the buffer in Wired. But WDired doesn't perform operations _on the files_ listed. (Dired does.) It's a view of some files - in that sense it "visits" them or their directory. But the analogy of a buffer visiting a file is poor. The bookmark-list display buffer (bookmark "menu") is more analogous to Dired than WDired. How much undo does Dired support? Only undo to what are, in effect annotations (and not done via `undo' but by specific operations such as unmarking etc.). We don't support undo for its operations on files and dirs that are listed. If you use `x' to delete all flagged files, there's no undo for that. (We have a move-to-trash possibility, but nothing with `undo'.) And for good reason, I think. This can certainly be discussed/explored more, but a priori I think that direction is generally misguided, especially from a user point of view. Take the buffer-list display as another example. Do we offer undo as a way to undo operations on buffers there? Should we? I think not. Not in general. Undo The Hammer is not the best way to undo some things. The bookmark-list display is, like Dired, a view of a listing of things. And no, those things are not the bookmarks in "the bookmark file". They're the bookmarks in the _current bookmark list_. The bookmarks in that list can be loaded from any number of bookmark files, and more bookmarks can be added on the fly, so that the list corresponds to no bookmark file. The only thing you can say about it is that if you _save_ the current bookmark list then, by default, its bookmarks will replace those in a particular bookmark file. [On the other hand, at least with Bookmark+, you can save the bookmark-list display itself - its current state - in a file. And you can restore it from that file (or another). So perhaps there's room for being able to undo some textual changes in the bookmark-list display - like using undo in WDired. But I don't see that as a rich mine of interest, at least not a priori.] ___ As for offering undo of `x' deletions as a _substitute_ for prompting for confirmation: that's simply wrong, IMO. There are several reasons that undo either won't help or can cause harm in this context. They've already been pointed out.