all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#21618: Warning (bytecomp): misplaced interactive spec
@ 2015-10-05 13:34 Philippe Vaucher
  2015-10-06  0:47 ` Glenn Morris
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Vaucher @ 2015-10-05 13:34 UTC (permalink / raw)
  To: 21618

[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2670 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21618: Warning (bytecomp): misplaced interactive spec
  2015-10-05 13:34 bug#21618: Warning (bytecomp): misplaced interactive spec Philippe Vaucher
@ 2015-10-06  0:47 ` Glenn Morris
  2015-10-06  6:08   ` Glenn Morris
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Glenn Morris @ 2015-10-06  0:47 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 21618


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.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21618: Warning (bytecomp): misplaced interactive spec
  2015-10-06  0:47 ` Glenn Morris
@ 2015-10-06  6:08   ` Glenn Morris
  2015-10-06  7:11   ` Philippe Vaucher
  2015-10-06 12:38   ` Philippe Vaucher
  2 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2015-10-06  6:08 UTC (permalink / raw)
  To: Philippe Vaucher; +Cc: 21618

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)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21618: Warning (bytecomp): misplaced interactive spec
  2015-10-06  0:47 ` Glenn Morris
  2015-10-06  6:08   ` Glenn Morris
@ 2015-10-06  7:11   ` Philippe Vaucher
  2015-10-06 12:38   ` Philippe Vaucher
  2 siblings, 0 replies; 5+ messages in thread
From: Philippe Vaucher @ 2015-10-06  7:11 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 21618

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 982 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#21618: Warning (bytecomp): misplaced interactive spec
  2015-10-06  0:47 ` Glenn Morris
  2015-10-06  6:08   ` Glenn Morris
  2015-10-06  7:11   ` Philippe Vaucher
@ 2015-10-06 12:38   ` Philippe Vaucher
  2 siblings, 0 replies; 5+ messages in thread
From: Philippe Vaucher @ 2015-10-06 12:38 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 21618

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

>
> 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

[-- Attachment #2: Type: text/html, Size: 557 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-06 12:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-05 13:34 bug#21618: Warning (bytecomp): misplaced interactive spec Philippe Vaucher
2015-10-06  0:47 ` Glenn Morris
2015-10-06  6:08   ` Glenn Morris
2015-10-06  7:11   ` Philippe Vaucher
2015-10-06 12:38   ` Philippe Vaucher

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.