Replies: 3 comments
-
Currently, TEdit knows a tiny little bit about Lisp source files: if LISPSOURCEFILEP is true of a file, it uses the readtable of the file to determine what the break and separator characters are, so an atom is treated as a unit for “word" selection. That is, it extends the selection forward and backward until it reaches those boundary characters.
if we had a function (call it \TEDIT.SEXPR.START) that reads backwards from a given point in a file to the beginning of the next enclosing Sexpression (i.e. parens, brackets, but taking account of escapes and other special cases), then it should be easy to find the end of the expression that begins at that point (a function \TEDIT.SEXPR.END, maybe just a simple call to SKREAD.
With that we could implement an SEXPR selection type whereby dragging with the right button will extend from one S-expression to the next enclosing one, just like word, line, and paragraph selections extend to the beginning/end of the next enclosing unit of that type.
I don’t know about the colons, semicolons in other keyboards. But would such an S-expression selection go a useful part of the way.
… On Apr 20, 2024, at 6:08 AM, Paolo Amoroso ***@***.***> wrote:
A first approach is to store the code in pure Common Lisp files you edit with TEdit. This requires no special processing of the source files, which can be directly accessed on both systems.
However, TEdit has some major limitations that make editing Lisp code slow and labor intensive. The editor is not Lisp aware and some crucial keyboard commands don't work such as the arrow keys, but also :,;, and other characters which can't be typed at all on non English keyboards.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
There’s also the Migration Lispusers module: https://github.com/Interlisp/medley/tree/master/lispusers/migration
… On Apr 20, 2024, at 8:08 AM, Paolo Amoroso ***@***.***> wrote:
Suppose you use Common Lisp on Medley to develop a program designed to be portable to and shared with other Common Lisp systems such as SBCL. The program has some common code and some system specific parts. You share the code via a GitHub repo and want the changes carried out on either system to be keept in sync.
What toolchain and workflow would you use on Medley? Would Medley need any changes or new tools to better support such a process? Below are some possible options.
I don't have a specific project in mind but at some point I will, so I'm interested in how to proceed. This is also relevant to porting existing Common Lisp code to Medley and contributing back.
Using pure Common Lisp files
A first approach is to store the code in pure Common Lisp files you edit with TEdit. This requires no special processing of the source files, which can be directly accessed on both systems.
However, TEdit has some major limitations that make editing Lisp code slow and labor intensive. The editor is not Lisp aware and some crucial keyboard commands don't work such as the arrow keys, but also :,;, and other characters which can't be typed at all on non English keyboards.
This assumes SEdit can't save code to pure Common Lisp files, which it apparently can't. And, as far as I know, SEdit can handle only one definer at a time.
Importing and exporting code with TextModules
You may use the File Manager and the residential environment, running TextModules to export Medley-side changes to the other system and import the changes coming from that system.
In addition to committing the symbolic files to the repo, you would likely need to commit the Common Lisp sources generated by TextModules when exporting, or edited on the other system when importing. Aside from the additional complexity, managing two code bases may make things get out of sync.
Other approaches
There are other approaches like editing pure Common Lisp files only on the other system and loading them on Medley for testing and execution. But this greatly complicates editing any changes required on Medley's side and keeping them in sync.
Another idea is to port to Medley some Lisp aware editor written in Common Lisp such as Hemlock or similar. Although this would allow to edit pure Common Lisp files, it's a major project involving a lot of work.
Using only the File Manager
Finally, you may want to just use the File Manager and the residential environment. But I don't see how the code could be made directly usable on the other system.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Treating atoms like units would help but, to be practical, a Lisp aware editor should also automatically indent and format expressions. If I understand correctly the Migration module can export code only from Medley to pure Lisp. This allows other Common Lisp systems to incorporate the changes coming from Medley but not the other way around. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Suppose you use Common Lisp on Medley to develop a program designed to be portable to and shared with other Common Lisp systems such as SBCL. The program has some common code and some system specific parts. You share the code via a GitHub repo and want the changes carried out on either system to be keept in sync.
What toolchain and workflow would you use on Medley? Would Medley need any changes or new tools to better support such a process? Below are some possible options.
I don't have a specific project in mind but at some point I will, so I'm interested in how to proceed. This is also relevant to porting existing Common Lisp code to Medley and contributing back.
Using pure Common Lisp files
A first approach is to store the code in pure Common Lisp files you edit with TEdit. This requires no special processing of the source files, which can be directly accessed on both systems.
However, TEdit has some major limitations that make editing Lisp code slow and labor intensive. The editor is not Lisp aware and some crucial keyboard commands don't work such as the arrow keys, but also
:
,;
, and other characters which can't be typed at all on non English keyboards.This assumes SEdit can't save code to pure Common Lisp files, which it apparently can't. And, as far as I know, SEdit can handle only one definer at a time.
Importing and exporting code with TextModules
You may use the File Manager and the residential environment, running TextModules to export Medley-side changes to the other system and import the changes coming from that system.
In addition to committing the symbolic files to the repo, you would likely need to commit the Common Lisp sources generated by TextModules when exporting, or edited on the other system when importing. Aside from the additional complexity, managing two code bases may make things get out of sync.
Other approaches
There are other approaches like editing pure Common Lisp files only on the other system and loading them on Medley for testing and execution. But this greatly complicates editing any changes required on Medley's side and keeping them in sync.
Another idea is to port to Medley some Lisp aware editor written in Common Lisp such as Hemlock or similar. Although this would allow to edit pure Common Lisp files, it's a major project involving a lot of work.
Using only the File Manager
Finally, you may want to just use the File Manager and the residential environment. But I don't see how the code could be made directly usable on the other system.
Beta Was this translation helpful? Give feedback.
All reactions