Skip to content

Conversation

@rmkaplan
Copy link
Contributor

This addresses the issues described in #2289 .

-- The \CORE.DIRECTORYNAMEP in COREIO uses FILENAMEFIELD to extract the directory field for comparison

-- COPYCHARS in FILEIO assumes that ANY EOL convention on the source file matches whatever is specified for the destination, so COPYCHARS reverts to COPYBYTES. (ANY as the default on input was something that was introduced after another discussion some time ago #345 ).

-- HARDCOPY has had a lot of cleanup, including removing redundancy and unused code, eliminating special case for PRESS and INTERPRESS. The hardcopydisplaystream still needs a lot of clean up--not sure that it ever worked. Not sure it was ever documented.

I have tested COPYFILE to {LPT} of both Tedit files and PDF files, and also doing the Hardcopy to a printer directly from Tedit.

@pamoroso
Copy link
Contributor

I tested on Linux Mint 22.1 Cinnamon and I still get the same error when printing from both TEdit and COPYFILE.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@pamoroso
Copy link
Contributor

With the call (COPYFILE 'BITMAPFNS.TEDIT '{LPT}foo) I get this command string:

7_: ?=
  Cmd = "command -v ps2pdf"
&OPTIONAL
  Output = #<IO Nodircore Stream/127,131000>

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@pamoroso
Copy link
Contributor

Here's the command string for the second call:

7_: ?=
  Cmd = "lpr -Pfoo  -JMedley\ Output  -r -s  /tmp/medleyprint.17876778821"
&OPTIONAL
  Output = {WINDOW}#156,167570

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@pamoroso
Copy link
Contributor

Calling (COPYFILE 'BITMAPFNS.TEDIT '{LPT}) yields the error:

DEFAULTPRINTINGHOST and HOST are NIL; don't know where to print
{LPT1}.;1
Stream not open: {LPT1}.;1

This is the backtrace:

14_: BTV
   MESS1 
"DEFAULTPRINTINGHOST and HOST arg are NIL; don't know where to print "
   MESS2 {LPT}.;1
   NOBREAK NIL
ERROR
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   FULLFILE {LPT}.;1
   STRM #<Input Stream on {LPT}.;1/146,37000>
   FILETYPE TEDIT
   PRINTERTYPE NIL
   PFILE #<Input Stream on {LPT}.;1/146,37000>
SI::*UNWIND-PROTECT*
   FILE #<Input Stream on {LPT}.;1/146,37000>
   HOST NIL
   PRINTOPTIONS (DELETE T HEADING T)
   LISPXHIST ((&) (12 "" . "_ ") "<not yet evaluated>" 
*HISTORY* (REDO 6) NIL)
   SI::*RESETFORMS* ((& NIL))
   RESETSTATE NIL
SEND.FILE.TO.PRINTER
   STREAM #<Input Stream on {LPT}.;1/146,37000>
   SDEV #<FDev LPT/172,15000>
   PRINTOPTIONS NIL
PRINTERDEVICE.CLOSEFN
\CLOSEFILE
CLOSEF
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
SI::*UNWIND-PROTECT*
   FROMFILE BITMAPFNS.TEDIT
   TOFILE {LPT}
   LISPXHIST ((&) (12 "" . "_ ") "<not yet evaluated>" 
*HISTORY* (REDO 6) NIL)
   SI::*RESETFORMS* ((& 
#<Input Stream on {LPT}.;1/146,37000>) (& 
#<Closed Stream on {DSK}<home>paolo>medley>medley>lispusers>BITMAPFNS.TEDIT;1/146,37200>))
   RESETSTATE NIL
COPYFILE
   *FORM* (COPYFILE (QUOTE BITMAPFNS.TEDIT) (QUOTE {LPT}
))
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* COPYFILE
\EVALFORM
FAULTEVAL
   *FORM* (UNDOABLY (COPYFILE & &))
\EVALFORM
   \INTERNAL NIL
EVAL
EVAL-INPUT
   RETRYFLAG NIL
   HELPCLOCK 10338
DO-EVENT
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   LISPXHIST ((&) (12 "" . "_ ") "<not yet evaluated>" 
*HISTORY* (REDO 6) NIL)
   HELPCLOCK 0
XCL::EXECA0001A0002
   *CURRENT-EVENT* ((&) (12 "" . "_ ") 
"<not yet evaluated>" *HISTORY* (REDO 6) NIL)
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
XCL::EXECA0001
\PROGV
   XCL::TOP-LEVEL-P T
   XCL::WINDOW {WINDOW}#156,167664
   XCL::TITLE-SUPPLIED NIL
   XCL::TITLE NIL
   *THIS-EXEC-COMMANDS* (#<Hash-Table @ 166,33666>)
   XCL::ENVIRONMENT NIL
   XCL::PROMPT NIL
   XCL::FN EVAL-INPUT
   XCL::PROFILE INTERLISP
   *EXEC-ID* ""
   XCL::PROFILE-CACHE (XCL::*PROFILE-NAME* "IL" 
XCL:*EVAL-FUNCTION* EVAL *PACKAGE* #<Package INTERLISP> 
*READTABLE* #<ReadTable INTERLISP/174,54714> 
XCL:*EXEC-PROMPT* "_ " --)
EXEC
\PROC.REPEATEDLYEVALQT
   *FORM* (\PROC.REPEATEDLYEVALQT)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \PROC.REPEATEDLYEVALQT
\EVALFORM
   %#FORM# (\PROC.REPEATEDLYEVALQT)
   *CURRENT-PROCESS* #<Process EXEC/174,11204>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 20
   \LINEBUF.OFD #<IO Linebuffer Stream/167,125600>
   *READTABLE* #<ReadTable INTERLISP/174,54714>
   \PRIMTERMTABLE {TERMTABLEP}#174,47740
   \PRIMTERMSA {CHARTABLE}#174,50000
   TtyDisplayStream #<Output Display Stream/174,55000>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/167,123600>
   *STANDARD-OUTPUT* #<Output Display Stream/167,123600>
   *STANDARD-INPUT* #<IO Linebuffer Stream/167,125600>
\MAKE.PROCESS0
T

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@pamoroso
Copy link
Contributor

What value should I set DEFAULTPRINTINGHOST to? "{LPT}"?

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 12, 2025 via email

@pamoroso
Copy link
Contributor

I set DEFAULTPRINTINGHOST to the empty string but I still get the no default destination error.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 13, 2025 via email

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Sep 13, 2025 via email

@pamoroso
Copy link
Contributor

Here is the information for completeness.

DEFAULTPRINTINGHOST = NIL: Meta-P > Send to a printer provides only the option Other....

DEFAULTPRINTINGHOST = "": Meta-P > Send to a printer provides the options (Default printer) and Other....

@nbriggs
Copy link
Contributor

nbriggs commented Sep 13, 2025

DEFAULTPRINTINGHOST can be a list of printer names, there is a list of printer types and properties, the unixprint code should be registering a name or names that can be used with the lpr -P option for named printers, or with the empty string it should leave off the -P to get the system default Unix printer. If things aren’t getting registered properly then things won’t work smoothly

@masinter masinter marked this pull request as draft October 20, 2025 17:10
@pamoroso
Copy link
Contributor

pamoroso commented Dec 5, 2025

I updated to commit 5dc4ca2 and the issues described earlier still persist.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 5, 2025

@pamoroso, issues still concerning the DEFAULTPRINTINGHOST ?

@pamoroso
Copy link
Contributor

pamoroso commented Dec 5, 2025

The issues concern the errors I get when printing. (COPYFILE 'FOO.TEDIT '{LPT}) yields this error in the prompt window:

Sending output to Unix printerT...lpr: Error - The printer or class does not exist
done

From TEdit, Meta-P > Send to a printer > Other... (only option) > {LPT} yields this break window with the error:

TYPE-MISMATCH
In CL::%%NOT-NONCOMPLEX-NUMBER-ERROR:
{IMAGEOBJ}#131,71762 is not a NUMBER.
lpterr

The backtrace:

TEdit/6(debug)BTV
CL::%%NOT-NONCOMPLEX-NUMBER-ERROR
\SLOWLRSH8
   STREAM 
#<Output Stream on {UNIX}<tmp>medleyprint.17949204671/
161,103600>
   CHARCODE {IMAGEOBJ}#131,71762
\MCCSOUTCHAR
   STREAM 
#<Output Stream on {UNIX}<tmp>medleyprint.17949204671/
161,103600>
   CODE {IMAGEOBJ}#131,71762
   A0134 \MCCSOUTCHAR
\OUTCHAR
   CNT 1265
COPYCHARS
SI::*UNWIND-PROTECT*
SI::*UNWIND-PROTECT*
   HOST LPT
   FILE #<IO Tedit Stream/161,17100>
   PRINTOPTIONS (HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1 HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1 %#COPIES 1 
DOCUMENTNAME #<IO Tedit Stream/161,17100>)
   SI::*CATCH-RETURN-TO* NIL
   PRINTER LPT
   COPIES 1
   NAME "Medley Output"
   NSIDES NIL
   TYPE PDF
   SI::*CATCH-RETURN-PC* 489
   A0242 (
#<Output Stream on {UNIX}<tmp>medleyprint.17949204671/
161,103600> "/tmp/medleyprint.17949204671")
   tmpstream 
#<Output Stream on {UNIX}<tmp>medleyprint.17949204671/
161,103600>
   tmpname "/tmp/medleyprint.17949204671"
   out 
#<Output Stream on {UNIX}<tmp>medleyprint.17949204671/
161,103600>
   A0244 T
UnixPrint
   HOST LPT
   FILE #<IO Tedit Stream/161,17100>
   PRINTOPTIONS (HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1 HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1 %#COPIES 1 
DOCUMENTNAME #<IO Tedit Stream/161,17100>)
POSTSCRIPTSEND
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   IMAGETYPE TEDIT
   PRINTERTYPE PDF
   SENDFN POSTSCRIPTSEND
   HEADING {DSK}<home>paolo>il>BITMAPFNS.TEDIT;1
   PRINTER LPT
   CONVERTED NIL
SI::*UNWIND-PROTECT*
   FILE #<IO Tedit Stream/161,17100>
   HOST {LPT}
   PRINTOPTIONS (HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1)
   LISPXHIST NIL
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
SEND.FILE.TO.PRINTER
   TSTREAM #<IO Tedit Stream/161,17100>
   W {WINDOW}#121,45000
   FILE&TYPE NIL
\TEDIT.PRINT.MENU
   TSTREAM #<IO Tedit Stream/161,17100>
   CHARCODE 336
   TEXTOBJ {TEXTOBJ}#121,37600
   FN \TEDIT.PRINT.MENU
\TEDIT.COMMAND.FUNCTION?
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   CHARCODE 336
   TCH NIL
   FN NIL
\TEDIT.COMMAND.LOOPA0001A0002
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
SI::*UNWIND-PROTECT*
   TSTREAM #<IO Tedit Stream/161,17100>
   TEXTOBJ {TEXTOBJ}#121,37600
   LISPXHIST NIL
   SI::*RESETFORMS* ((&))
   RESETSTATE NIL
\TEDIT.COMMAND.LOOP
   TSTREAM #<IO Tedit Stream/161,17100>
   WINDOW {WINDOW}#121,45000
   UNSPAWNED NIL
   TEXTOBJ {TEXTOBJ}#121,37600
\TEDIT1
   *FORM* (\TEDIT1 (QUOTE #<IO Tedit Stream/161,17100>) 
{WINDOW}#121,45000 NIL)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \TEDIT1
\EVALFORM
   %#FORM# (\TEDIT1 (QUOTE #<IO Tedit Stream/161,17100>)
 {WINDOW}#121,45000 NIL)
   *CURRENT-PROCESS* #<Process TEdit/173,115000>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 13
   \LINEBUF.OFD #<IO Linebuffer Stream/161,44300>
   *READTABLE* #<ReadTable INTERLISP/173,151714>
   \PRIMTERMTABLE {TERMTABLEP}#173,144740
   \PRIMTERMSA {CHARTABLE}#173,145000
   TtyDisplayStream #<Output Display Stream/161,103700>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/161,44100>
   *STANDARD-OUTPUT* #<Output Display Stream/161,44100>
   *STANDARD-INPUT* #<IO Linebuffer Stream/161,44300>
\MAKE.PROCESS0
T

@pamoroso
Copy link
Contributor

pamoroso commented Dec 5, 2025

I forgot to mention DEFAULTPRINTINGHOST is NIL by default on my setup.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 6, 2025

A number of changes:

  • DEFAULTPRINTINGHOST = NIL is like "", means use the system default printer.
  • Tried to fix some basic confusions in the original design, where there was an ambiguity in how to interpret a DEFAULTPRINTINGHOST of the form (printertype printername).
  • Note that it has never been possible to (COPYFILE textstream '{LPT}). Venue erred in different ways, but the problem is that this would treat the textstream as a sequence of characters, ignoring formatting, and tripping over image objects and maybe some other things. The conversion of a tedit stream for printing only to a file that the stream has been written onto. The COPYFILE executes in advance of the conversion, so has already done the damage.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

With commit cfee491 and DEFAULTPRINTINGHOST set to NIL the TEdit command Meta-P > Send to a printer > (Default printer) yields this error in the prompt window:

Sending output to Unix printer  lpr: Error - no default destination.

The command Meta-P > Send to a printer > Other... > {LPT} yields the same error. I can print from other Linux programs (the single printer has two entries in the system list of printers) but doing it from the shell fails with this error:

paolo@lispmachine:~/il$ lpr BITMAPFNS.PDF 
lpr: Error - No default destination.

So it's likely a Linux configuration issue more than a Medley one.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

I set the right printer entry as default (don't ask why CUPS duplicates it...) and I was finally able to print to the default printer from TEdit, with both the default printer option and {LPT}. The other printer entry doesn't work and print jobs sent to it are silently ignored.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 6, 2025

If I break ShellCommand before doing the meta-p, I always see that

Screenshot 2025-12-06 at 9 35 50 AM

This is with DEFAULTPRINTINGHOST set to NIL or "" and whether or not I click (Default printer) or click Other and then hit Enter.

Is this what you see?

(I don't know what the -s option does, the Mac man page doesn't have it.)

I see that I introduced another glitch in trying to deal with a NIL DEFAULTPRINTINGHOST, I misunderstood that an empty return from Other means abort and not default. I'll do an update that distinguishes Other and Default.

BTW, the (Default printer) item is now always there, it used to be only if the variable was not NIL.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

I can't find lpr in the stack frames I get when breaking ShellCommand and then Meta-P > Send to a printer > (Default printer) with DEFAULTPRINTINGHOST as NIL:

frame1 frame2 frame3 frame4

Are these the correct steps? By the way, on Linux lpr has no option -s.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 6, 2025

For whatever reason, I don't see all those PDFCONVERT calls to ShellCommand when I break it. To be more specific, unbreakthose and then
(BREAK (ShellCommand IN UnixPrint)
You shouldn't see lpr on the stack, you should see it in the CMD string that will be passed to the shell.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

Never mind, I managed to get the correct frame:

shellcommand

These are all the options of lpr and -s is missing:

paolo@lispmachine:~$ lpr --help
Usage: lpr [options] [file(s)]
Options:
-# num-copies           Specify the number of copies to print
-E                      Encrypt the connection to the server
-H server[:port]        Connect to the named server and port
-m                      Send an email notification when the job completes
-o option[=value]       Specify a printer-specific option
-o job-sheets=standard  Print a banner page with the job
-o media=size           Specify the media size to use
-o number-up=N          Specify that input pages should be printed N-up (1, 2, 4, 6, 9, and 16 are supported)
-o orientation-requested=N
                        Specify portrait (3) or landscape (4) orientation
-o print-quality=N      Specify the print quality - draft (3), normal (4), or best (5)
-o sides=one-sided      Specify 1-sided printing
-o sides=two-sided-long-edge
                        Specify 2-sided portrait printing
-o sides=two-sided-short-edge
                        Specify 2-sided landscape printing
-P destination          Specify the destination
-q                      Specify the job should be held for printing
-r                      Remove the file(s) after submission
-T title                Specify the job title
-U username             Specify the username to use for authentication

@nbriggs
Copy link
Contributor

nbriggs commented Dec 6, 2025

What does (UnixPrintCommand "myprinter" 2 "jobname" "/tmp/foo") produce as a string. That's the command that it should subsequently pass to the shell to get something printed. UnixPrintCommand is a hook function you're supposed to redefine in your personal init file if you're running on a system that doesn't have the BSD-like lpr options (and Linux doesn't). See UNIXPRINT.TEDIT.

From the FreeBSD lpr man page:

     -s      Use symbolic links.  Usually files are copied to the spool
             directory.  The -s option will use symlink(2) to link data files
             rather than trying to copy them so large files can be printed.
             This means the files should not be modified or removed until they
             have been printed.

@nbriggs
Copy link
Contributor

nbriggs commented Dec 6, 2025

Here's the BSD documentation for lpr
lpr.pdf

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

On my Linux box (UnixPrintCommand "myprinter" 2 "jobname" "/tmp/foo") produces:

4_ (UnixPrintCommand "myprinter" 2 "jobname" "/tmp/foo")
"lpr -Pmyprinter -#2  -Jjobname  -r -s  /tmp/foo"

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 6, 2025

That's the default behavior for all environements, what you get if you don't do any local tailoring.

@nbriggs
Copy link
Contributor

nbriggs commented Dec 6, 2025

Yes. If you want to uselpr on a Linux box that doesn't support -s, or has different syntax for options like copies, or you want to make it always print duplex, or N-up, then putting a customized copy of UnixPrintCommand in your personal init file is the way to go.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

According to the documentation my lpr supports all the switches of UnixPrintCommand except for -s, so it may be enough to set UNIXPRINTSWITCHES to " -r ".

@nbriggs
Copy link
Contributor

nbriggs commented Dec 6, 2025

If that's the only thing you want to change, then yes, that'll do it. Since Linux is using CUPS for printing, I think you can either set a default printer with the PRINTER environment variable in your shell's rc file, or use lpoption -d printername (check with your local man pages), then with DEFAULTPRINTINGHOST NIL (or empty) it'll do the right thing.

…INTINGHOST is NIL

Restores the Other - abort behavior.
@pamoroso
Copy link
Contributor

pamoroso commented Dec 6, 2025

I only set UNIXPRINTSWITCHES to " -r " as I selected the default printer with the relevant system GUI tool.

I prefer not to use other tools as for reasons I still don't understand CUPS create a duplicate entry for my printer. I've checked that the default printer works with Medley and DEFAULTPRINTINGHOST set to NIL.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 7, 2025

Is it ever harmful to have -s as a default switch? Is it ever helpful?

@pamoroso
Copy link
Contributor

pamoroso commented Dec 7, 2025

I updated to commit 496b88a. When printing from TEdit with Meta-P > Send to a printer > (Default printer) and DEFAULTPRINTINGHOST set to NIL I get a break window with the error:

INTERLISP-ERROR
In ERROR:
Can't find printer for 
#<IO Tedit Stream/161,20500>
default-printer

The backtrace:

TEdit/6(debug)BTV
   MESS1 "Can't find printer for "
   MESS2 #<IO Tedit Stream/161,20500>
   NOBREAK NIL
ERROR
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   IMAGETYPE TEDIT
   PRINTERS NIL
   PRINTERTYPE NIL
   SENDFN NIL
   HEADING NIL
   PRINTER NIL
   CONVERTED NIL
SI::*UNWIND-PROTECT*
   FILE #<IO Tedit Stream/161,20500>
   HOST :DEFAULT
   PRINTOPTIONS (HEADING 
{DSK}<home>paolo>il>BITMAPFNS.TEDIT;1)
   LISPXHIST NIL
   SI::*RESETFORMS* NIL
   RESETSTATE NIL
SEND.FILE.TO.PRINTER
   TSTREAM #<IO Tedit Stream/161,20500>
   W {WINDOW}#121,47000
   FILE&TYPE NIL
\TEDIT.PRINT.MENU
   TSTREAM #<IO Tedit Stream/161,20500>
   CHARCODE 336
   TEXTOBJ {TEXTOBJ}#121,41600
   FN \TEDIT.PRINT.MENU
\TEDIT.COMMAND.FUNCTION?
   SI::*DUMMY-FOR-CATCH* T
   SI::*CATCH-RETURN-FROM* (&)
   CHARCODE 336
   TCH NIL
   FN NIL
\TEDIT.COMMAND.LOOPA0001A0002
   SI::*CLEANUP-FORMS* SI::RESETUNWIND
   SI::NLSETQ-VALUE NIL
   *PROCEED-CASES* (&)
   SI::*NLSETQFLAG* NIL
SI::*UNWIND-PROTECT*
   TSTREAM #<IO Tedit Stream/161,20500>
   TEXTOBJ {TEXTOBJ}#121,41600
   LISPXHIST NIL
   SI::*RESETFORMS* ((&))
   RESETSTATE NIL
\TEDIT.COMMAND.LOOP
   TSTREAM #<IO Tedit Stream/161,20500>
   WINDOW {WINDOW}#121,47000
   UNSPAWNED NIL
   TEXTOBJ {TEXTOBJ}#121,41600
\TEDIT1
   *FORM* (\TEDIT1 (QUOTE #<IO Tedit Stream/161,20500>) 
{WINDOW}#121,47000 NIL)
   *ARGVAL* NIL
   *TAIL* NIL
   *FN* \TEDIT1
\EVALFORM
   %#FORM# (\TEDIT1 (QUOTE #<IO Tedit Stream/161,20500>)
 {WINDOW}#121,47000 NIL)
   *CURRENT-PROCESS* #<Process TEdit/173,117000>
   HELPFLAG BREAK!
   \CURRENTDISPLAYLINE 0
   \#DISPLAYLINES 13
   \LINEBUF.OFD #<IO Linebuffer Stream/161,45600>
   *READTABLE* #<ReadTable INTERLISP/173,153714>
   \PRIMTERMTABLE {TERMTABLEP}#173,146740
   \PRIMTERMSA {CHARTABLE}#173,147000
   TtyDisplayStream #<Output Display Stream/161,102000>
   SI::*RESETFORMS* NIL
   \INTERRUPTABLE T
   \TTYWINDOW NIL
   READBUF NIL
   \TERM.OFD #<Output Display Stream/161,45300>
   *STANDARD-OUTPUT* #<Output Display Stream/161,45300>
   *STANDARD-INPUT* #<IO Linebuffer Stream/161,45600>
\MAKE.PROCESS0
T

However, the issue may be related more to my setup than Medley. I need to do some troubleshooting.

Passing -s to lpr seems to have no adverse effects on my Linux box. Print jobs are routed correctly and with no errors or warnings:

paolo@lispmachine:~/il$ lpr -s BITMAPFNS.PDF 
paolo@lispmachine:~/il$ 

@masinter
Copy link
Member

masinter commented Dec 7, 2025

Stepping back a little: Online users won't want any of the printer integrations being offered, because there is no connectdion to the user's local printer. The best we can do is to make a kind of "printer" that actually opens the result of "printing" as HTML or PNG or SVG and open it up in the browser being used to connect to online.

I think this is likely to be true for uers who don't have or rarely use the printer to generate "hard" copy on paper.

In fact, I would argue that the trend to not actually print anything would be the common situation for modern users.

I also think that integrating with the clipboard would be appropriate -- the menu that currently is labeled "Hardcopy" should copy to the clipboard (instead of. ro in addition to) printing per se.

@nbriggs
Copy link
Contributor

nbriggs commented Dec 7, 2025

Is it ever harmful to have -s as a default switch? Is it ever helpful?

It looks as though most (all?) lpr implementations ignore it if they're not going to support it, so at least not harmful. If they implement it (as some appear to do) then it saves copying the print file one more time, so marginally helpful.

@rmkaplan
Copy link
Contributor Author

rmkaplan commented Dec 7, 2025

SEND.FILE.TO.PRINTER wasn't recognizing the value :DEFAULT from the menus that now distinguishes NIL (abort) from the default. Try it again.

@pamoroso
Copy link
Contributor

pamoroso commented Dec 7, 2025

Commit 8b58ef9 resolved the issue and now I can print with no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants