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: Is there way to read function invoked and its parameters? Date: Mon, 28 Dec 2020 08:40:30 -0800 (PST) Message-ID: <3fb924a1-794e-43f7-bdea-d95a383c448a@default> References: <9e5a8908-51c4-4abb-bdf2-b07fba13d651@default> <87blefjdp4.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25185"; mail-complaints-to="usenet@ciao.gmane.io" To: Jean Louis , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 28 17:41:14 2020 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 1ktva6-0006R2-Cr for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 28 Dec 2020 17:41:14 +0100 Original-Received: from localhost ([::1]:59384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktva5-00078J-EH for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 28 Dec 2020 11:41:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39418) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktvZV-0006oc-6f for help-gnu-emacs@gnu.org; Mon, 28 Dec 2020 11:40:37 -0500 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:54330) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktvZS-0001AM-Sx for help-gnu-emacs@gnu.org; Mon, 28 Dec 2020 11:40:36 -0500 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 0BSGcSJl042361; Mon, 28 Dec 2020 16:40:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=M7hz6qhMpsuAOD3ICiwt73one3NCZwTdzcHWvvIUbqs=; b=b4ozeDh7u1zpul2qyfLg27SATtLlYtRZkN0gP0xHnb7xddy4y7CzUTHMfgXpN91rISKI 0mgFmVasPua0YbFWYTXmrIoP1YWZ28yycyOnbgmjzulN+IxjaIMAy7hW+PZVGTkkPTLr XmrU/vvLEp8Cec6QiTRtrGEQonz2H/V2JpxoX6y+tlXGaybf1FrN2VbcOQXc6OjVNJmR w2CD4lc3bSTtoC3Si/yZPCK61aZ1LKpU/WE/dtO4YKjWvyxgEEIaNj5PwoYQcs4LQrWm OIoDCWYMgg/JNNRpRevfDtFSM1Tt+WboGWOxf1AEqB5yZPb4CD3qR0rHgFF01B+OnRLl 6A== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 35phm1b1ke-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Dec 2020 16:40:33 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0BSGdvnt165160; Mon, 28 Dec 2020 16:40:32 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 35perktg7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 28 Dec 2020 16:40:32 +0000 Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0BSGeV2H006409; Mon, 28 Dec 2020 16:40:31 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9847 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012280104 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9847 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 impostorscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012280104 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.178, 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_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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:126862 Archived-At: > > > Reading quickly, so perhaps not understanding the request. > > > But I'm guessing that advice is what you're looking for. Still not reading this thread carefully, but I still have the impression that, for what you want to do, you can use _advice_. https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Function= s.html When a function gets called you can do anything, including introspect the current context, reporting on it, and reinvoking the called arg (with the same or different args). Pretty much anything. The only limitation of this approach is that, like `debug-on-entry', it only takes control when the function is actually invoked. Other than that consideration, you can do pretty much anything, with the full call context at hand.