unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Robert Irelan <rirelan@gmail.com>, 46958@debbugs.gnu.org
Subject: bug#46958: 28.0.50; invalid-function error for macros that have function bindings
Date: Sat, 06 Mar 2021 14:24:14 +0000	[thread overview]
Message-ID: <87h7louzqp.fsf@tcd.ie> (raw)
In-Reply-To: <87pn0co316.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 06 Mar 2021 13:55:01 +0100")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Robert Irelan <rirelan@gmail.com> writes:
>
>> Lately I have been getting errors where occasionally `invalid-function`
>> errors will be raised when calling some macros, even when those macros
>> have function bindings (checked with `fboundp`). Here is an example of a
>> stack trace I got when using the `org-fc` package:
>>
>> ```
>> Debugger entered--Lisp error: (invalid-function
>> org-fc-with-point-at-back-heading)
>>   signal(invalid-function (org-fc-with-point-at-back-heading))
>
> I'm not quite sure I understand this bug report.  First of all,
> `org-fc-with-point-at-back-heading' doesn't seem to exist in the Emacs
> tree, so is this from an external package?

Yes:

  https://sr.ht/~l3kn/org-fc/
  https://github.com/l3kn/org-fc

See also: https://todo.sr.ht/~l3kn/org-fc/23

> The other issue is that I think there's a misunderstanding here: You can
> never funcall a macro.
>
> (macrop 'when)
> => t
> (fboundp 'when)
> => t
> (funcall 'when)
> => Debugger entered--Lisp error: (invalid-function when)
>     when()
>
> Macros are foundp, but that doesn't mean you can funcall them.

Just to add: macros are fboundp but not functionp, which is the property
that funcall requires.

The funcall is here:

  https://git.sr.ht/~l3kn/org-fc/tree/main/item/org-fc.el#L1284

Looks like something put something in org-fc-types (e.g. using
org-fc-register-type) that shouldn't be there.

So, this doesn't seem related to Emacs, unless there's been a recent
nativecomp regression that gave rise to this?

HTH,

-- 
Basil





  reply	other threads:[~2021-03-06 14:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-06  2:00 bug#46958: 28.0.50; invalid-function error for macros that have function bindings Robert Irelan
2021-03-06 12:55 ` Lars Ingebrigtsen
2021-03-06 14:24   ` Basil L. Contovounesios [this message]
2021-03-06 18:28     ` Robert Irelan
2021-03-06 22:39       ` Phil Sainty
2021-03-07 14:27         ` Basil L. Contovounesios
2021-03-07 21:38         ` Robert Irelan
2021-03-08  6:30           ` Phil Sainty
2021-03-08  7:18             ` Robert Irelan
2021-03-08  9:06               ` Phil Sainty
2022-06-20  1:10               ` Lars Ingebrigtsen
2021-03-07 14:33   ` Pip Cet
2021-03-07 15:58     ` Lars Ingebrigtsen
2021-03-07 18:06       ` Pip Cet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7louzqp.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=46958@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=rirelan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).