Subject: bug#33170: closed (Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 30 Oct 2018 10:16:02 +0000

Your bug report

#33170: 27.0.50; interactive spec with cl-defgeneric/method

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
33170: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33170
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#33170: 27.0.50; interactive spec with cl-defgeneric/method
From: Eli Zaretskii <[email-masked]>
To: Alex Branham <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 30 Oct 2018 12:15:37 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Alex Branham <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>, [email-masked]
> Date: Mon, 29 Oct 2018 09:18:53 -0500
> 
> On Sat 27 Oct 2018 at 16:49, Stefan Monnier <[email-masked]> 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 '<GENERIC> 'interactive-form <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.

Subject: 27.0.50; interactive spec with cl-defgeneric/method
From: Alex Branham <[email-masked]>
To: [email-masked]
Date: Fri, 26 Oct 2018 17:19:44 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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