1
0
mirror of synced 2026-01-12 00:42:56 +00:00
Interlisp.medley/lispusers/PSEUDOHOSTS.TEDIT
rmkaplan fe90ac5f9f
Rmk19 (#664)
* PSEUDOHOSTS: Overlay a file system at the end of a path in another file system

New package, please look through it.

* REGIONMANAGER:  added RELCREATEPOSITION, allow for arguments to be spread

If the WIDTH argument looks like a list of arguments, the arguments are spread out.  Means that a relative region can be passed through intermediate functions.

* EXAMINEDEFS:  More control over regions and windows

Examination windows are returned so that callers can manipulate them

* TEDIT-PF-SEE:  tf respects reader environment and bold faces of DEFUN and DEFMACRO names

* COMPAREDIRECTORIES:  refactored for more flexibility and easier maintenance

Also, based on SPY, made more internal operations work on streams that are located and created once, rather than on file

Added CDMERGE to merge CDVALUES for different subdirectories, to permit scrolling of all differences in a single browser window

* COMPARESOURCES:  Region for CS browser is passed through, window is returned

Also tried to eliminate mismatching of simple edit timestamps

* COMPARETEXT: Files can be input streams, region is passed in, window is returned

* COMPAREDIRECTORIES again:  Fixed a promptwindow bug

* GITFNS:  New package for comparing and copying back and forth from My Medley to the git clone

* REGIONMANAGER:  Added CLOSEWITH and MOVEWITh

Primitives for building hierarchically dependent window clusters

* PSEUDOHOSTS:  Added PSEUDOHOSTNAME, hierarchical hosts #663

For hierarchical hosts (hosts whose prefixes are extensions of the prefixes of other pseudohosts), always the pseudofilename is always the shortest one.  See #663 for more details

* EXAMINEDEFS:  Fix prettyprint of non-function expressions

* GITFNS, Comparison files:  Use CLOSEWITH and MOVEWITH abstractions for window hierarchies
2022-01-31 09:51:50 -08:00

40 lines
6.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Medley PSEUDOHOSTS2
4
1
PSEUDOHOSTS
1
4
By Ron Kaplan
This document was created in January 2022.
A pseudohost identifies the root of a file system that exists as a subdirectory of another pre-existing file system. This gives a shorthand way of operating on a file in the subdirectory of a particular project without having to specify in the name of that file the entire path to its location in a larger file system. For example, suppose that the variable MEDLEYDIR contains the path from {DSK} to the subdirectory that contains all Medley system files (e.g. {DSK}<Users>kaplan>Local>medley>). If not connected to that subdirectory, then the file COREIO, say, would have to be reference as
{DSK}<Users>kaplan>Local>medley>sources>COREIO.
If MED is defined as a pseudohost with MEDLEYDIR as its prefix, then that file can also be identified more succinctly as {MED}<sources>COREIO.
This package implements pseudohost file devices that allow files to be specified and manipulated in this way. The function PSEUDOHOST defines a new pseudohost whose files coincide with the files at the end of a prefix directory path:
(PSEUDOHOST HOST PREFIX) [Function]
For the Medley example, executing (PSEUDOHOST 'MED MEDLEYDIR) will set up MED as a (pseudo) host name that can be used to reference Medley system files. (The full filenames can also be used--the pseudohost just provides a systematic abbrevation.) If PSEUDOHOST is called with the host of a previous invocation but a different prefix, the new prefix replaces the old. If the prefix is NIL, the pseudohost is removed. If HOST is a list and PREFIX is NIL, HOST is interpreted as a (host prefix) pair.
The target host defaults to DSK if PREFIX does not have an explicit host.
When PSEUDOHOSTS is loaded, it executes
(PSEUDOHOST 'LI LOGINHOSTDIR)
so that files in the login directory can always be referenced succinctly with host LI, even while connected to another directory.
(PSEUDOHOSTS) [Function]
Returns the (host prefix) pairs of all currently defined pseudohosts.
(PSEUDOHOSTP HOST) [Function]
Returns the (host prefix) pair for a particular pseudohost, NIL if HOST is not a pseudohost.
(TARGETHOST HOST) [Function]
Returns the target host of a particular pseudohost, NIL if HOST is not a pseudohost.
(TRUEFILENAME FILE) [Function]
Returns the name of FILE in its true device, essentially replacing FILE's host by its prefix if it is a pseudohost. Returns FILE (possibly extended with the prefix of the connected directory) if its host is not a pseudohost. FILE may be a stream as well as a name.
(PSEUDOFILENAME FILE) [Function]
Returns the name of FILE in its pseudo device, if any, essentially replacing FILE's prefix by the hostname of a pseudodevice for that prefix. Returns FILE (possibly extended with the prefix of the connected directory) if it does not match a pseudohost prefix. FILE may be a stream as well as a name.
(LIST ((PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE Letter FOLIOINFO (ARABIC)) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))
4<01><00>4<01> <01>4<01><01>4<01><00>4<01><01>4<01><01>.<01>.<00><00>8.<00><00>8J<01><01> PAGEHEADING RUNNINGHEAD
TIMESROMAN$TERMINALMODERN MODERN

  HRULE.GETFN  HRULE.GETFNMODERN
  HRULE.GETFNMODERN
  HRULE.GETFNMODERN   HRULE.GETFNMODERN +g A 9&3! I<00> "g)J 
S-
 F<4+<00>$!5=k$ l<00>z<EFBFBD>