GNU bug report logs - #52023
27.2; Enhancement: `this-command-invocation-(buffer|window)'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Sun, 21 Nov 2021 18:13:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 52023 <at> debbugs.gnu.org:


Received: (at 52023) by debbugs.gnu.org; 22 Nov 2021 08:13:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 22 03:13:19 2021
Received: from localhost ([127.0.0.1]:46750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mp4Ry-0003Lp-VI
	for submit <at> debbugs.gnu.org; Mon, 22 Nov 2021 03:13:19 -0500
Received: from relay12.mail.gandi.net ([217.70.178.232]:33427)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mp4Ru-0003LA-LS
 for 52023 <at> debbugs.gnu.org; Mon, 22 Nov 2021 03:13:15 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id 63A9120000A;
 Mon, 22 Nov 2021 08:13:06 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: [External] : Re: bug#52023: 27.2; Enhancement:
 `this-command-invocation-(buffer|window)'
Organization: LINKOV.NET
References: <SJ0PR10MB5488D9A049A8CDF9B9643862F39E9@HIDDEN>
 <867dd1mhn7.fsf@HIDDEN>
 <SJ0PR10MB54884F949A4ACD455C8D4031F39E9@HIDDEN>
Date: Mon, 22 Nov 2021 10:06:10 +0200
In-Reply-To: <SJ0PR10MB54884F949A4ACD455C8D4031F39E9@HIDDEN>
 (Drew Adams's message of "Sun, 21 Nov 2021 21:36:49 +0000")
Message-ID: <86pmqstxxs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52023
Cc: "52023 <at> debbugs.gnu.org" <52023 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Maybe these functions give what you need?
>>
>>   (old-selected-window)
>>   (window-buffer (old-selected-window))
>...
> As for the second sexp you show: the buffer
> that's current when a command is invoked
> need not be displayed in any window.

It seems there is no such thing as `old-current-buffer'
like there is `current-minibuffer-command'.

> As for the first (function `old-*'), the
> doc says ~ it's the window selected at the
> time of (before? after?) the last window
> change.
>
> It's not clear to me whether that's the
> `selected-window' when this-command was
> invoked.  Is it? always?

I don't know what `old-selected-window' returns when
more window changes were performed by the same command.
But in any case you can use `pre-command-hook' to store
the original buffer and window.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52023; Package emacs. Full text available.

Message received at 52023 <at> debbugs.gnu.org:


Received: (at 52023) by debbugs.gnu.org; 21 Nov 2021 21:36:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 21 16:36:55 2021
Received: from localhost ([127.0.0.1]:46244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mouW7-0007yz-1C
	for submit <at> debbugs.gnu.org; Sun, 21 Nov 2021 16:36:55 -0500
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:38982)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1mouW5-0007ys-FC
 for 52023 <at> debbugs.gnu.org; Sun, 21 Nov 2021 16:36:54 -0500
Received: from pps.filterd (m0246632.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ALL5R49000537; 
 Sun, 21 Nov 2021 21:36:52 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=FMAc/PoK14UICk+xApKYa7M/yZmGzLo0NvUmXtLfttY=;
 b=mZB4+gNL/RMvuLzAQZ7BaS1v2+srf9xHxc/ZYesGJ7ndzfDRBZg/ECfiYeLIV/rMJv/W
 rtA5odz5Dc47USbRyRZmEXMdZWfUKKl0KQbVHkoVk9BXSsx4e1QnTIz/5nby8lsXTR92
 TX5YWuiAGVtF9LL0EFiXUdJH9l5dLWJ53WOb43dA4msCATRGjIoQmTxUmAjDdUTwthtb
 xOCNFYg+rIJkz+w4FAgaTXNjawCE+Vm4RIYQx/DSwuJXtikRKzQDX2EatAT+tQ814/jY
 zBN/yVQJh86EJAW27+OpMBFC0smKrlWXH0ysrwxsfkigIZ0mRe/0vXUkGXF0omyF/zki JQ== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by mx0b-00069f02.pphosted.com with ESMTP id 3cermsmtnf-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 21 Nov 2021 21:36:52 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1ALLFLXD187725;
 Sun, 21 Nov 2021 21:36:51 GMT
Received: from nam11-co1-obe.outbound.protection.outlook.com
 (mail-co1nam11lp2171.outbound.protection.outlook.com [104.47.56.171])
 by userp3020.oracle.com with ESMTP id 3cfaspt3n8-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Sun, 21 Nov 2021 21:36:51 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=JzHrTtJBb0gGW1j/K1UPR3NmUQr/71UWl4X/dV795HbaY6QYaRq/X2LL3EJv9WwuU1WBmlmqWFbJML5UwOK9049kzs9HMKAHmYuNFssxKVbSy2uNevJyDsqfG8J3R2nHlA47kYdGdf4VWlH/fYXOU0IWAxVzIO62VkVvImYy8U8msmVMOkK3AHfjmKJQor0CxJniO3R8qXwf3BTWVIbjxb0fqejMmflnCjMjh6YJo6at1rjd0O324EWNhpxXjqNnQmhNEHvpcl3Mxy3L4HV9XjNq9Ghmmnds3pHmItHHhsVnIkpj1naPaugTPfYPmoVxx71ovemKbWgtbQXpfTxCVw==
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=FMAc/PoK14UICk+xApKYa7M/yZmGzLo0NvUmXtLfttY=;
 b=N4gi7Yzn4BBF9B6ukg8I24bE3NTCJW5AyJ0VtQDzDbGIdWNs+vxPKxCxctUPQHgoiJ32OqFyRr5YcqJQYEF0UnwZO+LhekpoSNPyWHaccPs3shc3NaYgJ+LlqWF4oFj9Pt0DLo/g4F+GdDpJDK1PNyh4xKyI8m+q2av46R5zlJZ4itc3Kl1OWs3t95N6DeEdSoGI1JD+K5vtwa1nwmP978xArSQ/jagQmkZ92N+LMgWsc6IJ+L2HzElqq/Eb+Ks3SmtEtOzXw7wcV+JWCAiauNumByVrlC/BtLg4sk5pYjMw3yEiCVtlk7FN9HcSqPEyQDT/y+5HIOR+/hTFhVTelQ==
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=FMAc/PoK14UICk+xApKYa7M/yZmGzLo0NvUmXtLfttY=;
 b=jiSidrC3IFJOwbO6pIAjn79aIGu9Ceiiyh/wUIScR1SazoN1yKApOewSBRze5EnZitKH/VWbqp3mgD+ajOtk8omuqs0YxY0cJN3dOG7GXw997TmyOGZ9KuYR51pkevcCd1ZeAbkvAmm7iVtJzPLTJLvzZqFWXrLWvczafucrLY0=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by BYAPR10MB3557.namprd10.prod.outlook.com (2603:10b6:a03:125::27)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.24; Sun, 21 Nov
 2021 21:36:49 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::4588:646c:e330:8bc0]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::4588:646c:e330:8bc0%7]) with mapi id 15.20.4713.024; Sun, 21 Nov 2021
 21:36:49 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: RE: [External] : Re: bug#52023: 27.2; Enhancement:
 `this-command-invocation-(buffer|window)'
Thread-Topic: [External] : Re: bug#52023: 27.2; Enhancement:
 `this-command-invocation-(buffer|window)'
Thread-Index: AdffAzdpdFicVjexQuGCOoXgRRGuIwADBNhdAAPXUzA=
Date: Sun, 21 Nov 2021 21:36:49 +0000
Message-ID: <SJ0PR10MB54884F949A4ACD455C8D4031F39E9@HIDDEN>
References: <SJ0PR10MB5488D9A049A8CDF9B9643862F39E9@HIDDEN>
 <867dd1mhn7.fsf@HIDDEN>
In-Reply-To: <867dd1mhn7.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 7bf5751a-bf75-488a-19ac-08d9ad37066d
x-ms-traffictypediagnostic: BYAPR10MB3557:
x-microsoft-antispam-prvs: <BYAPR10MB3557DE56A7CBFFD6F06C1DEBF39E9@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Mh+L5mDYQgLgSIqDT/1PI7oE48wyndmwyR6dYTKExTXe9EKAeQp8UrW6NbEDXM3voMutEf3KQ3/10NoMLTx1HS8eop4iPCqrx2zAHNXjvFNPem+ATk7MLsRLpXAps2/KEV2FvbWGxxT+iiDzsjrDAJg+8nE3b9qEyH1RMAybLfLPo8PbqLw/U+WTn3sLROgmbIMTe2GWOCdn+ZxPriQ+FLX9R0vmRxBoPpU89hHz7k0IU6V+4/Z53Bp5t1c8rZnlBdo2cA9kp0tpjHxflV1e10uC7mTSidwNx1OpDvzYN8vL2RKa3Kfngl70aKwZJyxgrtjV6dL0m5paMth/CLST/ZlymLiTJN3xgIjtVsbEE3vycTsgOMub6bM3xoGWuBjBj5L8YnPS9EoDl1jQkI+kGNTTJiaDtaCsUmxlb3Jpj9TGS095YsbiLZ/9LENE34RUQIkaKXeHczBTJXDLD7ezadZtjlx/sUY+bwX3bfh8MKFWquHLn4GEQHLiV904Srv3jBjUJpfR8Y+NFxKc1lf4RhzJ5LjufbUlfiMjOlbfN60cQnRR4EROMECRgELBx26BEJcmXvMEiMTYLmZ3M+DUzgjytmm6iu5EqSwsPFt9NI6yssXzaUyTz6WvEv+DNE58KLD8KFhHYVdWGLpCsgqZHgQtf/1kEltYOzhBJGCJQZhUndIYm6QC4RYg5L+zer9bw6/K3dDugzzUGGjvj6Z1jdxlv6Nu3D1DNdtlXt/P2eE=
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)(38100700002)(122000001)(4326008)(8936002)(6506007)(26005)(8676002)(83380400001)(508600001)(316002)(66476007)(66556008)(64756008)(66446008)(9686003)(66946007)(55016002)(38070700005)(76116006)(71200400001)(52536014)(7696005)(5660300002)(33656002)(186003)(86362001)(2906002)(6916009)(44832011)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GxAFKYWU1tHcoU+fSjGJg7VxkCh7yUqMz00GhP+KivvzPBDRm17q+O/sRKsv?=
 =?us-ascii?Q?Updlk37GkN6CMkTizPaeRGtHF/wF053P6NVQ4jGGl/ismXfJvEkA035hKQrY?=
 =?us-ascii?Q?Bg27xOKzcbTkTXDD/e6jd7/sqpcroiNJjA5kY2RJa/TwTxFgRgE9O5M7BRpB?=
 =?us-ascii?Q?UykkIWQDk36rZC4SjH2IEEuimz1p12sw4QeUpsi1Fo7RqYJAMt9dAQ1Yzj+Y?=
 =?us-ascii?Q?1+fjzVLmnrgW5qD8GabEToo2eNW6QR2TbbyZtjkpFULCdg3m4fXL2XYzSKrX?=
 =?us-ascii?Q?q0gAHZpJZuJ91UMP3WTgYDFbYiosriBfe7M0hOdkiIIblzdRZyJGbSmvl8wX?=
 =?us-ascii?Q?rH0vaFrxABq44c3ldE1EbzH/9xLHWRltdSKlv4aFMWRGUSaUlcRqGdusTlwT?=
 =?us-ascii?Q?SgTij8vekMlkSRsr1qDVPYSadAXH8QVYOyLv6NyWEayBXVQn/4VqXUd+3Dv8?=
 =?us-ascii?Q?gTJhjWzsdl3UHjX6jsQ2PHLjWvj3pI0c0V+XLqU0gGg0/+8cqRK9RHXmwhzV?=
 =?us-ascii?Q?b2CBtFIi/3zeyECKNz88OiyCQcxKJ4bq+UOcpP6QTm9aom+aA7VBTtVWQ5gA?=
 =?us-ascii?Q?oAI4Saa9oOP+y7YkBrdhjaHg930iHim9HYvi/3DTuW+vz9jgi93XkC2hW6Qp?=
 =?us-ascii?Q?Bclxf34zhyuEPXjb8xR9dO/ZWS6sX0bKeLM46+Us5zN4roKh6ltHMMBHNjmY?=
 =?us-ascii?Q?Q4YUmFbopEm69s4cZnsSJ6ybcZ0iR+XO/gKOPX9kSft13xhwmJwJBbE0DLr0?=
 =?us-ascii?Q?MMeZc+O8Uy3UG7UT/oqnkyfadrb7Z57G9Z0X5hRPeJFKR7GJxMdUSMeGHKOo?=
 =?us-ascii?Q?puMxany8RQat7rLJQudMx9yT4AqdBfGc6LUa6zJGAn+Jxiw5OXInx+p4a/w9?=
 =?us-ascii?Q?nd4IfKJxCWyT03vpCLW9EwSW7+/IgaYD7kuXXUe01dDgwyhtqaFeLGCcc0hx?=
 =?us-ascii?Q?MSxyRMn2NwMfbjVFjflzfW6e2xvnNVTdx6WQjqck8FJiiSwYYA6yyAnzGIaT?=
 =?us-ascii?Q?+F4MKyXvmTtvnEPtfwVgCjZsTZlYMamiNAkjkWgsXIOdpa30BSXahnGTzQSK?=
 =?us-ascii?Q?ar+ofI6GdMZtqxGkRV4MZzk8heufidYD96wXf5wTblSFw5FV+SxK0HWB8EMn?=
 =?us-ascii?Q?QLdlU5JbRhgj+XICoRFH16bdxRZKwojoZKRYp/Lhh8MECO69N7ILa5VVzTzK?=
 =?us-ascii?Q?7xtfsVLchxNphuLWbZ4Xh1BimB0smBOyTMJ4zkQLZgYQgOm+9iWOnM8966WV?=
 =?us-ascii?Q?zecyF9UojIPZICC61EQ7sORD58BcnqC86+6QtyT4IIoLxP2KZH1jgvlskUnq?=
 =?us-ascii?Q?Pz27UIiHxSgLKtcC+EWHEElzLM/zm/avl1El68Ev85r78HDn79U5k5L0EawF?=
 =?us-ascii?Q?Vebc5GTv2xA0bEp2x+nngH+aTsasJtHGmvGvm/CdIX9nfQJLKylxKyE6FhAC?=
 =?us-ascii?Q?yjHtul+4pEtVOd7ltaL1P4pqBPj0YkBqXqz8EF1UpkKB/4ZYUY5Ur5p9iFgC?=
 =?us-ascii?Q?cTsmCBtveGn9/4ou+ST8KkN0wPONhqXJ+5+2Fw+NaiC9p96nMHtdd7R1krMz?=
 =?us-ascii?Q?ky/tSTu3nYRGnmHcxeDjE98inUqbD+q2KLrxQlkYtpQminl/qJee4B8ycWJL?=
 =?us-ascii?Q?Pw=3D=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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: 7bf5751a-bf75-488a-19ac-08d9ad37066d
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2021 21:36:49.1021 (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: ncZAlIJuCZ8at4hqIX6CVXLBFk9/UIgmozGkQPJDGUnRFFxHj23co1UvJBWGQomfWJzrBoh3m40zEJf+yaE+Yg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3557
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10175
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 adultscore=0 phishscore=0
 bulkscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000
 definitions=main-2111210132
X-Proofpoint-GUID: AT__LQAaM6QmfwunOqHShlQUgx_IHVlW
X-Proofpoint-ORIG-GUID: AT__LQAaM6QmfwunOqHShlQUgx_IHVlW
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52023
Cc: "52023 <at> debbugs.gnu.org" <52023 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> > Enhancement request: please consider adding functions
> > `this-command-invocation-buffer' and `this-command-invocation-window'.
> > (Other names OK.)
> >
> > They would return, respectively, the buffer that was current, and the
> > window that was selected, when the command that's the value of
> > `this-command' was invoked.
> >
> > Currently, to get this information a workaround would be to use a
> > `pre-command-hook' function that sets variables, and then to test those
> > variables.
>=20
> Maybe these functions give what you need?
>=20
>   (old-selected-window)
>   (window-buffer (old-selected-window))

Thanks for looking into this.  I wasn't
aware of that function.

But I don't see how it provides either of
the requested functions.

As for the second sexp you show: the buffer
that's current when a command is invoked
need not be displayed in any window.

As for the first (function `old-*'), the
doc says ~ it's the window selected at the
time of (before? after?) the last window
change.

It's not clear to me whether that's the
`selected-window' when this-command was
invoked.  Is it? always?

(The doc string for that `old-*' function
seems unclear to me.  What's the spec for
the "window selected the last time window
change functions were run"?  Is that the
`selected-window' just before those
functions were run?  Is it a window that
gets selected by running those functions?)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52023; Package emacs. Full text available.

Message received at 52023 <at> debbugs.gnu.org:


Received: (at 52023) by debbugs.gnu.org; 21 Nov 2021 19:37:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 21 14:37:58 2021
Received: from localhost ([127.0.0.1]:46060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mosez-0004q6-Tr
	for submit <at> debbugs.gnu.org; Sun, 21 Nov 2021 14:37:58 -0500
Received: from relay11.mail.gandi.net ([217.70.178.231]:36159)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mosey-0004ps-SR
 for 52023 <at> debbugs.gnu.org; Sun, 21 Nov 2021 14:37:57 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 9C5ED100004;
 Sun, 21 Nov 2021 19:37:49 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#52023: 27.2; Enhancement:
 `this-command-invocation-(buffer|window)'
Organization: LINKOV.NET
References: <SJ0PR10MB5488D9A049A8CDF9B9643862F39E9@HIDDEN>
Date: Sun, 21 Nov 2021 21:19:04 +0200
In-Reply-To: <SJ0PR10MB5488D9A049A8CDF9B9643862F39E9@HIDDEN>
 (Drew Adams's message of "Sun, 21 Nov 2021 18:11:51 +0000")
Message-ID: <867dd1mhn7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 52023
Cc: 52023 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Enhancement request: please consider adding functions
> `this-command-invocation-buffer' and `this-command-invocation-window'.
> (Other names OK.)
>
> They would return, respectively, the buffer that was current, and the
> window that was selected, when the command that's the value of
> `this-command' was invoked.
>
> Currently, to get this information a workaround would be to use a
> `pre-command-hook' function that sets variables, and then to test those
> variables.

Maybe these functions give what you need?

  (old-selected-window)
  (window-buffer (old-selected-window))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#52023; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2021 18:12:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 21 13:12:03 2021
Received: from localhost ([127.0.0.1]:45981 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1morJr-0002eI-Ct
	for submit <at> debbugs.gnu.org; Sun, 21 Nov 2021 13:12:03 -0500
Received: from lists.gnu.org ([209.51.188.17]:59542)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1morJp-0002ds-AF
 for submit <at> debbugs.gnu.org; Sun, 21 Nov 2021 13:12:02 -0500
Received: from eggs.gnu.org ([209.51.188.92]:39878)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@HIDDEN>)
 id 1morJo-0002Wl-LZ
 for bug-gnu-emacs@HIDDEN; Sun, 21 Nov 2021 13:12:01 -0500
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:19596)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <drew.adams@HIDDEN>)
 id 1morJl-0007xk-BR
 for bug-gnu-emacs@HIDDEN; Sun, 21 Nov 2021 13:12:00 -0500
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1ALF22a5016503
 for <bug-gnu-emacs@HIDDEN>; Sun, 21 Nov 2021 18:11:55 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : subject :
 date : message-id : content-type : content-transfer-encoding :
 mime-version; s=corp-2021-07-09;
 bh=eyKDnMWQEJGXaJieufwBo+PJGLZjUIoQiX85P5n/kaw=;
 b=OTQ2YoHzBIThCjVV7XWaeV+bRYBUSSzSQUfjPaDv6SV8IB3z76znMIOEsf8TCzT1ryTj
 k/at/9IX0Um2KAqMzwH+UN3wKpgq1C9hmLMH+hT25NLL7UD8VVaLczJktziDG5uD/ih8
 aeHKo9ssTHzjeAGrY8jzjY74Iv16a/VPBPac1iEceG3i4akIZpUt3rk3P/RZrFsQztHx
 yscq3j6yt2fDelZ23gnnc2U6sQuQBwKSHsnNC6IRftkRO2fzi/6tggKHaWmAH/mCcyiI
 NA8pHA0OvtzaqQvCQKWbtP4LB8gXa2z2orIqyayQvq7DHzJrnVbP53K7eomGcYbmqLV4 tg== 
Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80])
 by mx0b-00069f02.pphosted.com with ESMTP id 3ceqecckqm-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 21 Nov 2021 18:11:55 +0000
