emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.online>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel Forth
Date: Thu, 23 Jan 2025 08:36:24 -1000	[thread overview]
Message-ID: <87plkdml7b.fsf@tsdye.online> (raw)
In-Reply-To: <86v7u6gd2k.fsf@fastmail.fm> (Joost Kremers's message of "Thu, 23 Jan 2025 09:16:19 +0100")

Joost Kremers <joostkremers@fastmail.fm> writes:

> The `declare-function` call says that `forth-proc` can be found 
> in
> `gforth.el`, so the fact that you have `forth-mode.el` installed 
> is
> (probably) irrelevant. What you need is the file `gforth.el`. 
> Where it
> comes from is irrelevant, it just needs to be on Emacs' 
> `load-path`. (And
> it needs to actually provide `forth-proc`, of course, and make 
> it
> autoloadable, but I assume that's the case.)
>
> What I don't understand, though, is why there's no `(require 
> 'gforth)` in
> `ob-forth.el`. It seems that `forth-proc` is essential for 
> running Forth
> source blocks, so a `require` seems in order.
>
> The point is that `declare-function` is usually only used to 
> declare
> functions that are optional, meaning that `ob-forth.el` should 
> check if
> it's available and gracefully handle the case where it's not.
>
>> What is the best way forward here?
>
> What does the documentation for `ob-forth.el` say? Does it say 
> `gforth.el`
> needs to be installed? Otherwise perhaps ask the Org mailing 
> list or the
> ob-forth maintainer directly?

No one is maintaining ob-forth.el.

I found gforth.el in emacs/site-lisp and confirm that forth-proc 
is there.

Here is the relevant part of ob-forth.el:

    ;; Requires the gforth forth compiler and `forth-mode' (see 
    below).
    ;; https://www.gnu.org/software/gforth/

    ;;; Requirements:

    ;; Session evaluation requires the gforth forth compiler as 
    well as
    ;; `forth-mode' which is distributed with gforth (in 
    gforth.el).

    ;;; Code:

    (require 'org-macs)
    (org-assert-version)

    (require 'ob)
    (require 'org-macs)

    (declare-function forth-proc "ext:gforth" ())

It does not (require 'gforth), but strangely (to me) requires 
org-macs twice.

Perhaps ob-forth.el is broken?

All the best,
Tom

-- 
Thomas S. Dye
https://tsdye.online/tsdye


  parent reply	other threads:[~2025-01-23 18:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-22 20:41 Babel Forth Thomas S. Dye
2025-01-23  8:16 ` Joost Kremers
2025-01-23  8:22   ` Joost Kremers
2025-01-23 18:36   ` Thomas S. Dye [this message]
2025-01-23 19:13     ` Ihor Radchenko
2025-01-23 19:29 ` Ihor Radchenko
2025-01-23 20:05   ` Thomas S. Dye
2025-01-24  0:17   ` Thomas S. Dye

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87plkdml7b.fsf@tsdye.online \
    --to=tsd@tsdye.online \
    --cc=emacs-orgmode@gnu.org \
    --cc=joostkremers@fastmail.fm \
    /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/org-mode.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).