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

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.

3 participants