Received: from pps.filterd (userp3030.oracle.com [127.0.0.1])
 by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1ALI6TNX053264
 for <bug-gnu-emacs@HIDDEN>; Sun, 21 Nov 2021 18:11:54 GMT
Received: from nam10-mw2-obe.outbound.protection.outlook.com
 (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101])
 by userp3030.oracle.com with ESMTP id 3cep4vpnww-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 21 Nov 2021 18:11:53 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=AWwIm0m+cQaFhLrXSAwK3craMGPIYFcTs5Uu/k5yIuSUirsANNmfibEiNjExd9BXXxSCEBLdQj0GYQl9piJD7xtnRjKUH95NYIIltI5CLCnYi3hMxnM+EWUCND/nCuamucFor0x37/waiBIRQGr2ct9vbTAMm1uiho/Ndo19Qo4l4xqdX90xb3foToTRb4IF846oslH1kCmNimZs5c9npLls6Am9NTnWXZ8c27poMQeuUyUnIMRGK1JTlIo13ojyvnuQ6PSC8lXfZoX4bxBdk0z/ElNVLrY51yqLTm3LlLnbCOa4eJiX0LkfOHqo+avOiKXPRrqtZumBn1YVEBkpcA==
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=eyKDnMWQEJGXaJieufwBo+PJGLZjUIoQiX85P5n/kaw=;
 b=ZGN+LBYEj/J+9REsSCAaCYTGxSr6tlOprd+MjcXI+hhcRi7GmU3GQIGxBcrLApsKKL2ft0EnDLSmaVWiJEafwVpdeppvcfgMs8hP2kgnAvnGG4DwUiwPm/R3MRRt5vDz1xYDa25YmoAXY+yRxv9T/dXRiB0HFCZT4RSCByug48hiWuc4zEWxFwC/cAyHjbd5gVITuz8OdKBKNskvWifFScVAMX5G89oIvwHrpYBEClf+uIYVImqKzFKzVH38umiCdc5SnDo9omlRuaY1IxXni4GOV541carAPc7K6ZFHROHilKb3iyG0UIdGqDjggB2bmWvMKEUGkcl/+n4U/dE0Kg==
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=eyKDnMWQEJGXaJieufwBo+PJGLZjUIoQiX85P5n/kaw=;
 b=yXO5/FMRobuE6k3SJCg354gv9qAoXr+9kYn9hiUYoQH81a8P3Ifg5cJ6hL3BJ8OhZP9GaLqjG/EMcCtEqjxoVfk988skkrwANc4/ezX8xBNxFle8J+0GZbJF7mZu4dphlFWac3aj2iic4PTUhspEFye6U7ABSHPdygp22nxaY8o=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by BYAPR10MB2965.namprd10.prod.outlook.com (2603:10b6:a03:90::21)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.22; Sun, 21 Nov
 2021 18:11:51 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::4588:646c:e330:8bc0]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::4588:646c:e330:8bc0%7]) with mapi id 15.20.4713.024; Sun, 21 Nov 2021
 18:11:51 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
