Gnus development mailing list
 help / color / mirror / Atom feed
* Symbol's value as variable is void: lpr-command
@ 2003-01-20  3:42 Vasily Korytov
  2003-01-20  3:46 ` Vasily Korytov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vasily Korytov @ 2003-01-20  3:42 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

I've just updatet Oort from CVS. When (require ...)'ing gnus-load it
stops with the error: Symbol's value as variable is void: lpr-command.
If I define lpr-command, the same is for lpr-switches.

When I define both prior to (require 'gnus-load), it works again.

The problem is in file mailcap.el, in the following strings:

(defvar mailcap-print-command
  (mapconcat 'identity
             (cons lpr-command
                   (if (stringp lpr-switches)
                       (list lpr-switches)
                     lpr-switches))
             " ")
  "Shell command (including switches) used to print Postscript files.")

Currently I can't find the XEmacs equivalent of lpr-command and
lpr-swithes (assuming, there're some), and would suggest checking for
these variables, if they're not bound, setting them to "lpr" and "". Can
anyone suggest a better way?

---Vas

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symbol's value as variable is void: lpr-command
  2003-01-20  3:42 Symbol's value as variable is void: lpr-command Vasily Korytov
@ 2003-01-20  3:46 ` Vasily Korytov
  2003-01-20  5:09 ` Jesper Harder
  2003-01-20 10:32 ` Simon Josefsson
  2 siblings, 0 replies; 6+ messages in thread
From: Vasily Korytov @ 2003-01-20  3:46 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

>>>>> "VK" == Vasily Korytov writes:

 VK> I've just updatet Oort from CVS. When (require ...)'ing gnus-load it
 VK> stops with the error: Symbol's value as variable is void: lpr-command.
 VK> If I define lpr-command, the same is for lpr-switches.

Forgot to mention:

1. Of course, this leads Gnus to fail with byte-compiling.

2. It's XEmacs 21.4.12 here.

---Vas

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symbol's value as variable is void: lpr-command
  2003-01-20  3:42 Symbol's value as variable is void: lpr-command Vasily Korytov
  2003-01-20  3:46 ` Vasily Korytov
@ 2003-01-20  5:09 ` Jesper Harder
  2003-01-20  6:51   ` Vasily Korytov
  2003-01-20 10:32 ` Simon Josefsson
  2 siblings, 1 reply; 6+ messages in thread
From: Jesper Harder @ 2003-01-20  5:09 UTC (permalink / raw)


deskpot@myrealbox.com (Vasily Korytov) writes:

> Currently I can't find the XEmacs equivalent of lpr-command and
> lpr-swithes (assuming, there're some), and would suggest checking for
> these variables, if they're not bound, setting them to "lpr" and
> "". Can anyone suggest a better way?

I think it's slightly better to not pollute the global name-space.  I've
added a boundp check instead.  Does it work for you?

> 2. It's XEmacs 21.4.12 here.

Strange, they're both bound in my version of XEmacs:

 "21.4 (patch 6) \"Common Lisp\" XEmacs Lucid"

`lpr-switches' is even mentioned in the XEmacs manual (in the 'Hardcopy
Output' node).



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symbol's value as variable is void: lpr-command
  2003-01-20  5:09 ` Jesper Harder
@ 2003-01-20  6:51   ` Vasily Korytov
  0 siblings, 0 replies; 6+ messages in thread
From: Vasily Korytov @ 2003-01-20  6:51 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 430 bytes --]

>>>>> "JH" == Jesper Harder writes:

 JH> I think it's slightly better to not pollute the global name-space. I've
 JH> added a boundp check instead.  Does it work for you?

Yes, thanks, it works OK.

 JH> `lpr-switches' is even mentioned in the XEmacs manual (in the 'Hardcopy
 JH> Output' node).

I've finally guessed! =)) They're in XEmacs -- but probably in the
ps-print package, which I don't have here.

---Vas

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symbol's value as variable is void: lpr-command
  2003-01-20  3:42 Symbol's value as variable is void: lpr-command Vasily Korytov
  2003-01-20  3:46 ` Vasily Korytov
  2003-01-20  5:09 ` Jesper Harder
@ 2003-01-20 10:32 ` Simon Josefsson
  2003-01-20 16:04   ` Vasily Korytov
  2 siblings, 1 reply; 6+ messages in thread
From: Simon Josefsson @ 2003-01-20 10:32 UTC (permalink / raw)


deskpot@myrealbox.com (Vasily Korytov) writes:

> I've just updatet Oort from CVS. When (require ...)'ing gnus-load it
> stops with the error: Symbol's value as variable is void: lpr-command.
> If I define lpr-command, the same is for lpr-switches.
>
> When I define both prior to (require 'gnus-load), it works again.
>
> The problem is in file mailcap.el, in the following strings:
>
> (defvar mailcap-print-command
>   (mapconcat 'identity
>              (cons lpr-command
>                    (if (stringp lpr-switches)
>                        (list lpr-switches)
>                      lpr-switches))
>              " ")
>   "Shell command (including switches) used to print Postscript files.")
>
> Currently I can't find the XEmacs equivalent of lpr-command and
> lpr-swithes (assuming, there're some), and would suggest checking for
> these variables, if they're not bound, setting them to "lpr" and "". Can
> anyone suggest a better way?

Installing the ps-print package would solve it, but it is not listed
in the requirements for running Gnus, so maybe we should work around
it.  If you apply the following patch, does Gnus work?  If more
workarounds are needed, perhaps the ps-print package should simply be
added to the prerequisites.

--- mailcap.el.~6.14.~	Fri Jan 17 09:53:07 2003
+++ mailcap.el	Mon Jan 20 11:30:29 2003
@@ -51,10 +51,14 @@
 
 (defvar mailcap-print-command
   (mapconcat 'identity
-	     (cons lpr-command
+	     (cons (if (boundp 'lpr-command)
+		       lpr-command
+		     "lpr")
+		   (if (boundp 'lpr-switches)
 		   (if (stringp lpr-switches)
 		       (list lpr-switches)
-		     lpr-switches))
+			 lpr-switches)
+		     ""))
 	     " ")
   "Shell command (including switches) used to print Postscript files.")
 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Symbol's value as variable is void: lpr-command
  2003-01-20 10:32 ` Simon Josefsson
@ 2003-01-20 16:04   ` Vasily Korytov
  0 siblings, 0 replies; 6+ messages in thread
From: Vasily Korytov @ 2003-01-20 16:04 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

>>>>> "SJ" == Simon Josefsson writes:

 SJ> Installing the ps-print package would solve it, but it is not listed
 SJ> in the requirements for running Gnus, so maybe we should work around
 SJ> it.  If you apply the following patch, does Gnus work?

I didn't try it, because I've already updated the CVS tree -- and it
contains similar (if not really the same =) patch from Jesper Harder.
Gnus works with it.

---Vas

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-20 16:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-20  3:42 Symbol's value as variable is void: lpr-command Vasily Korytov
2003-01-20  3:46 ` Vasily Korytov
2003-01-20  5:09 ` Jesper Harder
2003-01-20  6:51   ` Vasily Korytov
2003-01-20 10:32 ` Simon Josefsson
2003-01-20 16:04   ` Vasily Korytov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).