Revisiting loading a LISP file into SEdit.

13 views
Skip to first unread message

pixel...@gmail.com

unread,
Nov 24, 2025, 4:39:56 PM (9 days ago) Nov 24
to Medley Interlisp core
So I'm attempting to load an entire ATAN2TEST.LISP for editing into SEdit and I get the following error. Prior my process was to manually FILESLOAD into an Exec then call ED(<func>) on the functions as I wanted to update them. I'm trying to recall if I've missed any details from our discussion. 

I guess my question is, what is the correct method?
I also tried ED(<myfile>) in various forms to no success.

Screenshot_20251124_143209.png

Matt Heffron

unread,
Nov 24, 2025, 5:09:41 PM (9 days ago) Nov 24
to pixel...@gmail.com, Medley Interlisp core
SEdit edits S-EXPRs not files.

Editing files is just something that it isn't designed to do.

Sent via the Samsung Galaxy S22+ 5G, an AT&T 5G smartphone
Get Outlook for Android

From: lisp...@googlegroups.com <lisp...@googlegroups.com> on behalf of pixel...@gmail.com <pixel...@gmail.com>
Sent: Monday, November 24, 2025 1:39:56 PM
To: Medley Interlisp core <lisp...@googlegroups.com>
Subject: Revisiting loading a LISP file into SEdit.
 
--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lispcore/a30007e0-46da-4107-86f8-bb47e41c4b8fn%40googlegroups.com.

Nick Briggs

unread,
Nov 24, 2025, 5:23:34 PM (9 days ago) Nov 24
to pixel...@gmail.com, Lisp Core
+1 to Matt - but lets look deeper:

Start by loading the source file into the system.  Typically when loading the source you'd want to (LOAD "file-name-in-file-system") -- e.g., (LOAD "ATAN2TEST.LISP").  The "name of the file" for the purposes of the fileCOMS *does not* include the extension.   When someone says "edit the file" with regard to what's stored within the file on the filesystem they're usually talking about editing the fileCOMS -- which would be (ED 'ATAN2TEST 'FILE) (I don't remember whether the 'FILE is optional if the name has no conflicting definitions.) -- that fires up an SEDIT on ATAN2TESTCOMS - the file package commands that control what is stored in the external file.

The SEDIT on the fileCOMS provides an easy hook to get to the individual functions, variables, macros, constants, etc., in as much as you can select a name and meta-O to open the definition.   You can also, from an exec (ED 'function-name 'FNS) (or 'VARS, or 'FUNCTIONS, or ... whatever file package type it has)

We (should) never edit the file-in-the-filesystem -- we only edit the definitions and then use MAKEFILE and friends to store those back in a file-in-the-filesystem (basically a source-code database)

-- Nick



pixel...@gmail.com

unread,
Nov 24, 2025, 5:46:28 PM (9 days ago) Nov 24
to Medley Interlisp core
Ah, that works well enough. I just tested it.
So the by keeping a window open to the current fileCOMS you get a table of contents you can Meta o to select from - thanks!
I suppose I just need to be very careful not to save the old definition of the opened fileCOMS if I add a function.


Part of my annoyance prior was that I'd keep forgetting what I'd named my functions and have to SEE the file over and over again.
This should help.

Arun Welch

unread,
Nov 24, 2025, 6:00:33 PM (9 days ago) Nov 24
to pixel...@gmail.com, Medley Interlisp core
Medley is what’s called a residential Lisp environment. A loose analogy is that the file is a database of the functions, variables, classes, methods, etc associated with that particular system. The proper way edit these is to use the in-system tools like SEdit, and then when you’re ready to save them to the files by either editing the fileCOMS directly or by calling FILES? which will process any entries that the system doesn’t know about and ask you what you want to do with them. Once you have the file defined you save it by calling MAKEFILE. Common Lisp has similar functionality in the various DEFSYSTEM libraries, like ASDF, MK-DEFSYSTEM, DEFSYSTEM, etc.,

In a fresh sysout when you load that file it will process the COMS and keep track of changes, so you can remake the file by calling MAKEFILE.

This is different from a system like SBCL where files are just text. There are advantages and disadvantages both ways.

