Re: rel-0-8-1; Default options are always used, even when package is loaded

[email protected] (Frank Küster) Tue, 22 Feb 2005 18:09:45 +0100
Newsgroups gmane.emacs.latex.preview.devel
Message-ID <87acpwwmg6.fsf__13499.3237712935$1109095119$gmane$org@alhambra.kuesterei.ch>
--=-=-=

David Kastrup <[email protected]> schrieb:

> Something like that?


--=-=-=
Content-Type: image/x-xpixmap
Content-Disposition: inline; filename=no.xpm

/* XPM */
static char * no_xpm[] = {
"24 24 155 2",
"  	c None",
". 	c #2C2C2C",
"+ 	c #3E3E3E",
"@ 	c #595959",
"# 	c #6D6D6D",
"$ 	c #787878",
"% 	c #646464",
"& 	c #555555",
"* 	c #727272",
"= 	c #A7A7A7",
"- 	c #4D4D4D",
"; 	c #1E1E1E",
"> 	c #2F2F2F",
", 	c #A2A2A2",
"' 	c #E6E6E6",
") 	c #ECECEC",
"! 	c #F2F2F2",
"~ 	c #F1F1F1",
"{ 	c #EEEEEE",
"] 	c #E5E5E5",
"^ 	c #8B8B8B",
"/ 	c #363636",
"( 	c #444444",
"_ 	c #D2D2D2",
": 	c #EBEBEB",
"< 	c #EFEFEF",
"[ 	c #B4B4B4",
"} 	c #313131",
"| 	c #D4D4D4",
"1 	c #CCCCCC",
"2 	c #B8B8B8",
"3 	c #BEBEBE",
"4 	c #BFBFBF",
"5 	c #CECECE",
"6 	c #EDEDED",
"7 	c #A1A1A1",
"8 	c #C9C9C9",
"9 	c #D1D1D1",
"0 	c #DEDEDE",
"a 	c #D6D6D6",
"b 	c #E2E2E2",
"c 	c #505050",
"d 	c #414141",
"e 	c #E1E1E1",
"f 	c #F3F3F3",
"g 	c #DBDBDB",
"h 	c #9E9E9E",
"i 	c #E7E7E7",
"j 	c #454545",
"k 	c #5F5F5F",
"l 	c #838383",
"m 	c #E8E8E8",
"n 	c #9B9B9B",
"o 	c #B0B0B0",
"p 	c #E9E9E9",
"q 	c #F0F0F0",
"r 	c #BDBDBD",
"s 	c #ACACAC",
"t 	c #B6B6B6",
"u 	c #AAAAAA",
"v 	c #D5D5D5",
"w 	c #373737",
"x 	c #B2B2B2",
"y 	c #7E7E7E",
"z 	c #D0D0D0",
"A 	c #C4C4C4",
"B 	c #EAEAEA",
"C 	c #CACACA",
"D 	c #B5B5B5",
"E 	c #C2C2C2",
"F 	c #8F8F8F",
"G 	c #161616",
"H 	c #797979",
"I 	c #BCBCBC",
"J 	c #A4A4A4",
"K 	c #DDDDDD",
"L 	c #CFCFCF",
"M 	c #E3E3E3",
"N 	c #E4E4E4",
"O 	c #C5C5C5",
"P 	c #303030",
"Q 	c #333333",
"R 	c #9F9F9F",
"S 	c #8C8C8C",
"T 	c #6E6E6E",
"U 	c #A0A0A0",
"V 	c #999999",
"W 	c #CBCBCB",
"X 	c #C8C8C8",
"Y 	c #535353",
"Z 	c #252525",
"` 	c #AEAEAE",
" .	c #919191",
"..	c #939393",
"+.	c #A5A5A5",
"@.	c #DCDCDC",
"#.	c #C0C0C0",
"$.	c #8D8D8D",
"%.	c #393939",
"&.	c #C1C1C1",
"*.	c #6A6A6A",
"=.	c #9C9C9C",
"-.	c #D9D9D9",
";.	c #BABABA",
">.	c #A8A8A8",
",.	c #C7C7C7",
"'.	c #484848",
").	c #959595",
"!.	c #808080",
"~.	c #C3C3C3",
"{.	c #DADADA",
"].	c #717171",
"^.	c #B1B1B1",
"/.	c #9D9D9D",
"(.	c #3C3C3C",
"_.	c #434343",
":.	c #ABABAB",
"<.	c #656565",
"[.	c #606060",
"}.	c #323232",
"|.	c #404040",
"1.	c #8E8E8E",
"2.	c #1B1B1B",
"3.	c #4A4A4A",
"4.	c #888888",
"5.	c #D3D3D3",
"6.	c #8A8A8A",
"7.	c #AFAFAF",
"8.	c #A9A9A9",
"9.	c #171717",
"0.	c #131313",
"a.	c #A6A6A6",
"b.	c #3D3D3D",
"c.	c #121212",
"d.	c #7F7F7F",
"e.	c #5B5B5B",
"f.	c #6C6C6C",
"g.	c #0D0D0D",
"h.	c #2D2D2D",
"i.	c #ADADAD",
"j.	c #2E2E2E",
"k.	c #070707",
"l.	c #151515",
"m.	c #7D7D7D",
"n.	c #767676",
"o.	c #030303",
"p.	c #0B0B0B",
"q.	c #626262",
"r.	c #191919",
"s.	c #7A7A7A",
"t.	c #5A5A5A",
"u.	c #0C0C0C",
"v.	c #949494",
"w.	c #666666",
"x.	c #989898",
"                                                ",
"                  . + @ # $ % & * =             ",
"            - ; > , ' ) ! ~ { ] ^ / ,           ",
"            - ( _ ) ! ~ : : < < ) [             ",
"            } | ) 1 2 3 4 4 5 6 6 :             ",
"          - 7 ) 8 9 6 ~ < : < 0 a b 9           ",
"        c d e : ) { f { ~ ) < ) g h i           ",
"      j k l 0 m = n o p p q r s t u v           ",
"      w x y z x A { B 6 ) m C q ~ D E   F       ",
"    G H r * I J K L M N q < ' [ C O u   3       ",
"P Q . R S T 1 n U o V M b K K W ] 1 u   X       ",
"Y @ Z `  .* r ..x b O g M o | +.8 @.o   #.      ",
"m $.%.u &.*.E g _ =.-.| i ;.N K i ] A   >.      ",
"-.6 $ ,.-.'. .K ) p b ).I !.e ) 4 L 1   E       ",
"  $ S ~.i '.!.= @.: q e | {.p E ].z & ^.$.      ",
"      t N /.(.,.s e B N _.:.] <.,.@ [.8         ",
"      % B L }.|.O =.: 4 T 1.r V +.* 0           ",
"        _ K * 2.3.h 9 , 4.S h I y 6 5.          ",
"        6.7.8.9.0.a.a.U 7 J  ./.= M             ",
"        b.C ` c.9.@ d.^.e.| 4.f.;.{.            ",
"          N ][email protected] C , j.U e             ",
"          ] l c.k.l.m.i M @.n.l. .N             ",
"          N ].0.o.p.P F a.q.r.r.s.M 6.          ",
"        b.] t.u.o.0.q.a X v.; l.w.i x.          "};