Subject: 27.2; Enhancement: `this-command-invocation-(buffer|window)'
Thread-Topic: 27.2; Enhancement: `this-command-invocation-(buffer|window)'
Thread-Index: AdffAzdpdFicVjexQuGCOoXgRRGuIw==
Date: Sun, 21 Nov 2021 18:11:51 +0000
Message-ID: <SJ0PR10MB5488D9A049A8CDF9B9643862F39E9@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 1dad02a8-17aa-481e-cfe0-08d9ad1a6460
x-ms-traffictypediagnostic: BYAPR10MB2965:
x-microsoft-antispam-prvs: <BYAPR10MB2965EA9C01B12D5D62936934F39E9@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: ikycQg+B02jryty3k8vQNgZuXcRbCaRrSAORuyp+Gzn1rVzbyMj+y0DEs1bHHQbMRwZa9NqDZgKHd51w0D3fnvdu2pxbNetKzxE6vroq88Nt0T8rBNoDnAvTi5Bx984VQu1ar3TBgipILP8Ep3rlqofSghbUGoak48oxiaZDnECHZTEb+QGg90vQRi7HEjBqh7jcIVu9LUrOr0L0yMG9W3LNFdcc5xyueHHATz4WihYcz4CLGUX+6Jci2E/SOOSfXj1VpalghcUXciJtYMN6sdWholv9i1gJEIusyuVMSIoBvQZwLCKkJT1nUfEFP6DjQoI5lXRXnn814nnh5XwG5ZBE0sG4NyDlKvfiDHAdy+GF75f2iCD7Y5B7svG07wvsjaHBo1XBU3YgoPdpdq4VtQTx/HgM/94vNoes5H3Mk8NHYO0bitkDbCcW55LYWjv1rVb8YIZP2c/K4lIsYic0qkMGQoPiA0lWX4C35UDHVxp7bXMezEBFO5ro4/m4l60uJuAQii84RdIutCjxsijaG/LH79Ir7EVZVqO5mg6Gm47tCDoaeXbtzAjTbPMLHEXK7mkK5LDaG1u6pdaks6SXiw8HuE9D8sycnhA0uKuLKt7VhXDwhsBPttPlBC97medcSZfwcyN5Nqrdy1sDO2i+QvWSJ0a5G7vxCMfa4seYA8GQtY3Wjnx5IFpwDxdpgFr0npdgvighPIbXRY2m1qzlcEpmWwWgEKtSqiyzeM+3glI=
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)(66476007)(6916009)(66556008)(64756008)(83380400001)(26005)(66446008)(4744005)(66946007)(33656002)(508600001)(5660300002)(8936002)(38100700002)(44832011)(7696005)(8676002)(9686003)(122000001)(2906002)(38070700005)(6506007)(55016002)(71200400001)(186003)(316002)(52536014)(45080400002)(76116006)(86362001)(81973001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ISEK6FkPaQR2ZChty3px6cu2ioPAAux7wGHhHzJiGn0/s7O7bCrQqha5Wqw9?=
 =?us-ascii?Q?fyuQE9J51xCOxY3UOR84UzQoBRbEa12fJE8TaV57PmrmLfYqk+LdUdYzwxV3?=
 =?us-ascii?Q?5FG9x31Btcmmg7C7NPRxp6EDffkeKODzy7VykpnDl+YdcFFJqM7M9EYObyK5?=
 =?us-ascii?Q?qXKCRabOYYHnf/2fSicHmzMhZiHUEX8xq96eGzcCbWGt2OdkGbx9zDc6MvvM?=
 =?us-ascii?Q?hIVfUtASCM/R4WghJ6l1EvABzpX7TVd/29DUYgqzvX5zuu0sJrs+WaVqNuSO?=
 =?us-ascii?Q?K0THU4LIvvLn6bodNEXQOXVPXf6+OlUSA36noZPUpym9rBLdF0+yp+GHPV6c?=
 =?us-ascii?Q?dM8UPR5NQME3FtVcPUAICK8VbPSZD5g97SuUC5ry/AGPO/BDijUpoW3kCiJ3?=
 =?us-ascii?Q?mQylAJdWsd+bxszS0usqqPFuDt9bVe3q4d2gLhk8WfyvcIX9fKEBslIiUTJJ?=
 =?us-ascii?Q?RjRlW/oyhcuW/Njeilo/toVu6Sl3Qe+8yI4lvorC1R+n6LxIsgCrYmfKxFT+?=
 =?us-ascii?Q?e+O66JJDr8Vm3xCbClKbfC/KGAeN+5KRpEOubBxQVXlvlR8WROnzD95dW1OH?=
 =?us-ascii?Q?6A5fNh8nIEmW7la5Xm7olRLN0+Jlgn4b3Gg4c4F3Oq+mZXl1/HNfpFE1wQux?=
 =?us-ascii?Q?KUA0cKbmiZ7CSXnRILRomDlb9jbeKMAdpa6/a0maBM1/OipcGIZK6GVr5Bal?=
 =?us-ascii?Q?D3GPo1fEU3Cb9pSWffGzdf9nQkrWRg2kuYvd+dcZgIGbC3QIymn9ygVd/HOO?=
 =?us-ascii?Q?UVkbxIpPMKoU6k128QG1xMc8nBJKHig1ZEBhqHm4/NOu10iOE8WlQ5D8EzYr?=
 =?us-ascii?Q?ke4MNG+9+1RRmWMb323mYI/NMJsUvNdl4aooppPRy95veQiZtOI8jABtrl6C?=
 =?us-ascii?Q?IDyZwcDKzV9zp23+1RWLxEAf8zeQSonT4V1LwpgfKGEVMLmqHKZmwBpEiVSx?=
 =?us-ascii?Q?uJFH+wmSzHS0lyIOL9QrENMLywshpX4GRloLJfCFRoFNQ4alq4LZnhfern1z?=
 =?us-ascii?Q?PV+HrfBrcj5b+ZxTwDxIA9RPFxydqh7cTOaTOF4NsAhD9RvOfEFqBoHP13+z?=
 =?us-ascii?Q?yMW6qnOtXBqJXu+JjUC0NRLijfUHRQigLOFT7tZ/UvKTTbGwgEPgwEQ2UXuq?=
 =?us-ascii?Q?pDsXJdpgYeJojhkEX4BZpJi62ZONLxC+1Sjyh/7Idfr4AUOnjbGUSA3d/8Wp?=
 =?us-ascii?Q?cgcOI5g8uytu/sdO51oMcdWbSPBVbTGYzhrzPFNKumdHhS6Q0dHlchDirRmI?=
 =?us-ascii?Q?GHKy7CENrTRebzTguYlw0L5mbTQPtXyQfv7WmlxbQvmCZ8zLkqYK4eEQ+ddc?=
 =?us-ascii?Q?E0zWqUDY8GW93eFm+UkGLxPWrL0Scq9WyZlfN3ssXu0m7E2te93nGsR70K/W?=
 =?us-ascii?Q?YwUMfcCUQyxJtWbQ6zMq5dIbFLjyRAr+YiuDxQcnvC+S7t/TcyxHL++SVoIv?=
 =?us-ascii?Q?+63lfgO3Qnbo0876T8X3KKe0ipFJwKRu71gv60EGUKX/fUit7Bg+nwWivxJg?=
 =?us-ascii?Q?+/vCQxTpml9nwUEtMGTY5YhUMA0/0eV7AVcXV9txC7/NS6c2DZazDEQuok2y?=
 =?us-ascii?Q?nV1Hi2CanQ2EdoGxVwXcxPRO9fADfIrNC6Ja9nuT/AsF4uFEsPLGOMmXB3rF?=
 =?us-ascii?Q?/w=3D=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
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: 1dad02a8-17aa-481e-cfe0-08d9ad1a6460
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2021 18:11:51.3640 (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: cXvLGB1AYctPlUEIeFvqDxHG8YqUbBa5H/dNV8LznzOJFwRqS/n3gG76nXoGE8Nnf4zcJW0D0zVZdA1Abm/QrQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2965
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10175
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 phishscore=0 malwarescore=0
 mlxlogscore=887 bulkscore=0 mlxscore=0 suspectscore=0 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000
 definitions=main-2111210113
X-Proofpoint-ORIG-GUID: jPleVzxzGjQ0v8m9PDig0Qu3heYY2PBn
X-Proofpoint-GUID: jPleVzxzGjQ0v8m9PDig0Qu3heYY2PBn
Received-SPF: pass client-ip=205.220.177.32;
 envelope-from=drew.adams@HIDDEN; helo=mx0b-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 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Enhancement request: please consider adding functions
`this-command-invocation-buffer' and `this-command-invocation-window'.
(Other names OK.)

They would return, respectively, the buffer that was current, and the
window that was selected, when the command that's the value of
`this-command' was invoked.

Currently, to get this information a workaround would be to use a
`pre-command-hook' function that sets variables, and then to test those
variables.

In GNU Emacs 27.2 (build 1, x86_64-w64-mingw32)
 of 2021-03-26 built on CIRROCUMULUS
Repository revision: deef5efafb70f4b171265b896505b92b6eef24e6
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.19042
System Description: Microsoft Windows 10 Pro (v10.0.2009.19042.1288)





Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#52023; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 22 Nov 2021 11:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.