all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* AUCTeX PDF2DSC error on preview
@ 2015-02-03 18:35 Ben Weinstein-Raun
  2015-02-03 18:38 ` Ben Weinstein-Raun
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ben Weinstein-Raun @ 2015-02-03 18:35 UTC (permalink / raw
  To: help-gnu-emacs

I normally use OS X, and have recently decided to start using Emacs, and specifically AUCTeX based on myriad recommendations. I downloaded the current version for OS X and tried to preview a very simple document:

\documentclass{article}
\begin{document}
$e^x=10$
\end{document}

I initially got the usual PATH-based errors that one seems to get on OS X, but on correcting those I got an error that didn't seem to be caused by the PATH: 

PDF2DSC sentinel: Wrong type argument: arrayp, nil

I switched over to the Linux side of my laptop (Arch Linux), installed Emacs 24.4.1 and the current version of AUCTeX (11.88.2), only to discover that the issue had followed me across partitions :P

I have TeXlive installed, and Emacs seems to have the right PATH set in both OS X and Linux. I only found one other mention of this problem online (http://lists.gnu.org/archive/html/auctex/2014-12/msg00020.html), and there's no resolution to the issue.

Am I doing something wrong, or is this a bug?

Probably the more important question, for the long term, is "Where should I have asked this question?"

--
Ben Weinstein-Raun


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

* Re: AUCTeX PDF2DSC error on preview
  2015-02-03 18:35 AUCTeX PDF2DSC error on preview Ben Weinstein-Raun
@ 2015-02-03 18:38 ` Ben Weinstein-Raun
  2015-02-04  8:03 ` Tassilo Horn
       [not found] ` <mailman.19237.1423037004.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Ben Weinstein-Raun @ 2015-02-03 18:38 UTC (permalink / raw
  To: help-gnu-emacs

On Tuesday, February 3, 2015 at 1:35:55 PM UTC-5, Ben Weinstein-Raun wrote:
> ...and tried to preview a very simple document...

(I forgot to mention that I was specifically using preview-buffer and preview-at-point)

--
Ben Weinstein-Raun



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

* Re: AUCTeX PDF2DSC error on preview
  2015-02-03 18:35 AUCTeX PDF2DSC error on preview Ben Weinstein-Raun
  2015-02-03 18:38 ` Ben Weinstein-Raun
@ 2015-02-04  8:03 ` Tassilo Horn
       [not found] ` <mailman.19237.1423037004.1147.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2015-02-04  8:03 UTC (permalink / raw
  To: Ben Weinstein-Raun; +Cc: help-gnu-emacs

Ben Weinstein-Raun <weinstein.raun@gmail.com> writes:

Hi Ben,

> I initially got the usual PATH-based errors that one seems to get on
> OS X, but on correcting those I got an error that didn't seem to be
> caused by the PATH:
>
> PDF2DSC sentinel: Wrong type argument: arrayp, nil

If you have time to, you could edebug `preview-pdf2dsc-sentinel' to see
where exactly the error comes from.

> I switched over to the Linux side of my laptop (Arch Linux), installed
> Emacs 24.4.1 and the current version of AUCTeX (11.88.2), only to
> discover that the issue had followed me across partitions :P

I'm also on Arch, and I've just tested with the same versions of Emacs
and AUCTeX, and for me your example works.

Bye,
Tassilo



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

* Re: AUCTeX PDF2DSC error on preview
       [not found] ` <mailman.19237.1423037004.1147.help-gnu-emacs@gnu.org>
@ 2015-02-04 22:26   ` benwr
  2015-02-05  7:17     ` Tassilo Horn
       [not found]     ` <mailman.19298.1423120645.1147.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: benwr @ 2015-02-04 22:26 UTC (permalink / raw
  To: help-gnu-emacs

On Wednesday, February 4, 2015 at 3:03:27 AM UTC-5, Tassilo Horn wrote:
> 
> If you have time to, you could edebug `preview-pdf2dsc-sentinel' to see
> where exactly the error comes from.

Thanks for the reply! When I turn on debug-on-signal, I get this:

> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>   replace-regexp-in-string("[^-0-9a-zA-Z_./\n]" "\\\\\\&" nil)
>   shell-quote-argument(nil)
>   mapconcat(shell-quote-argument (nil "-dOutputFile=(_region_.prv/tmp1671KOM/pr1-%d.png)" "-q" "-dDELAYSAFER" "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r110.418x110.613") " ")
>   preview-gs-restart()
>   byte-code("\306\b!\211\x19\307=\2035\0\310\b!\210\311\x12\v\312\f!P\x13\313 \210
\203B\0\x0e\x11\203(\0\314 \210\202B\0\x0e\x12\203B\0\311\315\316\217\210\202B\0	\317=\203B\0\310\b!\210\320 \210)\311\207" [process status TeX-sentinel-function preview-gs-init-string preview-colors gsstart process-status exit delete-process nil preview-pdf-color-string preview-prepare-fast-conversion preview-gs-restart (preview-delete-file preview-ps-file) ((file-error)) signal preview-dvips-abort preview-gs-queue preview-ps-file] 4)
>  preview-pdf2dsc-sentinel(#<process Preview-PDF2DSC> "Preview-PDF2DSC" t)
>   (lambda (process command) (preview-pdf2dsc-sentinel process command t))(#<process Preview-PDF2DSC> "Preview-PDF2DSC")
>   TeX-command-sentinel(#<process Preview-PDF2DSC> "finished\n")

I'm not very adept with emacs yet (obviously) and it's getting to be really frustrating. The first time I tried to use edebug I made a mistake, and every time I've tried since, edebug doesn't seem to start after I instrument the function. I even moved my .emacs.d and reinstalled auctex, and it still won't run. Is there some other place where persistent settings are stored besides .emacs.d? Any ideas regarding either problem would be greatly appreciated.


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

* Re: AUCTeX PDF2DSC error on preview
  2015-02-04 22:26   ` benwr
@ 2015-02-05  7:17     ` Tassilo Horn
       [not found]     ` <mailman.19298.1423120645.1147.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2015-02-05  7:17 UTC (permalink / raw
  To: benwr; +Cc: help-gnu-emacs

benwr@vt.edu writes:

Hi Ben,

>> If you have time to, you could edebug `preview-pdf2dsc-sentinel' to
>> see where exactly the error comes from.
>
> Thanks for the reply!  When I turn on debug-on-signal, I get this:
>
>> Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
>>   replace-regexp-in-string("[^-0-9a-zA-Z_./\n]" "\\\\\\&" nil)
>>   shell-quote-argument(nil)
>>   mapconcat(shell-quote-argument (nil
>> "-dOutputFile=(_region_.prv/tmp1671KOM/pr1-%d.png)" "-q" "-dDELAYSAFER"
>> "-dNOPAUSE" "-DNOPLATFONTS" "-dPrinted" "-dTextAlphaBits=4"
>> "-dGraphicsAlphaBits=4" "-sDEVICE=png16m" "-r110.418x110.613") " ")
>>   preview-gs-restart()

Ah, great, now I see where the error happens.  The reason seems to be
that `preview-gs-command' is nil.  If you didn't set that explicitly,
then it seems there is neither "rungs", "mgs", "GSWIN32C.exe", nor "gs"
on your PATH.

Don't you have GhostScript installed?  That's required by preview.

Bye,
Tassilo



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

* Re: AUCTeX PDF2DSC error on preview
       [not found]     ` <mailman.19298.1423120645.1147.help-gnu-emacs@gnu.org>
@ 2015-02-05 15:45       ` benwr
  2015-02-05 18:04         ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: benwr @ 2015-02-05 15:45 UTC (permalink / raw
  To: help-gnu-emacs

On Thursday, February 5, 2015 at 2:17:27 AM UTC-5, Tassilo Horn wrote:

> Ah, great, now I see where the error happens.  The reason seems to be
> that `preview-gs-command' is nil.  If you didn't set that explicitly,
> then it seems there is neither "rungs", "mgs", "GSWIN32C.exe", nor "gs"
> on your PATH.
> 
> Don't you have GhostScript installed?  That's required by preview.


First of all, thank you so much for the help! That fixed it!

Second, if preview-gs-command is supposed to be automatically populated from the PATH, something seems to have gone wrong there. I do have ghostscript installed, and gs is in a directory (/usr/local/bin on OS X) that's definitely in my PATH in emacs (which I set as the very first thing in init.el). Weird.


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

* Re: AUCTeX PDF2DSC error on preview
  2015-02-05 15:45       ` benwr
@ 2015-02-05 18:04         ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2015-02-05 18:04 UTC (permalink / raw
  To: help-gnu-emacs

> definitely in my PATH in emacs (which I set as the very first thing in
> init.el). Weird.

Maybe you (setenv "PATH" ...) without setting exec-path?


        Stefan




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

end of thread, other threads:[~2015-02-05 18:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-03 18:35 AUCTeX PDF2DSC error on preview Ben Weinstein-Raun
2015-02-03 18:38 ` Ben Weinstein-Raun
2015-02-04  8:03 ` Tassilo Horn
     [not found] ` <mailman.19237.1423037004.1147.help-gnu-emacs@gnu.org>
2015-02-04 22:26   ` benwr
2015-02-05  7:17     ` Tassilo Horn
     [not found]     ` <mailman.19298.1423120645.1147.help-gnu-emacs@gnu.org>
2015-02-05 15:45       ` benwr
2015-02-05 18:04         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.