> On Nov 24, 2025, at 4:46 PM, pixel...@gmail.com wrote:
>
> Ah, that works well enough. I just tested it.
> So the by keeping a window open to the current fileCOMS you get a table of contents you can Meta o to select from - thanks!
> I suppose I just need to be very careful not to save the old definition of the opened fileCOMS if I add a function.
>
>
> Part of my annoyance prior was that I'd keep forgetting what I'd named my functions and have to SEE the file over and over again.
> This should help.
>
>
> On Monday, November 24, 2025 at 3:23:34 PM UTC-7 nicholas...@gmail.com wrote:
> +1 to Matt - but lets look deeper:
>
> Start by loading the source file into the system. Typically when loading the source you'd want to (LOAD "file-name-in-file-system") -- e.g., (LOAD "ATAN2TEST.LISP"). The "name of the file" for the purposes of the fileCOMS *does not* include the extension. When someone says "edit the file" with regard to what's stored within the file on the filesystem they're usually talking about editing the fileCOMS -- which would be (ED 'ATAN2TEST 'FILE) (I don't remember whether the 'FILE is optional if the name has no conflicting definitions.) -- that fires up an SEDIT on ATAN2TESTCOMS - the file package commands that control what is stored in the external file.
>
> The SEDIT on the fileCOMS provides an easy hook to get to the individual functions, variables, macros, constants, etc., in as much as you can select a name and meta-O to open the definition. You can also, from an exec (ED 'function-name 'FNS) (or 'VARS, or 'FUNCTIONS, or ... whatever file package type it has)
>
> We (should) never edit the file-in-the-filesystem -- we only edit the definitions and then use MAKEFILE and friends to store those back in a file-in-the-filesystem (basically a source-code database)
>
> -- Nick
>
>
>
>>
>> On Nov 24, 2025, at 14:09, Matt Heffron <matthef...@gmail.com> wrote:
>>
>> SEdit edits S-EXPRs not files.
>>
>> Editing files is just something that it isn't designed to do.
>>
>> Sent via the Samsung Galaxy S22+ 5G, an AT&T 5G smartphone
>> Get Outlook for AndroidFrom: lisp...@googlegroups.com <lisp...@googlegroups.com> on behalf of pixel...@gmail.com <pixel...@gmail.com>
>> Sent: Monday, November 24, 2025 1:39:56 PM
>> To: Medley Interlisp core <lisp...@googlegroups.com>
>> Subject: Revisiting loading a LISP file into SEdit.
>> So I'm attempting to load an entire ATAN2TEST.LISP for editing into SEdit and I get the following error. Prior my process was to manually FILESLOAD into an Exec then call ED(<func>) on the functions as I wanted to update them. I'm trying to recall if I've missed any details from our discussion.
>>
>> I guess my question is, what is the correct method?
>> I also tried ED(<myfile>) in various forms to no success.
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/lispcore/a30007e0-46da-4107-86f8-bb47e41c4b8fn%40googlegroups.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/lispcore/CO1PR05MB8540E1FAAAC340EE1F64EB2FA1D0A%40CO1PR05MB8540.namprd05.prod.outlook.com.
>
>
> --
> You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/lispcore/18652a59-ca69-48c9-870b-974d691f7f2fn%40googlegroups.com.


Nick Briggs

unread,
Nov 24, 2025, 6:01:45 PM (9 days ago) Nov 24
to pixel...@gmail.com, Lisp Core
Yes, that's how I use it.  If you add a new function (variable, ...), you can always add it to the fileCOMS you've got open in SEdit -- often easier than using (ADDTOFILE ...)

If you call (FILES?) it'll ask you about any functions (and other things with a file package type, but not variables that you've only done SETQ on at the top level) that aren't included in a file (note I'm using "file" here as shorthand for the fileCOMS of some file) and if you want to include them either on an existing file or a new one.   It will also tell you if there are things that need to be "dumped" (i.e., written out to the external file system)

(CLEANUP) will also ask you if there are things that are not on any file, but will then write out any files that need to be dumped and will compile them as well, and, if you ask it to, load the compiled definitions back (moving the source for functions to the EXPR property)

-- Nick

Herb Jellinek