--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable


Yes, at least from what it is intended to signify. It's rather small,
and you have to look very closely to see what it is. Maybe it can get
some refinement. And why is it in grey? Why not some "terrifying"
colors?

> Oh, crap.  _ANOTHER_ broken GhostScript version in the wild.

$ gs --version
8.01
$ ll /usr/bin/gs
lrwxrwxrwx  1 root root 20 2005-02-12 17:04 /usr/bin/gs -> /etc/alternative=
s/gs
$ ll /etc/alternatives/gs
lrwxrwxrwx  1 root root 15 2005-02-15 15:11 /etc/alternatives/gs -> /usr/bi=
n/gs-gpl

(But see below)

> Why
> can't they get this right, _ever_?  I hate them.  Does it help if you
> remove the ".setsafe" string in preview.el?  Or if you rename the
> "AFPL" in the line after that into "GPL"?

- With original preview.el (actually, the byte-compiled version is
  loaded):

  nice preview in LaTeX mode, exclamation mark sign in PDFLaTeX mode

- With original preview.elc renamed, M-x locate-library RET preview RET
  gives the edited version, and ".setsafe" removed so that the two lines
  read:

{handleerror quit}if cvx systemdict/.runandhide known{\
\(AFPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if \

  Nothing at all in LaTeX mode (not even roadwork signs, at least not
  for a time long enough that I can see them). C-c ` brings up the
  usual "helpful" error message and places the cursor in _region_.tex
  which _does_ show a previewed \alpha!

  Nothing at all in PDFLaTeX mode, not even a roadwork sign visible. C-c
  ` brings me a help buffer and point in _region_.tex with the
  exclamation mark sign and the following gs output:

gs -q -dSAFER -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBit=
s\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r123.035x122.862
GS>/.preview-BP currentpagedevice/BeginPage get dup null eq {pop{pop}bind}i=
f def <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get=
 1 ne or{.preview-BP gsave 0.705882 0.933333 0.705882 setrgbcolor false set=
strokeadjust 3 setlinewidth clippath strokepath matrix setmatrix true {2 in=
dex{newpath}if round exch round exch moveto pop false}{round exch round exc=
h lineto}{curveto}{closepath}pathforall pop fill grestore }{pop}ifelse}bind=
/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll{setpag=
edevice}stopped{handleerror quit}if cvx systemdict/.runandhide known{.setsa=
fe(GPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if stopped{=
handleerror quit}if count 1 ne{quit}if aload pop restore<</OutputFile(/dev/=
null)>>setpagedevice}bind def (_region_.prv/tmp6966SB2/preview.dsc)(r)file =
dup dup 0 setfileposition 425()/SubFileDecode filter cvx exec dup dup 425 s=
etfileposition 50()/SubFileDecode filter cvx <</OutputFile(_region_.prv/tmp=
6966SB2/prev001.png)>>preview-do
Error: /invalidfileaccess in --.outputpage--
Operand stack:
   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostrin=
gval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_cont=
inue   2   3   %oparray_pop   --nostringval--   --nostringval--   false   1=
   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostri=
ngval--   2   %stopped_push   --nostringval--   --nostringval--   false   1=
   %stopped_push   1148   --nostringval--   %end_runandhide   --nostringval=
--   --nostringval--   --nostringval--   0   8   %oparray_pop   --nostringv=
al--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1055/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--   --di=
ct:100/127(ro)(G)--   --dict:230/230(ro)(G)--   --dict:19/24(L)--   --dict:=
4/6(L)--   --dict:22/31(L)--
Current allocation mode is local

Preview-GhostScript finished

- With .setsafe in again, but AFPL replaced by GPL, so that the two
  lines read:

{handleerror quit}if cvx systemdict/.runandhide known{.setsafe\
\(GPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if \

  Nothing at all in LaTeX mode, not even roadwork signs visible. As
  before, C-c ` brings up the help buffer and point in _region_.tex with
  a preview for the textmath \alpha.

  Same as before (nothing in the original TeX buffer), backtrace from
  exclamation sign in _region_.tex:

gs -q -dSAFER -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBit=
s\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r123.035x122.862
GS>/.preview-BP currentpagedevice/BeginPage get dup null eq {pop{pop}bind}i=
f def <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get=
 1 ne or{.preview-BP gsave 0.705882 0.933333 0.705882 setrgbcolor false set=
strokeadjust 3 setlinewidth clippath strokepath matrix setmatrix true {2 in=
dex{newpath}if round exch round exch moveto pop false}{round exch round exc=
h lineto}{curveto}{closepath}pathforall pop fill grestore }{pop}ifelse}bind=
/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll{setpag=
edevice}stopped{handleerror quit}if cvx systemdict/.runandhide known{.setsa=
fe(GPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if stopped{=
handleerror quit}if count 1 ne{quit}if aload pop restore<</OutputFile(/dev/=
null)>>setpagedevice}bind def (_region_.prv/tmp7002uE2/preview.dsc)(r)file =
dup dup 0 setfileposition 425()/SubFileDecode filter cvx exec dup dup 425 s=
etfileposition 50()/SubFileDecode filter cvx <</OutputFile(_region_.prv/tmp=
7002uE2/prev001.png)>>preview-do
Error: /invalidfileaccess in --.outputpage--
Operand stack:
   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostrin=
gval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_cont=
inue   2   3   %oparray_pop   --nostringval--   --nostringval--   false   1=
   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostri=
ngval--   2   %stopped_push   --nostringval--   --nostringval--   false   1=
   %stopped_push   1148   --nostringval--   %end_runandhide   --nostringval=
--   --nostringval--   --nostringval--   0   8   %oparray_pop   --nostringv=
al--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1055/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--   --di=
ct:100/127(ro)(G)--   --dict:230/230(ro)(G)--   --dict:19/24(L)--   --dict:=
4/6(L)--   --dict:22/31(L)--
Current allocation mode is local

Preview-GhostScript finished




It seems that this preview-latex installation is horribly broken. But it
is a plain Debian installation, no local changes.

$ grep preview .emacs=20=20
 '(preview-auto-cache-preamble t)

(this is in the custom-set-variables section).

I just installed gs-afpl, gs now points to it:

$ gs --version
8.14

And I still have the same behavior in the unchanged version (LaTeX okay,
PDFLaTeX shows exclamation mark sign with gs backtrace:

gs -q -dSAFER -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBit=
s\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r123.035x122.862
GS>/.preview-BP currentpagedevice/BeginPage get dup null eq {pop{pop}bind}i=
f def <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get=
 1 ne or{.preview-BP gsave 0.705882 0.933333 0.705882 setrgbcolor false set=
strokeadjust 3 setlinewidth clippath strokepath matrix setmatrix true {2 in=
dex{newpath}if round exch round exch moveto pop false}{round exch round exc=
h lineto}{curveto}{closepath}pathforall pop fill grestore }{pop}ifelse}bind=
/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll{setpag=
edevice}stopped{handleerror quit}if cvx systemdict/.runandhide known{.setsa=
fe(AFPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if stopped=
{handleerror quit}if count 1 ne{quit}if aload pop restore<</OutputFile(/dev=
/null)>>setpagedevice}bind def (_region_.prv/tmp97202N2/preview.dsc)(r)file=
 dup dup 0 setfileposition 425()/SubFileDecode filter cvx exec dup dup 425 =
setfileposition 50()/SubFileDecode filter cvx <</OutputFile(_region_.prv/tm=
p97202N2/prev001.png)>>preview-do
AFPL Ghostscript 8.14: **** Could not open the file  .
Error: /invalidfileaccess in --.outputpage--
Operand stack:
   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostrin=
gval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_cont=
inue   2   3   %oparray_pop   --nostringval--   --nostringval--   false   1=
   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostri=
ngval--   2   %stopped_push   --nostringval--   --nostringval--   false   1=
   %stopped_push   1148   --nostringval--   %end_runandhide   --nostringval=
--   --nostringval--   --nostringval--   0   8   %oparray_pop   --nostringv=
al--   --nostringval--
Dictionary stack:
   --dict:1120/1686(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--   --di=
ct:104/127(ro)(G)--   --dict:238/347(ro)(G)--   --dict:19/24(L)--   --dict:=
4/6(L)--   --dict:23/31(L)--
Current allocation mode is local
Last OS error: 2

Preview-GhostScript finished


I think it has been mentioned before that Debian's preview-latex
packages does not use the generated init file, but a static one derived
from an older version. For reasons that shouldn't matter here it is
split in two files, which contain:

$ cat /etc/emacs/site-start.d/50preview-latex.el=20
;; -*-emacs-lisp-*-
;;
;; Emacs startup file for the Debian GNU/Linux preview package
;;
;; Originally contributed by Nils Naumann <[email protected]>
;; Modified by Dirk Eddelbuettel <[email protected]>
;; Adapted for dh-make by Jim Van Zandt <[email protected]>

;; The preview package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...).  The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
(cond
 ((and
   (or (eq debian-emacs-flavor 'emacs21) (eq debian-emacs-flavor 'xemacs21))
   (eq window-system 'x))
  (setq load-path (cons (concat "/usr/share/"
				(symbol-name flavor)
				"/site-lisp/preview-latex") load-path))))

(cond
 ((and (eq debian-emacs-flavor 'xemacs21) (eq window-system 'x))
  (setq data-directory-list
	(cons "/usr/share/xemacs21/site-lisp/preview-latex"
	     data-directory-list))))

$ cat /etc/emacs/site-start.d/51preview-latex.el=20
;; 51preview-latex.el
;; preview-latex.postinst begin
;; Don't edit following lines.
;; This file is made by preview-latex.postinst, so this is not conffile.
(cond
 ((and
   (or (eq debian-emacs-flavor 'emacs21) (eq debian-emacs-flavor 'xemacs21))
   (eq window-system 'x))
  (load "preview-latex")))
;; preview-latex.postinst end

frank@alhambra:~$=20

No. This doesn't seem to be the problem. I just purged Debian's
preview-latex package (keeping preview-latex-styles), did ./configure;
make; su make install on the original sources
(preview-latex-0.8.1.tar.gz), and copied the generated preview-latex.el
to /etc/emacs/site-start.d/50preview-latex_local.el

(By the way, I *always* used a freshly started emacs for all those tests
above, even for LaTeX vs. PDFLaTeX mode). The behavior with unchanged
preview.el is as described, with gs backtrace:

gs -q -dSAFER -dDELAYSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBit=
s\=3D4 -dGraphicsAlphaBits\=3D4 -sDEVICE\=3Dpng16m -r123.035x122.862
GS>/.preview-BP currentpagedevice/BeginPage get dup null eq {pop{pop}bind}i=
f def <</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1 get=
 1 ne or{.preview-BP gsave 0.705882 0.933333 0.705882 setrgbcolor false set=
strokeadjust 3 setlinewidth clippath strokepath matrix setmatrix true {2 in=
dex{newpath}if round exch round exch moveto pop false}{round exch round exc=
h lineto}{curveto}{closepath}pathforall pop fill grestore }{pop}ifelse}bind=
/PageSize[1 1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll{setpag=
edevice}stopped{handleerror quit}if cvx systemdict/.runandhide known{.setsa=
fe(GPL Ghostscript)product ne{<<>>setpagedevice}if{.runandhide}}if stopped{=
handleerror quit}if count 1 ne{quit}if aload pop restore<</OutputFile(/dev/=
null)>>setpagedevice}bind def (_region_.prv/tmp11133LX2/preview.dsc)(r)file=
 dup dup 0 setfileposition 425()/SubFileDecode filter cvx exec dup dup 425 =
setfileposition 50()/SubFileDecode filter cvx <</OutputFile(_region_.prv/tm=
p11133LX2/prev001.png)>>preview-do
AFPL Ghostscript 8.14: **** Could not open the file  .
Error: /invalidfileaccess in --.outputpage--
Operand stack:
   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostrin=
gval--   2   %stopped_push   --nostringval--   --nostringval--   %loop_cont=
inue   2   3   %oparray_pop   --nostringval--   --nostringval--   false   1=
   %stopped_push   .runexec2   --nostringval--   --nostringval--   --nostri=
ngval--   2   %stopped_push   --nostringval--   --nostringval--   false   1=
   %stopped_push   1148   --nostringval--   %end_runandhide   --nostringval=
--   --nostringval--   --nostringval--   0   8   %oparray_pop   --nostringv=
al--   --nostringval--
Dictionary stack:
   --dict:1120/1686(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--   --di=
ct:104/127(ro)(G)--   --dict:238/347(ro)(G)--   --dict:19/24(L)--   --dict:=
4/6(L)--   --dict:23/31(L)--
Current allocation mode is local
Last OS error: 2

Preview-GhostScript finished


I'm going home now, frustrated. No mail this evening.

Regards, Frank
--=20
Frank K=FCster
Inst. f. Biochemie der Univ. Z=FCrich
Debian Developer

--=-=-=--



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
preview-latex-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/preview-latex-bugs


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click