From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Newsgroups: gmane.emacs.bugs Subject: bug#17871: 24.4.50; (elisp) `Core Advising Primitives': interactive spec as function? Date: Wed, 21 Aug 2019 00:44:06 +0200 Message-ID: <87o90jjw3t.fsf@gmail.com> References: <400906ac-35f1-48e4-8df9-8e65b340209b@default> <87vbrjdajs.fsf@web.de> <82178260-247b-4653-85db-d6586480419e@default> <87d2dqdsyj.fsf@web.de> <8736ihb0ds.fsf@mouse.gnus.org> <87d0hl3xqx.fsf@web.de> <878ss99jhi.fsf@mouse.gnus.org> <87o914xh50.fsf@web.de> <87ftmgdl2d.fsf@mouse.gnus.org> <8736hy1wxt.fsf@web.de> <87ef1i38g4.fsf@gmail.com> <87k1ba3wgc.fsf@mouse.gnus.org> <877e7a2fut.fsf@gmail.com> <87d0gzwnm6.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67630"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Michael Heerdegen , Lars Ingebrigtsen , Stefan Monnier , 17871@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 21 00:45:27 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i0CsU-000HNy-SY for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Aug 2019 00:45:23 +0200 Original-Received: from localhost ([::1]:42560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0CsT-0007Vl-PD for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Aug 2019 18:45:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38978) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0CsB-0007VX-Bg for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 18:45:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0CsA-0004Uw-1X for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 18:45:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53613) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0Cs9-0004Ul-U4 for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 18:45:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i0Cs9-000881-Nb for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2019 18:45:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Aug 2019 22:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17871 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 17871-submit@debbugs.gnu.org id=B17871.156634105631181 (code B ref 17871); Tue, 20 Aug 2019 22:45:01 +0000 Original-Received: (at 17871) by debbugs.gnu.org; 20 Aug 2019 22:44:16 +0000 Original-Received: from localhost ([127.0.0.1]:34201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0CrQ-00086q-Ay for submit@debbugs.gnu.org; Tue, 20 Aug 2019 18:44:16 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:39946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i0CrO-00086d-Qb for 17871@debbugs.gnu.org; Tue, 20 Aug 2019 18:44:15 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id c3so145280wrd.7 for <17871@debbugs.gnu.org>; Tue, 20 Aug 2019 15:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=Pofkwxc0/p3CwrHx62SDfCVnC5LSIRWU65IZpkEQR6Q=; b=IX8u5TdPW1fQZGSO1mKlmkCy1ektVDa8Jd1KFCLSqM1d7Z9C+PWabbaWCi1uGEhT6w +0Cj86ZG8+5rz+cu8np39ircSN+S+RMXXishVNXAI5sV/Y3GD+zAgfrxYxVO1f8kJ+Kv P6+wR4trD15tq15YbIANZW7xZCfwHyP/62kdotfOqexOlIXh5PE2JeymTFMSsnZfSS55 lnjlhkyM7kdbJXbClvNU97lgMid3TOeBPj6NUL17jOwI+p9e99EWvcD1W+XJ0ePCyw6a a3UoHokNQBKr2ofUFzEavx0ZZ0wre4F9dHpKoXHccn6oKlAfSDbXjMpKq4d0Uy9czZNG yh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=Pofkwxc0/p3CwrHx62SDfCVnC5LSIRWU65IZpkEQR6Q=; b=S9xjTRmDsuRjQs+68CPCba9bbdDLi+28bXqofVSYZv/ANyeG2l27HPOpo+GZA1agdf obUnaNii0K+hsgEuC28lfbWTVSMlMAo+TjOo55JsQP0JHiKQ/FmGUo53KfnOookeUoCi RTBDFoO/yhZaq+xVHXzy+LLGCWZGgrD4jZ6PaQzurO1QHMXxqWtOivxy9QrzKBIHlXXW 8kSgagUHVMJ2NVaxDiUh+gcH1mAJVBA5y0YtqP/2DHZO2Ly23lbD7JVHUldg5A+cdZld WbXSs2a5xl14ZKZkQ9R31cO2PlX0TLUs6biMigE+m/vqVky0avHWHnZrOfAhoyye1rtL 6uxg== X-Gm-Message-State: APjAAAWm+C0FgRlHVz5+uTvmvw5C8pVb+fnUTuCcX1ZGoc5dNC/dC1LJ uhBDXzU0dg+j6JFPSl7XVp4= X-Google-Smtp-Source: APXvYqyrtUEdP5puEvZh6SEzoCX1wt/xuW4dLQ4UPIVjVQqGEpKuVvh69uQvXJUN3Jx5oXI6DUO28g== X-Received: by 2002:adf:aa8d:: with SMTP id h13mr39083592wrc.307.1566341048209; Tue, 20 Aug 2019 15:44:08 -0700 (PDT) Original-Received: from localhost ([185.112.167.114]) by smtp.gmail.com with ESMTPSA id g7sm1427424wmh.1.2019.08.20.15.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 15:44:07 -0700 (PDT) In-Reply-To: <87d0gzwnm6.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 21 Aug 2019 00:49:05 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165451 Archived-At: On Wed, 21 Aug 2019 00:49:05 +0300 Juri Linkov wrote: >> And although I have managed to clarify a few points myself thanks to >> this conversation, my personal conundrum[2] remains unanswered: why does >> a simple advice have no effect on the interactive spec of the function >> being advised, and is that really a feature? But perhaps that's for >> another thread. > > Recently I tried to use an advice to override the default call of > `forward-word' in `org-metaright', but this is impossible to do > because it called by `call-interactively'. Maybe your case has the > same problem? Not really. The real-life example with commentary is in the cited message (), but a minimal example could be the following: (defvar __testvar nil) =20=20 (defun __test-command () (interactive (ignore (message "__test-command (interactive): %s" __test= var))) (message "__test-command (body): %s" __testvar)) =20=20 (defun __test-advice (orig &rest args) (let ((__testvar t)) (apply orig args))) =20=20 (advice-add '__test-command :around #'__test-advice) Even with the advice, calling __test-command gives: __test-command (interactive): nil __test-command (body): t I'd expect the advice to have effect on the whole function, including the interactive form. --=20 =C5=A0t=C4=9Bp=C3=A1n