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] New tab-bar-detach-tab command Date: Tue, 5 Oct 2021 17:27:57 +0000 Message-ID: References: <87h7e4ikkz.fsf@alphapapa.net> <87pmsrrh7y.fsf@mail.linkov.net> <875yujizgi.fsf@alphapapa.net> <87o88bb21y.fsf@mail.linkov.net> <871r57i2cz.fsf@alphapapa.net> <87k0iu6n6x.fsf@mail.linkov.net> <87lf388zo5.fsf@mail.linkov.net> <87r1d0woq1.fsf@alphapapa.net> <878rz8aruo.fsf@mail.linkov.net> <875yub5sry.fsf@mail.linkov.net> 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="38401"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Adam Porter , "emacs-devel@gnu.org" To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 05 19:55:10 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 1mXoek-0009mW-Ho for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 19:55:10 +0200 Original-Received: from localhost ([::1]:48670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXoei-0001bk-Ii for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 13:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXoFL-0002mc-J1 for emacs-devel@gnu.org; Tue, 05 Oct 2021 13:28:55 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:36840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXoFA-0007vq-Ho for emacs-devel@gnu.org; Tue, 05 Oct 2021 13:28:55 -0400 Original-Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 195HSdrd004511; Tue, 5 Oct 2021 17:28:41 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-2021-07-09; bh=F+E6aunQs23P1e+buSO+4RiLhTSJVZ1nl6yuE5W5vyQ=; b=nc7VRziIspqIcpZzq/TR00Kp5c0mFpqDEi2x38gIb4kban+WuFJru0Fx8/MJoCqJjwN5 yFGG0HHyUwsCpm56L3cVqenT7zSfDigXZBNo+nWALR4kfM99kqtHj8uIz2L7V3CC+uCF /x28XgkHg5Z7LJ0lfnQLhB7RzMXTxyaKGHHZCEBRx/wj2Ig6SPWgxZdj5dquiqhugtvM 7e7q/PGIo+o45kmKek3yb5nSo2Pk/ajfVyxGLk9fMhxCjh8MPXQhHe8XefUgk6jbVke8 jpTRi7QU7GrqiUOEI05eVByF+GEqtl/GiVQYGsx5QQdx7uxoEN162NLxeepL55uknsTi Ww== Original-Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3bg43e0mjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 17:28:31 +0000 Original-Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 195HGKlN047017; Tue, 5 Oct 2021 17:28:01 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2177.outbound.protection.outlook.com [104.47.57.177]) by aserp3020.oracle.com with ESMTP id 3bev8x2mkx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Oct 2021 17:28:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i98fEZi10aB4jAq8ywsQPBzlgAIXUTnK27oKw4uiNK6inHX0mDX+2eCS4EdPTmCiTvailHHdWD64ZkK/tFkygz0fWLIo4J6cdov2teD9mDlg/zt7KRKqpL5TWoloH5zTeUFmn5HnS0uq2QNitqPjXO0cyifqOulNjsyfdiDSRTT06E+lyXiyRONuV6aGdEEvo6sDV9t0XySenk5l7TCDkfx1sfAzneajyB+qr3FpDMvgEk+WIliqOceE69c1pIXrF6901UHYwj4JfoimTDMgcBy2FMi9+dsGwT9ZU+e6ueybbGI4ExtXZegfSSdZj+3D81HSoFHmzJPcEY6oHqTDJQ== 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=F+E6aunQs23P1e+buSO+4RiLhTSJVZ1nl6yuE5W5vyQ=; b=Axk70a9Gr3XWRFqiHGH/Eexes4M5cIrvaIs6tImvK36QiWz1WgbQ22Kqrv/OprY/+Hl5BktO83ho8+GKl5pgVjX1/Pz+ipT2sFLy86puXFrqosv9kVf263//6UpR6V1+yLCUaS5tET26jLNksadR26Zkq31M0Y+8rB9qxMnuH/SDQ+x6TFg1HPO4ID1CGUZSNM7qZxe5wUB/z3XnWjsXg7jtV2ZyZ8HjMrESHpJFi20LWvDJAgwv0cKn+53qgOrg1EDsRBtcMeBm8iupnX/HpGJNtT7XKbf9fzksKQQaNZInIwKExmFe66FzNnITIGHit3NFDNq+99kX/RJzH8XCfQ== 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=F+E6aunQs23P1e+buSO+4RiLhTSJVZ1nl6yuE5W5vyQ=; b=dg8tQTgNqDi5nn4lDW/JzDovDjNKgiek5dush4IEP/V9RF5A2v8rrP2Seqn1GykIVuhudHXn7PrBbSodTWxraJBmKFwlUqUXLmIDjhZk3Q9LWJ9HD7cVABfd2ldOFjvNCqRIdCtN5IxnYsJm3bx1uHeBDQkKYhybjKdwNyEt0eo= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB4086.namprd10.prod.outlook.com (2603:10b6:a03:129::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.22; Tue, 5 Oct 2021 17:27:57 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 17:27:57 +0000 Thread-Topic: [External] : Re: [PATCH] New tab-bar-detach-tab command Thread-Index: AQHXugqgzCl4/ZmJ+k6VcygHQ+c/savEo5yA In-Reply-To: <875yub5sry.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US authentication-results: linkov.net; dkim=none (message not signed) header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 26b97134-f912-431b-3c4f-08d988257929 x-ms-traffictypediagnostic: BYAPR10MB4086: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jQO1nDVo68rwEaHeqNARZLrovj5jSdiU5+gZG2DIZ1m1KwmXi5Zh2j9JkXc9KUDH2z4mJgQt3V51LwmvcPztTKKeYU4sevmXgMRyf/PCNIH2Mla3n9XsqlpG3O7Ig93sFmo+h7z/e3zf17yyfDAKllh/rOEXKHRQGWw5ylhO/ZoncmYqppa3qWINkiBsN73Qopxg4X8qBP+tRCh4JC9SDMzYC3kUGAN8auhNxkyGrHzHQGGE/JMsrWm/psjiATVamlV3J9flYnRW8tw1AfBNbHt4eIv/p+zeRzAljAN0hSgykn8h/x/HeQuz79ko9gGLS4m99My9wO9Cdtz2oLH7bP3IW0WB0YxUXpkxWDL5EueAKjQFvybZ88evXo17efqQ9z0ItzinN2yHeBr3CAvt3+dISt7rnB0lqngKviOhBYgVoBdwsrhEM4aTRbmKWDrqxeKDHOqGjA13LqYNGp4rKSGfq4+XqPTXcHsILhTt6Zs6PQDIBiNDt8t9ib2cbeXaO9ST1ia3Zh1mSlfPvdAMcCU7MXOa2WBE7DNgzITs6cS5zMrkSNeFqELLn+okJW592+SH8KHjtzBzTlgXhlprmUSr5+UCEQYUCNpbKJcX1DXLMoZjyjdsAMd2qK+TtX+zTkL1SaBJ1HudtZM+v3uLx0izFKJc1HP2yVkrXDRhPquRXHKLC4WJzTFCH31ciWXF9jF0FGnftak1UpaCT0CdWg== 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:(366004)(6916009)(316002)(508600001)(71200400001)(5660300002)(55016002)(122000001)(83380400001)(38100700002)(54906003)(52536014)(7696005)(8676002)(26005)(2906002)(38070700005)(66556008)(76116006)(8936002)(6506007)(186003)(66446008)(66476007)(86362001)(33656002)(9686003)(64756008)(44832011)(66946007)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?o7FiZ1cG0caX7QBYsysMumVAA5O7TftFcTg+TgFCbKWEVJSMxNsYwVnmL9i2?= =?us-ascii?Q?Nbhj05Pgz1PZ21iRSaa+cIlrG/vtJ8MDzhH8qdJfEEGUawbEnsDMvfkjPfbU?= =?us-ascii?Q?M4T3Vacl28sfH9ds/p60ASTTz4LoxoitKSjcgBZrGg+cIy2/sO11p1lyL86W?= =?us-ascii?Q?aW0C9TXHqvoQqJ14fsHoj+kjWuit1Hrj2VsAZRx0ERUoVj4nL+8Ca2N3XhHl?= =?us-ascii?Q?b+nKnVlaOTZFQ/tCVAxOjPo4NpU8UD8X+pHretGJrNC1yQlwezhbpLp8Iyyp?= =?us-ascii?Q?1gdnxBuc/NuJ36nty7EfVZXpssNOplPWYyGPRNR/1nMw6EFL76I7ygieU3nW?= =?us-ascii?Q?VYuT1S4ee1Tt2ZGB++0GTipXtt4p+Q+2Gi6nigkiXmAdMKC0ZPZcrN84qKq5?= =?us-ascii?Q?M0/H3efJzB7oOUsI6zzqtTRGnSxNNuIfQHJZXso91UrdUa61KHVy4E22tVsE?= =?us-ascii?Q?jqu85BPtXWy6dSXWoDrr2MjZ6pwUuMYZdVlLpVdwhobf/ZBC3cmv4Nsdtk0l?= =?us-ascii?Q?l4RjvgfFRzQ8vemJlVSvqreiIb8oS4emqd5dsuQr1uF4AsosJ2oSxbiHFAJ/?= =?us-ascii?Q?GsS/4roTwkeOb7gwXhlmM8QWR1wpGbMrlmnF5z7oIo0dbZd1ELwFTwHCrHDT?= =?us-ascii?Q?Go x-ms-exchange-transport-forked: True 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: 26b97134-f912-431b-3c4f-08d988257929 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Oct 2021 17:27:57.6354 (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: gTkrSbsQ+NxonNzLF086hsx1sBa/0gWOb9cRjRa7YovBWrvN7rzWqT2eXT6D5LNriFIQeOTW7NcdaVqmvdb/tQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB4086 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10128 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 adultscore=0 phishscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110050104 X-Proofpoint-GUID: WMOGFgDJ-LXpjVwNY145CAzOWawITxNY X-Proofpoint-ORIG-GUID: WMOGFgDJ-LXpjVwNY145CAzOWawITxNY Received-SPF: pass client-ip=205.220.165.32; envelope-from=drew.adams@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=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:276355 Archived-At: > > I don't know the signature of the `clone-frame' > > that was added to Emacs, but perhaps it could use > > a prefix arg to provide what you're proposing: > > clone the frame (same frame parameters) AND clone > > the window config of the frame in the new frame. >=20 > Its prefix arg is already used for something useless: >=20 > (defun clone-frame (&optional frame use-default-parameters) > "Make a new frame with the same parameters as FRAME. > With a prefix arg (USE-DEFAULT-PARAMETERS), use > `default-frame-alist' instead. >=20 > FRAME defaults to the selected frame. The frame is created on the > same terminal as FRAME. If the terminal is a text-only terminal then > also select the new frame." > (interactive "i\nP") > (if use-default-parameters > (make-frame-command) > (let* ((default-frame-alist (seq-filter > (lambda (elem) > (not (eq (car elem) 'name))) > (frame-parameters frame))) > (new-frame (make-frame))) > (unless (display-graphic-p) > (select-frame new-frame)) > new-frame))) >=20 > Why does it use the prefix arg just to call another command > 'make-frame-command'? That's what I did in my `clone-frame', in order to have just `C-x 5 2' bound. IOW, I stole `C-x 5 2' for `clone-frame', and allowed a prefix arg to give you `make-frame-command'. Personally, I don't use `make-frame-commands', but some who use my `clone-frame' might. When I say that `clone-frame's prefix arg could be used to get the behavior you're requesting (clone the frame & duplicate its window config), I mean that the prefix arg could do more than one thing - there are different kinds of prefix args. ___ We _could_ have a single command, `clone-frame', with prefix-arg behaviors for `make-frame-command' (i.e., less than `clone-frame') and window-config duplication (i.e., more than `clone-frame'). And we could use one key for all of that: `C-x 5 2'. That likely won't happen, based on the fact that my suggestion to give `C-x 5 2' to `clone-frame' (with `make-frame-command' via prefix arg) was rejected in favor of Emacs sacrificing yet another default key binding (why?). ___ What's more: IF we think that a reasonable number of users might prefer one or the other of those behaviors as their _default_ (1: make a plain frame per `default-frame-alist'; 2: make a frame with the same frame params; 3: make a frame with the same frame params and the same window config), THEN we could add a user option that controls that. Then the prefix arg would let you get the other two behaviors instead of your chosen default behavior. That too is the kind of thing I sometimes do, and the kind of thing vanilla Emacs abhors...