Re: printing problems

gfp <[email protected]>
Newsgroups gmane.emacs.help
Message-ID <[email protected]>
gfp <[email protected]> writes:  | Debugger entered--Lisp error: (error 
"Invalid text printer name | ‘prt_06a’ for variable ‘pr-txt-name’") | 
error("Invalid text printer name `%s' for variable `pr-txt-name'" | 
prt_06a) | pr-txt-set-printer(prt_06a) | 
pr-menu-set-txt-title(prt_06a) | pr-txt-name-custom-set(pr-txt-name 
prt_06a) | setopt--set(pr-txt-name prt_06a)
> "prt_06a" is  defined in printing.el 

It's appearing in examples only, as far as I understand.
> init.el: 
>     [...]  (setopt pr-txt-name      'prt_06a) (setopt 
>     pr-txt-printer-alist 
>           '((prt_06a "lpr" nil "prt_06a") 
>             (prt_07c nil   nil "prt_07c") )) 

Given the kind of error you're encountering, I would first try to setopt 
`pr-txt-printer-alist' _before_ setting `pr-txt-name'.  In other words, 
reverse the order of these expressions.

Michael.

Hi Michael,

thanks

I changed the order of both:
(setopt pr-txt-name      'prt_06a)
(setopt pr-ps-name       'lps_06b)

it looks now like this:

(require 'printing)
     (setopt pr-path-alist
	    '((unix      "." "/home/gfp/.guix-profile/bin" ghostview mpage 
PATH)  ;;'((unix      "." "~/bin" ghostview mpage PATH)
	      (ghostview "/home/gfp/.guix-profile/bin/gsview-dir") 
   ;;  (ghostview "$HOME/bin/gsview-dir")
	      (mpage     "/home/gfp/.guix-profile/bin/mpage-dir") 
   ;;  (mpage     "$HOME/bin/mpage-dir")
	      ))
     (setopt pr-txt-printer-alist
           '((prt_06a "lpr" nil "prt_06a")
             (prt_07c nil   nil "prt_07c")
             ))
     (setopt pr-txt-name      'prt_06a)
     (setopt pr-ps-printer-alist
           '((lps_06b "lpr" nil "-P" "lps_06b")
             (lps_07c "lpr" nil nil  "lps_07c")
             (lps_08c nil   nil nil  "lps_08c")
             ))
     (setopt pr-ps-name       'lps_06b)
     (setopt pr-temp-dir      "/tmp/")
     (setopt pr-gv-command    "gv")
     (setopt pr-gs-command    "gs")
     (setopt pr-gs-switches '("-q -dNOPAUSE -I/usr/share/ghostscript/5.10"))
     (setopt pr-gs-device     "uniprint")
     (setopt pr-gs-resolution 300)
     (setopt pr-ps-utility    'mpage)
     (setopt pr-ps-utility-alist
     '((mpage "mpage" nil    "-b%s" "-%d" "-l" "-t" "-T" ">" nil)
       (psnup "psnup" ("-q") "-P%s" "-%d" "-l" nil  nil  " " nil
      (inherits-from: . no-duplex))
       ))
    (setopt pr-setting-database
     '((no-duplex
        nil nil nil
	       (pr-file-duplex . nil)
	       (pr-file-tumble . nil))
	      ))
     (pr-update-menus t)		; update now printer and utility menus


Now I don´t get a backtrace any more, which is good,
but I am getting a warning:

⛔ Warning (emacs): Value ‘((prt_06a "lpr" nil "prt_06a") (prt_07c nil 
nil "prt_07c"))’ does not match type (repeat (list :tag Text Printer 
(symbol :tag Printer Symbol Name) (string :tag Printer Command) (repeat 
:tag Printer Switches (sexp :tag Switch :value )) (choice :menu-tag 
Printer Name :tag Printer Name (const :tag None nil) string)))
⛔ Warning (emacs): Value ‘((lps_06b "lpr" nil "-P" "lps_06b") (lps_07c 
"lpr" nil nil "lps_07c") (lps_08c nil nil nil "lps_08c"))’ does not 
match type (repeat (list :tag PostScript Printer (symbol :tag Printer 
Symbol Name) (string :tag Printer Command) (repeat :tag Printer Switches 
(sexp :tag Switch :value )) (choice :menu-tag Printer Name Switch :tag 
Printer Name Switch (const :tag None nil) string) (choice :menu-tag 
Printer Name :tag Printer Name (const :tag None nil) string) (repeat 
:tag Default Value List :inline t (cons :tag  (choice :menu-tag Variable 
:tag Variable (const :tag Landscape ps-landscape-mode) (const :tag Print 
Header ps-print-header) (const :tag Print Header Frame 
ps-print-header-frame) (const :tag Line Number ps-line-number) (const 
:tag Zebra Stripes ps-zebra-stripes) (const :tag Duplex ps-spool-duplex) 
(const :tag Tumble ps-spool-tumble) (const :tag Upside-Down 
ps-print-upside-down) (const :tag PS File Landscape pr-file-landscape) 
(const :tag PS File Duplex pr-file-duplex) (const :tag PS File Tumble 
pr-file-tumble) (const :tag Auto Region pr-auto-region) (const :tag Auto 
Mode pr-auto-mode) (const :tag Ghostscript Device pr-gs-device) (const 
:tag Ghostscript Resolution pr-gs-resolution) (const :tag inherits-from: 
inherits-from:) (variable :tag Other)) (sexp :tag Value)))))

thanks

Gottfried
OpenPGP_0xAC95367953582A3C.asc (application/pgp-keys, 636 B)
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEaabDLRYJKwYBBAHaRw8BAQdAb7YT561Dj5CV9io77VLLjpOOSCz+xjHVL2Bj
+S/FSUbNGmdmcCAoMjAyNikgPGdmcEBwb3N0ZW8uYXQ+wpMEExYKADsWIQQkU+mE
m7kVmbEo/+eslTZ5U1gqPAUCaabDLQIbAwULCQgHAgIiAgYVCgkICwIEFgIDAQIe
BwIXgAAKCRCslTZ5U1gqPOPkAQDhysdwuz2eJo6kCGuVszxhEw6znPKV14R8a3vn
enCgywD9GulbjLKlGTpx6WyFmZ0bBZI1GVpIVr3qGbyFcAFZZADOOARppsMtEgor
BgEEAZdVAQUBAQdAX5BGmJLZB5B2ioEAy0C0iqgJ0GzUK4IP7gSGE9k/RQIDAQgH
wngEGBYKACAWIQQkU+mEm7kVmbEo/+eslTZ5U1gqPAUCaabDLQIbDAAKCRCslTZ5
U1gqPDixAP4teZj90382b6mB2mZT+KjjZz0opx/rahnOejBcW/+SkgD/StQdLbeZ
DqGFJ0TlGeHGxNB28C1fUE815wapzB6cKg4=
=u+uM
-----END PGP PUBLIC KEY BLOCK-----
OpenPGP_signature.asc (application/pgp-signature, 236 B)
-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQQkU+mEm7kVmbEo/+eslTZ5U1gqPAUCac5ebAUDAAAAAAAKCRCslTZ5U1gqPKtF
AQCPF4qD5+ZiJocV3KXpWZSaFs0mv/F5opG5UNibGdrBzQEAqOvZUsl8uGaWocGnqIcFHbm5+/Dh
Cj3NB++jMuG1pg8=
=OOEB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.