unread,
Nov 24, 2025, 6:16:24 PM (9 days ago) Nov 24
to pixel...@gmail.com, Medley Interlisp core
You can keep the fileCOMS SEdit window open and detach the exec by typing ctrl-X in that SEdit.

The other day Matt told me about the MANAGER lispusers package, which lets you open a menu of your managed files so you can operate on them.  I've just started using it.

Below I've selected HTMLSTREAM, then slid over to its FILEVARS.  Selecting that produced a list of the constituent COMS variables in
HTMLSTREAM - there's only one, HTMLSTREAMCOMS.  That opens a new window....

I click on the
HTMLSTREAMCOMS item in the new window and select Edit to open SEdit on the HTMLSTREAMCOMS variable.  Maybe I'll like this workflow better than my old way of keeping a file's COMS open all the time.





                Herb

pixel...@gmail.com

unread,
Nov 24, 2025, 7:17:36 PM (8 days ago) Nov 24
to Medley Interlisp core
Thanks all, this should be better than my prior process.

The Manager package is very nice too (just got it loaded - tinkering)
That's the kind of thing that improves discoverability.

Screenshot_20251124_171425.png

Matt Heffron

unread,
Nov 24, 2025, 8:54:59 PM (8 days ago) Nov 24
to pixel...@gmail.com, Medley Interlisp core
As I mentioned last Wednesday, the MANAGER lispusers package makes this all VERY easy! You wouldn't need to keep the fileCOMS open in SEDIT.

(There ARE a few times when it's appropriate to edit the COMS, but MANAGER handles most of the "regular" cases.)

Matt

Sent via the Samsung Galaxy S22+ 5G, an AT&T 5G smartphone
Get Outlook for Android

Sent: Monday, November 24, 2025 2:46:28 PM

To: Medley Interlisp core <lisp...@googlegroups.com>
Subject: Re: Revisiting loading a LISP file into SEdit.
 

Paolo Amoroso

unread,
Nov 25, 2025, 2:32:21 AM (8 days ago) Nov 25
to pixel...@gmail.com, Medley Interlisp core
A quick way to edit the fileCOMS is to call (DC file).




--

Matt Heffron

unread,
Nov 25, 2025, 1:13:54 PM (8 days ago) Nov 25
to Medley Interlisp core
I probably should have read ALL of the messages in this thread (esp. Herb's) before bothering to post this.

Opening the COMS in SEdit just to then edit other items seems inefficient since MANAGER presents menus for most FilePackage types (e.g., FNS, FUNCTIONS, VARS, PROPS, FILE-ENVIRONMENTS). 

Larry Masinter

unread,
Nov 25, 2025, 1:29:15 PM (8 days ago) Nov 25
to Paolo Amoroso, pixel...@gmail.com, Medley Interlisp core
ED(name) uses TYPESOF(name) and prompts for which definition you want to edit if there is more than one. No need to supply the second argument to ED.



I would like to de-emphasize the other two-letter functions which are hard to remember.




Larry Masinter

unread,
Nov 25, 2025, 3:55:54 PM (8 days ago) Nov 25
to Nick Briggs, pixel...@gmail.com, Lisp Core
If you call (FILES?) it'll ask you about any functions (and other things with a file package type, but not variables that you've only done SETQ on at the top level) 
 for defining things the file package will pickup, you can use CL:DEFVAR, CL:DEFPARAMETER, etc. for defining a VARIABLES representation. But after the fact, after you've typed the SETQ, if you realize you wanted to create a VARS initialization, you can use the "REMEMBER" command.

2/41_ (SETQ XXX (LIST 1 2 3)
(1 2 3)
2/42_ REMEMBER
  -> (SETQ XXX (LIST 1 2 3)
2/43_ FILES?)
  the expressions: (SETQ XXX (LIST 1 2 3))
... to be dumped. want to say where the above go  ? yes
(expressions)
(SETQ XXX (LIST 1 2 3)).  Filename: FOO
create new file FOO ? Yes
2/44_ FOOCOMS
((VARS (XXX (LIST 1 2 3))))





--
You received this message because you are subscribed to the Google Groups "Medley Interlisp core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lispcore+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages