GNU bug report logs - #21618
Warning (bytecomp): misplaced interactive spec

Previous Next

Package: emacs;

Reported by: Philippe Vaucher <philippe.vaucher <at> gmail.com>

Date: Mon, 5 Oct 2015 13:36:02 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21618 in the body.
You can then email your comments to 21618 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21618; Package emacs. (Mon, 05 Oct 2015 13:36:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philippe Vaucher <philippe.vaucher <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 05 Oct 2015 13:36:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philippe Vaucher <philippe.vaucher <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Warning (bytecomp): misplaced interactive spec
Date: Mon, 5 Oct 2015 15:34:11 +0200
[Message part 1 (text/plain, inline)]
Hello,

I'm using Emacs snapshot from
https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa on ubuntu 15.04,
which at the moment is "GNU Emacs 25.0.50.2 (x86_64-pc-linux-gnu, GTK+
Version 3.14.13) of 2015-10-05."

Whenever I start emacs I get the following warning:

Warning (bytecomp): misplaced interactive spec: ‘(interactive (let ((args
(find-tag-interactive "[PCRE] Find tag regexp: " t))) (list
(rxt-pcre-to-elisp (nth 0 args)) (nth 1 args) (nth 2 args))))’

The function it refers to looks well defined:

(defadvice find-tag-regexp
  (before pcre-mode first (regexp &optional next-p other-window) disable)
  "Read regexp using PCRE syntax and convert to Elisp equivalent."
  "Perform `find-tag-regexp' using emulated PCRE regexp syntax."
  (interactive
   (let ((args (find-tag-interactive "[PCRE] Find tag regexp: " t)))
     (list (rxt-pcre-to-elisp (nth 0 args))
           (nth 1 args) (nth 2 args)))))

The code I'm refering to is
https://github.com/joddie/pcre2el/blob/master/pcre2el.el#L967

What is funny is that there is another `defadvice' that follows almost
exactly the same pattern right before this one and the other one doesn't
trigger the warning.

This made me do some research and basically I think the problem is in
`find-tag-regexp':

(defun find-tag-regexp (regexp &optional next-p other-window)
  "(snip doc)"
  (declare (obsolete xref-find-apropos "25.1"))
  (interactive (find-tag-interactive "Find tag regexp: " t))
  ;; We go through find-tag-other-window to do all the display hair there.
  (funcall (if other-window 'find-tag-other-window 'find-tag)
  regexp next-p t))


As you can see, it starts with a `declare' form instead of the
`interactive' form, and I think it confuses the `defadvice'.

Tell me if you need more information.

Thanks in advance,
Philippe
[Message part 2 (text/html, inline)]

Added indication that bug 21618 blocks19759 Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Oct 2015 00:31:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21618; Package emacs. (Tue, 06 Oct 2015 00:57:02 GMT) Full text and rfc822 format available.

Message #10 received at 21618 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Philippe Vaucher <philippe.vaucher <at> gmail.com>
Cc: 21618 <at> debbugs.gnu.org
Subject: Re: bug#21618: Warning (bytecomp): misplaced interactive spec
Date: Mon, 05 Oct 2015 20:47:55 -0400
I could not reproduce that (there was no recipe from emacs -Q).
Doesn't your defadvice have a duplicate doc-string though?


Anyway, while trying I noticed that in current master:

emacs -Q
M-x find-tag-reg TAB
  -> [no match]

whereas in 24.5 it works fine.

Same story with eg "mail-complete".

May or may not be related, but definitely needs fixing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21618; Package emacs. (Tue, 06 Oct 2015 06:09:01 GMT) Full text and rfc822 format available.

Message #13 received at 21618 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Philippe Vaucher <philippe.vaucher <at> gmail.com>
Cc: 21618 <at> debbugs.gnu.org
Subject: Re: bug#21618: Warning (bytecomp): misplaced interactive spec
Date: Tue, 06 Oct 2015 02:08:37 -0400
Glenn Morris wrote:

> emacs -Q
> M-x find-tag-reg TAB
>   -> [no match]
>
> whereas in 24.5 it works fine.
>
> Same story with eg "mail-complete".

Oh, apparently read-extended-command explicitly excludes obsolete commands now.
Seems like a recipe for confusion to me. (d94bc77ec77d)




Removed indication that bug 21618 blocks Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Oct 2015 06:10:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21618; Package emacs. (Tue, 06 Oct 2015 07:13:02 GMT) Full text and rfc822 format available.

Message #18 received at 21618 <at> debbugs.gnu.org (full text, mbox):

From: Philippe Vaucher <philippe.vaucher <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21618 <at> debbugs.gnu.org
Subject: Re: bug#21618: Warning (bytecomp): misplaced interactive spec
Date: Tue, 6 Oct 2015 09:11:57 +0200
[Message part 1 (text/plain, inline)]
I could not reproduce that (there was no recipe from emacs -Q).
> Doesn't your defadvice have a duplicate doc-string though?
>

Thanks for your answer. Here's an "emacs -Q" way of reproducing:

wget https://raw.githubusercontent.com/joddie/pcre2el/master/pcre2el.el
emacs -Q pcre2el.el --eval '(progn (load-library
"etags")(eval-buffer)(pcre-mode)(switch-to-buffer "*Compile-Log*"))'

This should switch you to the buffer with the warning.

Thanks,
Philippe
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21618; Package emacs. (Tue, 06 Oct 2015 12:40:04 GMT) Full text and rfc822 format available.

Message #21 received at 21618 <at> debbugs.gnu.org (full text, mbox):

From: Philippe Vaucher <philippe.vaucher <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21618 <at> debbugs.gnu.org
Subject: Re: bug#21618: Warning (bytecomp): misplaced interactive spec
Date: Tue, 6 Oct 2015 14:38:54 +0200
[Message part 1 (text/plain, inline)]
>
> Doesn't your defadvice have a duplicate doc-string though?
>

Hey, you're right! If I fix the "double string" typo then the warning goes
away.

Thanks for noticing, as far as I'm concerned this problem is solved...
maybe the warning could be more explicit tho.
Philippe
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Oct 2015 16:39:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 21618 <at> debbugs.gnu.org and Philippe Vaucher <philippe.vaucher <at> gmail.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Oct 2015 16:39:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Nov 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 280 days ago.

Previous Next


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