Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #32602 > unrolled thread

Running iForth from Emacs

Started byAlexander Skobelev <al.skobelev@gmail.com>
First post2014-07-24 10:32 +0400
Last post2014-07-24 18:14 +0400
Articles 3 — 2 participants

Back to article view | Back to comp.lang.forth


Contents

  Running iForth from Emacs Alexander Skobelev <al.skobelev@gmail.com> - 2014-07-24 10:32 +0400
    Re: Running iForth from Emacs mhx@iae.nl - 2014-07-24 00:13 -0700
      Re: Running iForth from Emacs Alexander Skobelev <al.skobelev@gmail.com> - 2014-07-24 18:14 +0400

#32602 — Running iForth from Emacs

FromAlexander Skobelev <al.skobelev@gmail.com>
Date2014-07-24 10:32 +0400
SubjectRunning iForth from Emacs
Message-ID<m2oawfp8qp.fsf@gmail.com>
Hello!
I'm trying to run iForth from Emacs the way I've done this for gforth.

So I have the following in my .emacs:
---------
(require 'forth-mode "gforth.el")
(autoload 'run-forth "gforth")
(autoload 'forth-block-mode "gforth")
(add-to-list 'auto-mode-alist '("\\.\\(f[s]?\\|frt\\)$" . forth-mode))
(add-to-list 'auto-mode-alist '("\\.fb$" . forth-block-mode))

(add-hook 'forth-mode-hook
          (function (lambda ()
            ;; customize variables here:
            (setq forth-indent-level 4)
            (setq forth-minor-indent-level 2)
            (setq forth-hilight-level 3)
            )))

(defun run-gforth () (interactive) (run-forth "/usr/local/bin/gforth"))
(defun run-iforth () (interactive) (run-forth "/Users/sasha/Library/iForth/i64.app/Contents/MacOS/i64.sh"))
---------

Threr is a problem yet. When I try calling run-iforth it hangs with the
following output:
---------
IFORTH=/Users/sasha/Library/iForth
IFORTHBIN64=/Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth.img
IFORTH_VERBOSE=1
TERM_PROGRAM=
[1] iForth server for Darwin, rev 1.01, Dec 30 2010, 11:09:21.
[2] Stuffed iForth at 0x1000000 [entry: 0x1000000]
/Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth :: TERM does not exist.
^[[6n
---------

The result of successfull run in iTerm looks like this:
---------
IFORTH=/Users/sasha/Library/iForth
IFORTHBIN64=/Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth.img
IFORTH_VERBOSE=1
TERM_PROGRAM=iTerm.app
[1] iForth server for Darwin, rev 1.01, Dec 30 2010, 11:09:21.
[2] Stuffed iForth at 0x1000000 [entry: 0x1000000]
/Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth :: TERM does not exist.
[4] Console is /dev/ttys000
[5] Audio support with: IN fjack
[6] Executing include/iforth.prf

Creating --- LOCATE utility      Version 1.10 ---
Creating --- Several utilities   Version 3.11 ---
Creating --- Extended OS words   Version 3.17 ---
Creating --- Terminal Driver     Version 3.14 ---
Creating --- Command line Editor Version 1.30 ---
Creating --- Online help         Version 1.36 ---
Creating --- Glossary Generator  Version 1.05 ---
Creating --- Disassembler        Version 2.40 ---
Creating --- OS Library support  Version 2.00 ---
Creating --- Mach Timing         Version 1.01 ---
iForth version 4.0.635, generated 00:54:30, December 26, 2010.
x86_64 binary, native floating-point, extended precision.
Copyright 1996 - 2010 Marcel Hendrix.

FORTH>
---------

As far as I understand there is a problem with a terminal handling. BTW
there is a similar problem with Swift Forth – it also can not be running
from Emacs for the same reason.

I'm just wondering, is it possible and how to run iForth from Emacs and use it
with gforth-mode? 

Thanks in advance,
Alexander







[toc] | [next] | [standalone]


#32603

Frommhx@iae.nl
Date2014-07-24 00:13 -0700
Message-ID<72bfcfeb-e69c-477f-8f99-ba67f12ca62c@googlegroups.com>
In reply to#32602
On Thursday, July 24, 2014 8:32:30 AM UTC+2, Alexander Skobelev wrote:
[..]

/Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth :: TERM does not exist.  

That is a message from the iServer during loading the image. 
It means that you should set the environment variable TERM 
(on the OS commandline) to match the terminal characteristics 
you want. Maybe Charles Turner will come back on this.

> I'm just wondering, is it possible and how to run iForth 
> from Emacs and use it with gforth-mode? 

I guess the Emacs manual will have a section on MacOS.
An empty TERM variable is in principle not a fatal error for
iForth, but Emacs may have different ideas on that.

By the way, you should upgrade your iForth. The release
you have there is 4 years out of date.

-marcel

[toc] | [prev] | [next] | [standalone]


#32621

FromAlexander Skobelev <al.skobelev@gmail.com>
Date2014-07-24 18:14 +0400
Message-ID<m238dqrgh9.fsf@gmail.com>
In reply to#32603
mhx@iae.nl writes:

> On Thursday, July 24, 2014 8:32:30 AM UTC+2, Alexander Skobelev wrote:
> [..]
>
> /Users/sasha/Library/iForth/i64.app/Contents/MacOS/iforth :: TERM does not exist.  
>
> That is a message from the iServer during loading the image. 
> It means that you should set the environment variable TERM 
> (on the OS commandline) to match the terminal characteristics 
> you want. Maybe Charles Turner will come back on this.
>
>> I'm just wondering, is it possible and how to run iForth 
>> from Emacs and use it with gforth-mode? 
>
> I guess the Emacs manual will have a section on MacOS.
> An empty TERM variable is in principle not a fatal error for
> iForth, but Emacs may have different ideas on that.
>

Well, if try running iForth from Emacs's shell mode, there is TERM set to
dumb, and iForth doesn't run. If set TERM to xterm-color256, it doesn't
run also. :(

> By the way, you should upgrade your iForth. The release
> you have there is 4 years out of date.

You are right, but I believe it is the latest available free version of
iForth for Mac OSX available from the iForth server, isn't it? 

>
> -marcel

Thanks for response!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web