emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Thomas S. Dye" <tsd@tsdye.online>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Babel Forth
Date: Tue, 28 Jan 2025 09:48:37 -1000	[thread overview]
Message-ID: <875xlysoru.fsf@tsdye.online> (raw)
In-Reply-To: <87jzaeaio6.fsf@localhost> (Ihor Radchenko's message of "Tue, 28 Jan 2025 18:37:45 +0000")

Ihor Radchenko <yantar92@posteo.net> writes:

> "Thomas S. Dye" <tsd@tsdye.online> writes:
>
>> I pushed Forth documentation to the Worg repo,
>
> Thanks!
> I have 2 comments:
>
>> +Babel evaluates Forth code blocks in an inferior Forth 
>> process.
>> +You can start an inferior Forth process with =M-x run-forth=.
>
> Does it mean that users _must_ run M-x run-forth? Otherwise, I 
> am not
> sure why this paragraph is present.

Thanks!
Edited to indicate a running Forth instance is needed to evaluate 
Forth code blocks.

>> +#+begin_example
>> +,#+begin_src forth :exports both
>> +." Hello World!"
>> +,#+end_src
>> +#+end_example
>> +
>> +#+begin_src forth :exports both
>> +." Hello World!"
>
> This will export into 3! snippets. I feel that
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-forth.html
> is confusing. Maybe we just put both the code and result into 
> verbatim
> example, as in
> https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html

Matt did a great job on ob-doc-shell.

I kind of like the 3 (not 3! :) snippets because they show the Org 
mode buffer, the code export, and the results export.  I feel this 
illustrates a lot of Babel capability.

Nevertheless, the multiple snippets are potentially confusing, so 
I've followed Matt's lead and changed to a single example block.

Hopefully, some Forth programmers can help flesh out this 
documentation stub.

All the best,
Tom
-- 
Thomas S. Dye
https://tsdye.online/tsdye


      reply	other threads:[~2025-01-28 19:49 UTC|newest]

Thread overview: 10+ 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
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
2025-01-28 18:37     ` Ihor Radchenko
2025-01-28 19:48       ` Thomas S. Dye [this message]

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=875xlysoru.fsf@tsdye.online \
    --to=tsd@tsdye.online \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).