Problem with preview-auctex 11.86_3 and Ghostscript9

Recently i've updated Ghostscript from ports, version 8 to 9 but when i tried to generate previews for latex in emacs, none was generated. Previously it worked pretty good, but after update i got an error like the folowing for each preview:
Code:
"GSWIN32C.EXE" "-dOutputFile=(_region_.prv/tmp3712kvc/pr1-1.png)" "-q"
"-dSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4"
"-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r70.4906x70.6156"
GS>{DELAYSAFER{.setsafe}if}stopped pop/.preview-BP
currentpagedevice/BeginPage get dup null eq{pop{pop}bind}if
def<</BeginPage{currentpagedevice/PageSize get dup 0 get 1 ne exch 1
get 1 ne or{.preview-BP }{pop}ifelse}bind/PageSize[1
1]>>setpagedevice/preview-do{[count 3 roll save]3 1 roll dup length 0
eq{pop}{setpagedevice}{ifelse .runandhide}stopped{handleerror quit}if
aload pop restore}bind def
[(_region_.prv/tmp3712kvc/preview.dsc)(r)file]aload exch dup 0
setfileposition 520()/SubFileDecode filter cvx .runandhide aload pop
dup dup 623 setfileposition 50()/SubFileDecode filter
cvx<<>>preview-do
Error: /invalidfileaccess in --file--
Operand stack:
   --nostringval--   (_region_.prv/tmp3712kvc/preview.dsc)   (r)
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--
--nostringval--   2   %stopped_push   --nostringval--
--nostringval--   %loop_continue   --nostringval--   --nostringval--
false   1   %stopped_push   .runexec2   --nostringval--
--nostringval--   --nostringval--   2   %stopped_push
--nostringval--
Dictionary stack:
   --dict:1163/1684(ro)(G)--   --dict:0/20(G)--   --dict:79/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 442
GS<3>

after reading this list and some codebrowsing in preview.el i realized there is a patch not yet applied to auctex which prevents preview from working fine with ghostscript.
In gmane that piece of code has been there for about a year, i dont know why in freebsd is still not applied, however i dont know enough of auctex nor ghostscript. I only write this for those who could have the same problem in FreeBSD
 
Back
Top