From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 26 18:20:01 2018 Received: (at submit) by debbugs.gnu.org; 26 Oct 2018 22:20:01 +0000 Received: from localhost ([127.0.0.1]:44405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGASX-0006es-29 for submit@debbugs.gnu.org; Fri, 26 Oct 2018 18:20:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGASU-0006ef-VP for submit@debbugs.gnu.org; Fri, 26 Oct 2018 18:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGASP-0003ba-0u for submit@debbugs.gnu.org; Fri, 26 Oct 2018 18:19:53 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:43529) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gGASO-0003bW-TI for submit@debbugs.gnu.org; Fri, 26 Oct 2018 18:19:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGASO-0006uP-3e for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2018 18:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGASL-0003aX-0d for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2018 18:19:52 -0400 Received: from mail-oi1-x22c.google.com ([2607:f8b0:4864:20::22c]:39518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gGASK-0003aC-QC for bug-gnu-emacs@gnu.org; Fri, 26 Oct 2018 18:19:48 -0400 Received: by mail-oi1-x22c.google.com with SMTP id e3-v6so2355782oiy.6 for ; Fri, 26 Oct 2018 15:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=user-agent:from:to:subject:date:message-id:mime-version; bh=4/Hhokwoll0cVVxXuWaToXAtJ7BA05vrVxlUU5GC2Gg=; b=GGo5flEE8J8JJWPEo9JR5uzPgFxiBbssLaaay8RKsB6nPY1t+Fmuz771p2lVWPsTO4 dQ4OfJ4efQoQ2b0DQgkSl9D0+cdARYqeDzD30AZVTyck1rgWq65d0ZDWRFn9eLEPAGE6 EnXphxC6u5aUGYzkgkhoX5LeQz0qf47OMvABJ2lCQ4R4KTizUNWDfiXhfTl7MBqtGgI1 zfJpdAF0gLbbnd2xGj+VUA+hO+ljPwbPChPkycVohpOB4aKv0sFFOuUelD2LLRNG+yVq oAHPjNP6gNZulM0IALmUkigzSYAatIWu8FDCMf1EBvD/XqX5d1UfvFxEDugkjpPZkLLt JZ/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=4/Hhokwoll0cVVxXuWaToXAtJ7BA05vrVxlUU5GC2Gg=; b=LzvDHHEdicVM9p28CzuvIpPM5jOYDcU90rSBSz+QgWdM8xB2DRKR0SP1itNH+UcZUm yVyz162K4znIrDdQIHlvQCJ9CU28q0I0UNQmiEg7AVVffFQUv14HL/09z+sBKOXtsa62 pViLIVRigSVtqblIR+uYP/Ih82rnt3bT/WezDqEche3anX8hrI0qFrYRGyWvzNAy0Ubd UjgkRvFUDRLhHxcvXKT+05P8RtHHHWJjoyHE1l00/bBwZPY+LdMpsTn/V7xsMzmUhIcD STDnVDEexvUUDGJThVxfjk7erpwTj5J/AzKd5zKnE8JnJAmElSTtZQaPKH/jb2CsMtof mkCA== X-Gm-Message-State: AGRZ1gKSnydKwd9kK4IWoaQ+fDV6hc8+7Vwz4swFfVcwdHHqhD2AFE0M +yWESG09KFInrys6m8Do6ciLPAYW X-Google-Smtp-Source: AJdET5eSOVYCvf+HMtuWGK5tKZg7Q97g/2b6LXdQYcTy8RWR0DUf1weM8s4gf/VCBtd0Ow37HRu3pQ== X-Received: by 2002:aca:dd08:: with SMTP id u8-v6mr3118727oig.94.1540592387342; Fri, 26 Oct 2018 15:19:47 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id a68-v6sm3266614oih.19.2018.10.26.15.19.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Oct 2018 15:19:46 -0700 (PDT) User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: bug-gnu-emacs@gnu.org Subject: 27.0.50; interactive spec with cl-defgeneric/method Date: Fri, 26 Oct 2018 17:19:44 -0500 Message-ID: <87efccmjun.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain I'm struggling to understand how to make functions defined with cl-defgeneric interactive: (require 'cl-lib) (cl-defgeneric my/test () (interactive) (message "generic")) If you evaluate that you can do M-x my/test, as expected. However, as soon as you evaluate this: (cl-defgeneric my/test (&context (major-mode emacs-lisp-mode)) (interactive) (message "method")) M-x my/test no longer works. Is this a bug or am I misunderstanding how this works? Thanks, Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvTkwAACgkQHkInolPp msdtlggAwKc2BPHJnSdyz0+/f+ViUenweN0P1UVA1Um0EeuGmQdyYjOI3jmpqn4V KmSxHFrX8QaUd0T//6hI0xn2vzAx4LM4PWjwS5LSdR/QKK0J8zppGv8Epd5eDy81 iOSLIgh5Z6a1upKJxpsVCfwZoJ/5yD7/QRTSGKrCIQaKAdkgzdp91l1MuwZN6J6j upp4iIYaWMfvYdsHMCKl5xaFaKN0dyluzVSJIpivIiggOTreZjGHDJN1qAqve6HB S/WFH4tdXYOa2q4WN3dlttH7U6AmxzrJ42GdwbnAUUvrKiMEXuR/d56QO2Ozs8V9 nKAoPFitky8WNXnPx5n2+bIppH3a0A== =0D2b -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 02:54:14 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 06:54:14 +0000 Received: from localhost ([127.0.0.1]:44513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGIU9-00020L-Vw for submit@debbugs.gnu.org; Sat, 27 Oct 2018 02:54:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:33777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGIU7-000206-JT for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 02:54:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGITx-0005aP-Co for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 02:54:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51530) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGITx-0005aL-9F; Sat, 27 Oct 2018 02:54:01 -0400 Received: from [176.228.60.248] (port=4420 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGITw-0000Po-SD; Sat, 27 Oct 2018 02:54:01 -0400 Date: Sat, 27 Oct 2018 09:54:04 +0300 Message-Id: <83lg6jop6b.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <87efccmjun.fsf@gmail.com> (message from Alex Branham on Fri, 26 Oct 2018 17:19:44 -0500) Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method References: <87efccmjun.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Date: Fri, 26 Oct 2018 17:19:44 -0500 > > I'm struggling to understand how to make functions defined with > cl-defgeneric interactive: > > (require 'cl-lib) > > (cl-defgeneric my/test () > (interactive) > (message "generic")) > > If you evaluate that you can do M-x my/test, as expected. However, as > soon as you evaluate this: > > (cl-defgeneric my/test (&context (major-mode emacs-lisp-mode)) > (interactive) > (message "method")) > > M-x my/test no longer works. '&context' is documented only as part of cl-defmethod, so why are you trying to use it with cl-defgeneric? From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 08:40:23 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 12:40:23 +0000 Received: from localhost ([127.0.0.1]:44703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGNt9-0003jJ-5g for submit@debbugs.gnu.org; Sat, 27 Oct 2018 08:40:23 -0400 Received: from mail-oi1-f179.google.com ([209.85.167.179]:43516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGNt7-0003j3-3L for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 08:40:21 -0400 Received: by mail-oi1-f179.google.com with SMTP id j202-v6so2878000oih.10 for <33170@debbugs.gnu.org>; Sat, 27 Oct 2018 05:40:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=mPnJ3bISNcXWE5tfXgoJaGuWmQAtn6gplQe/8OJAT44=; b=r+ORJaQv15rPv9MjvqU9FILJmueUB7wa5NjQ4XT2d17eMBuZZIrnFBubdpk0xKbpbn 5fxYDyH+Sl8uKNslTDNxIpwrHD4+sX0csyE6LNVGYaUoNvH2u255Lriepaj0j3D+Sah4 gOa5x6wbGiLpiaNfe+SADCPEhOxvhZcIN3nlXkP5eK+6BuTqhnvQy/k2BIMxPN1DX1ne Y9PxIS8OPT3XkeTpB/ZMvwgW8QIUNvs+5VvmCCIiU70cAJRgsHt5Pj/ROfHNs75YdmAj 42/5GBGHGh2sZKjK8GHPBXqIJwqxSRwel7DDMa1f+dFf+izTU/8+81DQ/QjO8+fRqBts 7X7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=mPnJ3bISNcXWE5tfXgoJaGuWmQAtn6gplQe/8OJAT44=; b=gQlq3e5CCMPoCdDrT36FjwZ5iUOitnRop3+UdtVBqpc6XSptJVYtRha6bJ15Av0Yux KiI9yxLmKudi7539cACqqs3qYURJuemwJblHgTLKrxAoPZmuC59mT+IpYHakaczaQpcj P7TS8K/SQ1V/pczq0bfgJWZmSb4ssMaPcor98sULWb94PesGHe7H72xD3kpLt4hZ2qQX RKNiej4YTg4Gc6GXJn7okwdHT8vk1wd7plpuhPfud9AHPhSO6MdrQFKlwEfKjeWbkEZv 3a/YDMx70LPO40w6QriYMxG0f2TR+5LkCFHAxHvCYOvz5CAHSQf/h8pgtueGM/NgabYn jVww== X-Gm-Message-State: AGRZ1gJH790Ol/jRufiL/o1JG/TZVvukgh8rzVEJ3CU11AS2hjLgaw96 SJOoyew/8vU/trX8Q3GoNosdD71g X-Google-Smtp-Source: AJdET5dYamXh4BinNuCAXoJNby61rDcpwAj062W5AKjBkP7wDB8FWKf8LqIT/HYA8Ym73BHVhyubFw== X-Received: by 2002:aca:1218:: with SMTP id 24-v6mr4193008ois.246.1540644014917; Sat, 27 Oct 2018 05:40:14 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id c186-v6sm5071007oih.28.2018.10.27.05.40.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 05:40:13 -0700 (PDT) References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method In-reply-to: <83lg6jop6b.fsf@gnu.org> Date: Sat, 27 Oct 2018 07:40:11 -0500 Message-ID: <87k1m3lg0k.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat 27 Oct 2018 at 01:54, Eli Zaretskii wrote: >> From: Alex Branham >> Date: Fri, 26 Oct 2018 17:19:44 -0500 >>=20 >> I'm struggling to understand how to make functions defined with >> cl-defgeneric interactive: >>=20 >> (require 'cl-lib) >>=20 >> (cl-defgeneric my/test () >> (interactive) >> (message "generic")) >>=20 >> If you evaluate that you can do M-x my/test, as expected. However, as >> soon as you evaluate this: >>=20 >> (cl-defgeneric my/test (&context (major-mode emacs-lisp-mode)) >> (interactive) >> (message "method")) >>=20 >> M-x my/test no longer works. > > '&context' is documented only as part of cl-defmethod, so why are you > trying to use it with cl-defgeneric? Sorry, that was a typo. The same thing happens if you use defmethod: (require 'cl-lib) (cl-defgeneric my/test () (interactive) (message "generic")) here, M-x my/test works (cl-defmethod my/test (&context (major-mode emacs-lisp-mode)) (interactive) (message "method")) Here, M-x my/test does not work. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvUXKsACgkQHkInolPp mseeSwf/VRV97kWIlVkUDeffJKnr1Kg7QF7EiPtnKPG7FlZaqO8dUNvPcFwOrk+z xsK8NPSGNiZIMTfm0RuJgn9wYJ71DZHtTwGdABVPeEvEHCiCFXjFNEUfd+oYehYZ Y66XrjVJbOZTJU6JzlNPwlzNjMKlXiRHgQ1fY290jXi4Jj8NIgBeKQ9CMNCSXV0+ dGfb4O4JwhbhE2gQfx7ag1Nh1+KHLXp3KPl8jAZZrKS0DtFp6YI3fqwxuij6B03C HZwiqPiQYREUH0ay4uolYu6b27HOf5TScFG8ogfvjBLCDzPduzG1GduCSqKSir4Z uTf2vNgGgadOB0zj1enjn+CuPnkRXA== =zmDP -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 10:47:19 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 14:47:19 +0000 Received: from localhost ([127.0.0.1]:45590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGPrz-0002lm-ET for submit@debbugs.gnu.org; Sat, 27 Oct 2018 10:47:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGPry-0002lZ-5I for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 10:47:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGPrn-0004Uh-W6 for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 10:47:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGPrn-0004US-Rt; Sat, 27 Oct 2018 10:47:07 -0400 Received: from [176.228.60.248] (port=2123 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGPrn-0007B9-ES; Sat, 27 Oct 2018 10:47:07 -0400 Date: Sat, 27 Oct 2018 17:47:11 +0300 Message-Id: <83woq3mopc.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <87k1m3lg0k.fsf@gmail.com> (message from Alex Branham on Sat, 27 Oct 2018 07:40:11 -0500) Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Cc: 33170@debbugs.gnu.org > Date: Sat, 27 Oct 2018 07:40:11 -0500 > > (require 'cl-lib) > > (cl-defgeneric my/test () > (interactive) > (message "generic")) > > here, M-x my/test works > > (cl-defmethod my/test (&context (major-mode emacs-lisp-mode)) > (interactive) > (message "method")) > > Here, M-x my/test does not work. But "M-: (my/test) RET" does. I don't think generic functions can be interactive. At least it is not documented anywhere that they can be. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 10:50:37 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 14:50:37 +0000 Received: from localhost ([127.0.0.1]:45594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGPvA-0002qL-Tb for submit@debbugs.gnu.org; Sat, 27 Oct 2018 10:50:37 -0400 Received: from mail-oi1-f173.google.com ([209.85.167.173]:34595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGPv9-0002q9-Ds for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 10:50:35 -0400 Received: by mail-oi1-f173.google.com with SMTP id f21-v6so320768oig.1 for <33170@debbugs.gnu.org>; Sat, 27 Oct 2018 07:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=hUgGonWdBGjdLxN6uW0dtStWuniFGylaPy1ytT0H5pA=; b=py/p6+QbN0AWNTaq+NibnQVZQg/vWpRH0mTxHwDxdUzOG2W8ZWzrKa4lQ/ocAZZfUN ZH1Za70O4s6Q7mHmErlWX9Jg9432CcAiTXk6r83XDp8k14rJnSQ33Tycah48pL+yHuo+ MXOt9CLX1WwdOYjNkUXJNS9Fr+yvNT/OkpJn3ksF8+pMUxyVUD+YcQ09mL9FjgsZGgDd 9vvSulzkbaE8hVNb+BMm+03i3MGXwdFGTrqFFHrQoJxWetHJeWS3D82IdzJf6Z5a6PR3 GNNOor+S05pMq/EquusP4OeFSKksHP3pKrUDgU48pa3d/kWjZTzgBWu+qcA8fVJQq9XS XD0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=hUgGonWdBGjdLxN6uW0dtStWuniFGylaPy1ytT0H5pA=; b=C5fXEr1CpuSPIcM370TofMlljiyVwRwuyDwrz65c6nQ21tjj3LtCUzRyHAuUAUv/FG rzn08Fq16n/IghS8TLsimBNp4yBSxx+4Zfzc0zb9u2oyVnJy6EtIaRpwfK9+2uWP1x9f cEevQGzejtKE/xyA/w8T28sDh3Sy6CQ2DlZqFKNV1xtZVdoNgkYlPPiWsPaQZbuXpwp6 EAfNfADCcpIZrVhyqemLLq2T13iFFr1whDifp6wiRBj2aPq+mOUZf9X0xdmI9zKBw/Jq uRg7g0jtMJd3AZjaQk2Y7RabG8QMwIRPHbKDIzeKLCVSYOS95xXcd7Ag3YWuZ6pC+KNj EXrg== X-Gm-Message-State: AGRZ1gIDlVeWf0wndLEOFmgvtce3TolMLS8kdUYg+6uFi6zCdphyyLwc Lq7uqibJBItJHbyn5cZO95fc8DFg X-Google-Smtp-Source: AJdET5ez+ZO81EHh57NXc5al48IM5tcWtQVI/GOGwxldqJaBM8d3pxGwA9vd0W3aNIZDw+xe3L6Rqw== X-Received: by 2002:aca:430b:: with SMTP id q11-v6mr4375147oia.37.1540651829209; Sat, 27 Oct 2018 07:50:29 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id 110sm5378163otj.19.2018.10.27.07.50.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 07:50:28 -0700 (PDT) References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method In-reply-to: <83woq3mopc.fsf@gnu.org> Date: Sat, 27 Oct 2018 09:50:26 -0500 Message-ID: <87d0rva1fx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Sat 27 Oct 2018 at 09:47, Eli Zaretskii wrote: >> (require 'cl-lib) >> >> (cl-defgeneric my/test () >> (interactive) >> (message "generic")) >> >> here, M-x my/test works >> >> (cl-defmethod my/test (&context (major-mode emacs-lisp-mode)) >> (interactive) >> (message "method")) >> >> Here, M-x my/test does not work. > > But "M-: (my/test) RET" does. Right. I'd like them to be interactive though so I can e.g. use them from a keymap. > I don't think generic functions can be interactive. At least it is > not documented anywhere that they can be. Ah, that's unfortunate. Perhaps this limitation should be documented somewhere? Thanks, Alex From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 12:11:55 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 16:11:55 +0000 Received: from localhost ([127.0.0.1]:45653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGRBq-0006sd-Oh for submit@debbugs.gnu.org; Sat, 27 Oct 2018 12:11:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGRBp-0006sQ-9I for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 12:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gGRBe-0001TI-B0 for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 12:11:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gGRBe-0001TE-6E; Sat, 27 Oct 2018 12:11:42 -0400 Received: from [176.228.60.248] (port=3513 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gGRBd-0003Kn-BF; Sat, 27 Oct 2018 12:11:42 -0400 Date: Sat, 27 Oct 2018 19:11:42 +0300 Message-Id: <83r2gbmksh.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham , Stefan Monnier In-reply-to: <87d0rva1fx.fsf@gmail.com> (message from Alex Branham on Sat, 27 Oct 2018 09:50:26 -0500) Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Cc: 33170@debbugs.gnu.org > Date: Sat, 27 Oct 2018 09:50:26 -0500 > > >> Here, M-x my/test does not work. > > > > But "M-: (my/test) RET" does. > > Right. I'd like them to be interactive though so I can e.g. use them > from a keymap. You could have a single command that invoked my/test, I think that would do what you want. > > I don't think generic functions can be interactive. At least it is > > not documented anywhere that they can be. > > Ah, that's unfortunate. Perhaps this limitation should be documented > somewhere? If Stefan (CC'ed) says it's a limitation and not a bug, I will document it. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 12:14:51 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 16:14:51 +0000 Received: from localhost ([127.0.0.1]:45657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGREh-0006wu-7g for submit@debbugs.gnu.org; Sat, 27 Oct 2018 12:14:51 -0400 Received: from mail-ot1-f49.google.com ([209.85.210.49]:36739) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGREf-0006wi-SH for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 12:14:50 -0400 Received: by mail-ot1-f49.google.com with SMTP id x4so3848615otg.3 for <33170@debbugs.gnu.org>; Sat, 27 Oct 2018 09:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=+7tUeYeZCu2xmv5ji6MiGItgH+Xutceqh0jpslU2ubg=; b=utyveLySdARWEf0M+q63wWZQLerTeQGX8uSGTVNQMbYRMjyInCfei5AZyd2sQOfodb pzDXQyCQi8yBY/Xi6Y/5aYCs7MfLNQ1qQUk2ILaTqRLr4gJJGxG2DdQLZVHuxSrkJxxn j4mcsOJ/LVLUiaxkgISOnhNqgFfB0W4dPBcTPzLiYdR8Xf2dS95Ml+29QvjVsDQMMUqG dn7WVKSq0BMydFfwO+xh0zn8vQqd1k6PwF3PNcxb+ztmEFiajSTjL7QK23qgYlDTOc5h e2Y3r7kEtRa5/mWCE+TjGsJflBIJH3ELI0+LdTk+agKvo07K51dVQ6+U4Y4wdclfHKQm C3Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=+7tUeYeZCu2xmv5ji6MiGItgH+Xutceqh0jpslU2ubg=; b=OVYJHTZJfYZYPk6BkDzU5iScMn7Thma/tPthRLrHntcLZuMP2TS5bYuIg5VB2B/dYs r34m93172Dfr4LA5jEvLLdCVN9ooW3uWLOhUiph3ODkacn3wltTsrthfitPqmZXdjDjX cZZK9vHf3znSxzFPECmhRxcBwYtQKKYRwfJG7hyUnSfEm1oprOhuxR1JSFsY5PNcOnXl 2rEyESsHuo073MDjHKGdDCGn7lFnA6nWTdDpsyAZ0h3LRUS2Hedo/iCOkRfTzmgZYR0t qoYE9bTcrGGvKA/eH5CiFSLVuXxN002ONB7eiD8ui374hPSEIvfktPKoHwxIQeebxX3c 126A== X-Gm-Message-State: AGRZ1gL/z/jpSLGS5RxSyR/HmtGOe6Z53WVU1n99YpvFHJUv9vLyK7n7 Qsr/Odqh5XG32vx5ZM6wuX6ldXpY X-Google-Smtp-Source: AJdET5e91y0IOucne0elZEp++2vDmu5Jq7Dgw7EDgGIYZd2/1zDEyI+g4Kv7h5GaYUztlDOyu4GIWA== X-Received: by 2002:a9d:3e50:: with SMTP id h16mr4417709otg.8.1540656883631; Sat, 27 Oct 2018 09:14:43 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id 31sm4862200otw.41.2018.10.27.09.14.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Oct 2018 09:14:42 -0700 (PDT) References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method In-reply-to: <83r2gbmksh.fsf@gnu.org> Date: Sat, 27 Oct 2018 11:14:41 -0500 Message-ID: <87bm7f9xji.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Sat 27 Oct 2018 at 11:11, Eli Zaretskii wrote: > You could have a single command that invoked my/test, I think that > would do what you want. Ah, good idea. That does work, thanks! Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvUjvEACgkQHkInolPp mscOywf/c0i4NGP4Z3Pd9ciNwHIbZU+Lnc6RAlH+EVagi58iwxXsm5Ty5N6bT1WQ K3dRQNXGb+dsWKB0ENM1ECgjyihBSWTRbouWTLyB8QgKZ9tLJ3DB90b59zc1HE1k aHgblbryRngSO4OhWCYfoel3bWkzivrUtuDRzUQ7Km40xqR+HJX7BtFKcYft3oTk 2H50Ahk7d2Hrsnp1emzGJJI8cYp5DEVs6vkoh6ttSyqnzzp4KYPqCI4Ylay6fsG5 Vg5Y8fYQrh2l86tPLbbAkE6ml+BnqG1mn998BnVrkpAmjEwYcMw82F6TjCWisVeN olIdwuZ+1Pswcw3b8842JDw/v0AQlg== =/jsG -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 27 17:49:18 2018 Received: (at 33170) by debbugs.gnu.org; 27 Oct 2018 21:49:18 +0000 Received: from localhost ([127.0.0.1]:45875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGWSM-0004HO-D5 for submit@debbugs.gnu.org; Sat, 27 Oct 2018 17:49:18 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:58640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGWSJ-0004HE-MU for 33170@debbugs.gnu.org; Sat, 27 Oct 2018 17:49:16 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9RLnEXi019865; Sat, 27 Oct 2018 17:49:14 -0400 Received: by pastel.home (Postfix, from userid 20848) id C801864546; Sat, 27 Oct 2018 17:49:13 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method Message-ID: References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> Date: Sat, 27 Oct 2018 17:49:13 -0400 In-Reply-To: <83r2gbmksh.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Oct 2018 19:11:42 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6405=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6405> : inlines <6947> : streams <1802560> : uri <2739293> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org, Alex Branham X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> > I don't think generic functions can be interactive. At least it is >> > not documented anywhere that they can be. >> Ah, that's unfortunate. Perhaps this limitation should be documented >> somewhere? > If Stefan (CC'ed) says it's a limitation and not a bug, I will > document it. AFAIC it's a limitation. We could support interactive specs, but I'm really not convinced it's worth the trouble. If using 2 functions (one generic and one interactive, which calls the generic one) is really annoying for some reason, I guess you could use (put ' 'interactive-form
) but I think this property should be deprecated, so don't tell anyone (especially don't tell me) that I even mentioned it to you, Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 29 10:19:04 2018 Received: (at 33170) by debbugs.gnu.org; 29 Oct 2018 14:19:05 +0000 Received: from localhost ([127.0.0.1]:52007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH8Nk-0007MT-LR for submit@debbugs.gnu.org; Mon, 29 Oct 2018 10:19:04 -0400 Received: from mail-oi1-f178.google.com ([209.85.167.178]:46778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gH8Ni-0007Lu-OT for 33170@debbugs.gnu.org; Mon, 29 Oct 2018 10:19:03 -0400 Received: by mail-oi1-f178.google.com with SMTP id k64-v6so7167414oia.13 for <33170@debbugs.gnu.org>; Mon, 29 Oct 2018 07:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=hkWlWsL1Gfoo/BaKmnFq+X3heIozOzTcRODRGex8yqc=; b=NByDvs5oWx/n8s6wziVWDDVlrHgmPSmgUmUUoy2h4qgIirXAcfW+kfkAAoqkxn2qMb mlzoXB0AOLBLzZ21Cq0xRmXwWrsNosJ/9vFOeAZQbf/EUuHAvpb42qHBtpBRy57F9Cyd iPwpvSNDcZmiAHzEoU6W2zXGzarq1MKgIFRRWV3fECyuXdqeH8NjXKlxLkX09d/Bp58U LUWTHE7Esalvl1tiIUid2Hdhe5AsDk3W6Rg1uEXoJzgLDkfNgJdCKXB0h8weAEFqAeLI w8lM/loWYlmvdC2aHpO6QAuBr3gWYuBo9FZg4QNIlnZI82Os6EU+1AqqrUfD9c/lE5nr I+VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=hkWlWsL1Gfoo/BaKmnFq+X3heIozOzTcRODRGex8yqc=; b=Jya0zVfdnHISOb/rVJPBsXK2WDOrtbg5NadtkQ8dAua85rlu5DdfBvh8x+t/ubiGmr itXlbKVhLUEYzL0wxCDvcVEGqrOb7VDRAgVf6aE3HpF8+oANmksnm/Cw1oxKEWDUmDGs N2MEFD2Ok+71WIRkPZ2tb7gSMngsX8IVq76GMUN7gPscKKSBhxnoL1IDk5m+3uTRCt+I dP0dgQc8WuMVbRpxGxRBRuSZUOrDa6gbsiVeoQYJ0XlM6uUIYCLboTwy1sJEvr4+xF/p bbl+tFTQXYGxCRgFoeT15HinNqaPwVkM9YAT2KGOEb2jwl5XUS1dsyS3gnQqyWeAVvrt 7r0A== X-Gm-Message-State: AGRZ1gIrwwjudFaBrQuMA7v53LYQ8rabZHR+vdfNtKiCDlZluMIPfJJc 7Pfg3cBbAaqjjk3Up57wtTcmY7Oa X-Google-Smtp-Source: AJdET5fKf1WYL8qk+wdSl15tHzMaglfNQqq/ZxN344GMfJJyC42krS3oc8QVcgWwuZNStvlzURvNOw== X-Received: by 2002:aca:fd12:: with SMTP id b18-v6mr9142093oii.337.1540822736682; Mon, 29 Oct 2018 07:18:56 -0700 (PDT) Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id w17sm6955360oth.1.2018.10.29.07.18.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 07:18:55 -0700 (PDT) References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: Stefan Monnier Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method In-reply-to: Date: Mon, 29 Oct 2018 09:18:53 -0500 Message-ID: <877ei0n8du.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 33170 Cc: 33170@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain On Sat 27 Oct 2018 at 16:49, Stefan Monnier wrote: > AFAIC it's a limitation. We could support interactive specs, but I'm > really not convinced it's worth the trouble. If using 2 functions (one > generic and one interactive, which calls the generic one) is really > annoying for some reason, I guess you could use > > (put ' 'interactive-form ) > > but I think this property should be deprecated, so don't tell anyone > (especially don't tell me) that I even mentioned it to you, Thanks for the response. Seems like the two-function solution is the way to go I guess. I do think this should be documented as a limitation somewhere though. Perhaps a note at the end of that section in the manual along the lines: Note that a current limitation of generic functions is that they may not be interactive. The recommended way of working around this is to define an interactive function that simply calls the generic function. That's not strictly true of course since (cl-defgeneric foo () (interactive) (message "foo")) works just fine. It's adding methods that seems to mess it up. Alex --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEeEJ4XAMgliXNXicpHkInolPpmscFAlvXFs0ACgkQHkInolPp msf6Agf/RvzHgNqFBU2s42OFDZtbxdpCMdHbtynZZheI/shA7kmEbg8MLoEncgXo /2oflVGq46fMD2BOeq/wQeGPnRcFFO9xVa2sFOQ/M+Hv9cKClLmbm24KROTXTSOL 7KkzVZuBOXk4e+AExPPXlfFppnW2oGFtl+DuR1C++7irtJ+dJTzMOhrv0GF5VBNR aByAJKmf2nKEf3+9t7ugnFMjgPv1DctsbRyJfAZFwq3e2lrHigPUNZv52S+15uyb aHaqMTYTxbUTxZBoj/uoBVIWOQPph4PNIW6EgBMrETIH9NE6iuyGswR4+9xCtqw1 rpsfXj+EBJTghR2XzM4/dxW1ETZl9Q== =Tvtx -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 06:15:52 2018 Received: (at 33170-done) by debbugs.gnu.org; 30 Oct 2018 10:15:52 +0000 Received: from localhost ([127.0.0.1]:53399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHR3w-0002XR-G2 for submit@debbugs.gnu.org; Tue, 30 Oct 2018 06:15:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHR3v-0002XE-AK for 33170-done@debbugs.gnu.org; Tue, 30 Oct 2018 06:15:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHR3n-0005Je-2S for 33170-done@debbugs.gnu.org; Tue, 30 Oct 2018 06:15:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHR3g-0005HY-QG; Tue, 30 Oct 2018 06:15:41 -0400 Received: from [176.228.60.248] (port=2231 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gHR3V-0001yY-Vn; Tue, 30 Oct 2018 06:15:32 -0400 Date: Tue, 30 Oct 2018 12:15:37 +0200 Message-Id: <838t2floza.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <877ei0n8du.fsf@gmail.com> (message from Alex Branham on Mon, 29 Oct 2018 09:18:53 -0500) Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> <877ei0n8du.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33170-done Cc: 33170-done@debbugs.gnu.org, monnier@IRO.UMontreal.CA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Alex Branham > Cc: Eli Zaretskii , 33170@debbugs.gnu.org > Date: Mon, 29 Oct 2018 09:18:53 -0500 > > On Sat 27 Oct 2018 at 16:49, Stefan Monnier wrote: > > > AFAIC it's a limitation. We could support interactive specs, but I'm > > really not convinced it's worth the trouble. If using 2 functions (one > > generic and one interactive, which calls the generic one) is really > > annoying for some reason, I guess you could use > > > > (put ' 'interactive-form ) > > > > but I think this property should be deprecated, so don't tell anyone > > (especially don't tell me) that I even mentioned it to you, > > Thanks for the response. Seems like the two-function solution is the way > to go I guess. I do think this should be documented as a limitation > somewhere though. Done. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 08:48:54 2018 Received: (at 33170-done) by debbugs.gnu.org; 30 Oct 2018 12:48:54 +0000 Received: from localhost ([127.0.0.1]:53506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHTS2-0004AD-1d for submit@debbugs.gnu.org; Tue, 30 Oct 2018 08:48:54 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHTRz-0004A5-Fp for 33170-done@debbugs.gnu.org; Tue, 30 Oct 2018 08:48:52 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9UCmncd016728; Tue, 30 Oct 2018 08:48:50 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8ADDF6A445; Tue, 30 Oct 2018 08:48:49 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method Message-ID: References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> <877ei0n8du.fsf@gmail.com> <838t2floza.fsf@gnu.org> Date: Tue, 30 Oct 2018 08:48:49 -0400 In-Reply-To: <838t2floza.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 Oct 2018 12:15:37 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6407=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6407> : inlines <6947> : streams <1802810> : uri <2741052> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 33170-done Cc: Alex Branham , 33170-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Thanks for the response. Seems like the two-function solution is the way >> to go I guess. I do think this should be documented as a limitation >> somewhere though. > Done. Should we add a warning for it? Stefan diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index fb4f3ab680..025653de70 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -355,6 +355,9 @@ cl-generic-define-context-rewriter . ,(lambda () spec-args)) macroexpand-all-environment))) (require 'cl-lib) ;Needed to expand `cl-flet' and `cl-function'. + (when (interactive-form (cadr fun)) + (message "Interactive forms unsupported in generic functions: %S" + (interactive-form (cadr fun)))) ;; First macroexpand away the cl-function stuff (e.g. &key and ;; destructuring args, `declare' and whatnot). (pcase (macroexpand fun macroenv) From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 30 09:09:49 2018 Received: (at 33170-done) by debbugs.gnu.org; 30 Oct 2018 13:09:49 +0000 Received: from localhost ([127.0.0.1]:53515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHTmH-0004eE-4k for submit@debbugs.gnu.org; Tue, 30 Oct 2018 09:09:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34001) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHTmE-0004e1-QB for 33170-done@debbugs.gnu.org; Tue, 30 Oct 2018 09:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gHTm4-0001jy-0d for 33170-done@debbugs.gnu.org; Tue, 30 Oct 2018 09:09:41 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gHTlx-0001eh-Jd; Tue, 30 Oct 2018 09:09:32 -0400 Received: from [176.228.60.248] (port=1149 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gHTlv-0005Fu-78; Tue, 30 Oct 2018 09:09:28 -0400 Date: Tue, 30 Oct 2018 15:09:39 +0200 Message-Id: <83tvl3k2cs.fsf@gnu.org> From: Eli Zaretskii To: Stefan Monnier In-reply-to: (message from Stefan Monnier on Tue, 30 Oct 2018 08:48:49 -0400) Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> <877ei0n8du.fsf@gmail.com> <838t2floza.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 33170-done Cc: alex.branham@gmail.com, 33170-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: Stefan Monnier > Cc: Alex Branham , 33170-done@debbugs.gnu.org > Date: Tue, 30 Oct 2018 08:48:49 -0400 > > >> Thanks for the response. Seems like the two-function solution is the way > >> to go I guess. I do think this should be documented as a limitation > >> somewhere though. > > Done. > > Should we add a warning for it? No objections from me. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 31 10:49:38 2018 Received: (at 33170-done) by debbugs.gnu.org; 31 Oct 2018 14:49:38 +0000 Received: from localhost ([127.0.0.1]:57355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHroP-0002KL-Ug for submit@debbugs.gnu.org; Wed, 31 Oct 2018 10:49:38 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:41699) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gHroN-0002KD-VZ for 33170-done@debbugs.gnu.org; Wed, 31 Oct 2018 10:49:36 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id w9VEnZgu020884; Wed, 31 Oct 2018 10:49:35 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id DEF90AE156; Wed, 31 Oct 2018 10:49:34 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method Message-ID: References: <87efccmjun.fsf@gmail.com> <83lg6jop6b.fsf@gnu.org> <87k1m3lg0k.fsf@gmail.com> <83woq3mopc.fsf@gnu.org> <87d0rva1fx.fsf@gmail.com> <83r2gbmksh.fsf@gnu.org> <877ei0n8du.fsf@gmail.com> <838t2floza.fsf@gnu.org> <83tvl3k2cs.fsf@gnu.org> Date: Wed, 31 Oct 2018 10:49:34 -0400 In-Reply-To: <83tvl3k2cs.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 30 Oct 2018 15:09:39 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0.1 X-NAI-Spam-Rules: 3 Rules triggered GEN_SPAM_FEATRE=0.1, EDT_SA_DN_PASS=0, RV6408=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6408> : inlines <6950> : streams <1802913> : uri <2741769> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 33170-done Cc: alex.branham@gmail.com, 33170-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> Should we add a warning for it? > No objections from me. Done in `master`. Stefan From unknown Thu Aug 14 21:53:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 29 Nov 2018 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator