From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id SOo0LyD7kWeS2QAAqHPOHw:P1 (envelope-from ) for ; Thu, 23 Jan 2025 08:17:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id SOo0LyD7kWeS2QAAqHPOHw (envelope-from ) for ; Thu, 23 Jan 2025 09:17:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b=EdhulUIr; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=DiXjIJX0; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737620256; a=rsa-sha256; cv=none; b=eOT4jUuCI4yXLyk0qmF8ZNLgQi/dPOllXwRYxmArZ/irVCC2Ie6AbyOh3b7wwgGdGN4SUY ILFd9dyQANs/f1bkBvepIe75FxF3RaqdW9KJR26bSrPTgHz2uth+jBmUrNSRSaSEuY6X3Y tGrcDs49o7lK7ITPZnEaH9t7FVx72uoyglHXRyfb6hayD1ybPdHwdn+8KOYaKvFY3xq4z6 Uc93Hwvp1E+t1jH5wYOclTH43HshxpAJ639LHvz9XEhYe+aMjAzUJ7AF09bTEfJtY0lvmB S1OIF+hguYHV2JM6cPIQ436pp78k8YS4/BNxorJVoLkRsOClWoLyAKlTBtTdHw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b=EdhulUIr; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=DiXjIJX0; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737620256; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=U5fZB0IrezxkBkauSFMszJMzJVZzeAnnX+GtkMJfUoI=; b=hFmyKEH0vBhhwH/isB5KqGvRy3DPLGIr9bJ1QPxnYnIPz1L7huGcLBS6+MheZRIFo5DkUT 5uH+U2Yw8++wieSXo05kfn2EB8kr9vlV9cqdVbGtW7Cq9Um4r//ee5XrdSuhNhuUrJYfTP YRpdQOn2/EQHGzRiXOwzfqfLcf0X8J6lmVBwd6aMe6RKkLWW+BqyBAyfoZdhDweixSMWIq Q6lrT7GbpVdSD0cNjHzI25/kNAlvGbHrCzDj+LBwgRsktBYAPT8oZRTO5BGgIJSZHOkcFa PCYK/2biW1rv1ab9K6mKNQmpmU9NEsWEs5vtPCZ+FNnohXfD6o6I/9Uixjk3yw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 89058612E0 for ; Thu, 23 Jan 2025 09:17:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tasOA-0004Q9-IQ; Thu, 23 Jan 2025 03:16:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tasO7-0004Pq-B9 for emacs-orgmode@gnu.org; Thu, 23 Jan 2025 03:16:31 -0500 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tasO2-0001sQ-3V for emacs-orgmode@gnu.org; Thu, 23 Jan 2025 03:16:30 -0500 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id C410411401CB; Thu, 23 Jan 2025 03:16:23 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Thu, 23 Jan 2025 03:16:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1737620183; x=1737706583; bh=U5fZB0Irez xkBkauSFMszJMzJVZzeAnnX+GtkMJfUoI=; b=EdhulUIrJS3er1NeIhPGPHWN8I Al/Ki9n/yzW6kPdpyGGwpwfcusEqjN6/3+rWWrfRN29Cf0RYG62HHg22nlvQ5HbG N+DSTLuU1+Yvwcd2P1XrQyJt2GpflfFbjiJjni6pdQdvMACYSjnCbAxDc3EyXybN 2GbrSWvmPjZE3Qcg+0Ec+Kg2IY0T1eiOIKmf7ZkQiaFcYKj1Oy/C7yqOX3C6H/7T kOp9KinsNwTdkcZVuIIp0n7J6P9GBNcFBNNaFJFnowshyJkF3NxfZWHetfjWy6Zb BQJpaldTFmtF3twgEHv8769o73h8ACfiPBcRG+xaPngb8y5Es9E7do7pfbqw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1737620183; x=1737706583; bh=U5fZB0IrezxkBkauSFMszJMzJVZzeAnnX+G tkMJfUoI=; b=DiXjIJX0SEn4EpbG/KKeyQY8h42Y62siYd/g72ywOEi/sOYQrwP cdFm2G0jl4C+bJfuBlVWST+aUMK0dNtLPUWPMAKi8zLU3jA4IaXQmoSlIs857dKP O490oM8p2e7Z2cS6YYeQRDDAtX0Mq27H1c8gLuvtoS3jEBNu9T9MHvzmzfMRkE5g ICtfIRihma1om7+MKdQc9dyfqd76elxnVhm3B46kcF++JB99NqOH7y9G0mege9z+ lq7zo3bL9Zu+iIBqWQ8kUntm0zzF/Ypvbn6BWTyDs30o042pX3QmC72My2rUR2wu GAIuryoEaCokeCrW+E+h1UWc5F1ACWAeCcw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvve fujghffgffkfggtgesthdtredttdertdenucfhrhhomheplfhoohhsthcumfhrvghmvghr shcuoehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrth htvghrnhepfedtueelieeifffhfedtudeifefgkeejleeigfefteejveeiudekieeugfek ieefnecuffhomhgrihhnpegvlhdrihhtnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdr fhhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhope gvmhgrtghsqdhorhhgmhhouggvsehgnhhurdhorhhgpdhrtghpthhtohepthhsugesthhs ugihvgdrohhnlhhinhgv X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Jan 2025 03:16:22 -0500 (EST) From: Joost Kremers To: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org Subject: Re: Babel Forth In-Reply-To: <874j1qlgxe.fsf@tsdye.online> (Thomas S. Dye's message of "Wed, 22 Jan 2025 10:41:49 -1000") References: <874j1qlgxe.fsf@tsdye.online> User-Agent: mu4e 1.12.8; emacs 29.4 Date: Thu, 23 Jan 2025 09:16:19 +0100 Message-ID: <86v7u6gd2k.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=103.168.172.154; envelope-from=joostkremers@fastmail.fm; helo=fhigh-a3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -3.33 X-Spam-Score: -3.33 X-Migadu-Queue-Id: 89058612E0 X-TUID: iZcXMXVq12Ny On Wed, Jan 22 2025, Thomas S. Dye wrote: > Aloha all, > > I'm drafting ob-doc-forth.org and haven't been able to get ob-forth.el to > recognize a working GForth in Spacemacs. I get "Symbol's function > definition is void: forth-proc" when I evaluate a Forth source block. > > In ob-forth.el there is this: (declare-function forth-proc "ext:gforth" ()) > > My hunch is that the ext: part of ext:gforth expects that forth-mode is > setup to use the forth-mode distributed with GForth. No. `declare-function` doesn't do anything except silence the byte-compiler. It's used when you use a function in your Elisp source that may not be loaded into your running Emacs session while editing the .el file. In such a case, the byte compiler cannot find the function, so it issues a warning. With `declare-function`, you tell the byte compiler where to look for the function. The prefix "ext:" indicates that the file is an external file (i.e., doesn't come with Emacs), so it may not even be found at all, and that if that happens, the byte compiler still shouldn't complain. The important thing to note is that `declare-function` doesn't make the function available for *running* the code, it really is meant *just* for the byte compiler. To make sure `gforth.el` is loaded, you need to use a `require` in your source code. > Spacemacs appears to > use forth-mode from Elpa, instead, and I find forth-mode.el in the elpa > subdirectory of my Spacemacs. 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? -- Joost Kremers Life has its moments