GNU bug report logs - #18981
24.3; gs and filenames with percent signs

Previous Next

Package: emacs;

Reported by: aikipooh <at> gmail.com (Юрий Пухальский)

Date: Fri, 7 Nov 2014 11:03:01 UTC

Severity: normal

Found in version 24.3

Done: Marcin Borkowski <mbork <at> mbork.pl>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 18981 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Borkowski <mbork <at> mbork.pl>
To: aikipooh <at> gmail.com (Юрий Пухальский)
Cc: 18981 <at> debbugs.gnu.org
Subject: Re: bug#18981: 24.3; gs and filenames with percent signs
Date: Fri, 04 Mar 2016 19:41:52 +0100
On 2014-11-07, at 14:02, aikipooh <at> gmail.com (Юрий Пухальский) wrote:

> I've a file named: A13+Datasheet+-+v1.12+%282012-03-29%29.pdf
> When I invoke docview (hitting return in dired), it doesn't work because
> of percent signs in the file name: DocView: process pdf/ps->png changed status to exited abnormally with code 1.
> Tracing docview I get:
>
> 1 -> doc-view-start-process: name="pdf/ps->png" program="gs" args=("-dSAFER" "-dNOPAUSE" "-sDEVICE=png16m" "-dTextAlphaBits=4" "-dBATCH" "-dGraphicsAlphaBits=4" "-dQUIET" "-r100" "-sOutputFile=/tmp/docview1000/A13+Datasheet+-+v1.12+%282012-03-29%29.pdf-1dc1b37082c745e206fc9363f828eb08/page-%d.png" "/home/pooh/work/srvdoc/A13+Datasheet+-+v1.12+%282012-03-29%29.pdf") callback=#[0 "\302\303\300!\304\305\306\307 \"\304\310%\210	\203.\311	!\210\304\312p\313\"\207" [100 doc-view-current-timer write-region prin1-to-string nil expand-file-name "resolution.el" doc-view-current-cache-dir silently cancel-timer doc-view-display force] 6 "
>
> (fn)"]
>
> I see the percent signs from the filename verbatim in gs invocation, but
> it's not allowed as they are (I think) getting to the printf-like
> function (for %d in batches), and therefore must be presented as %%.
>
> So the fix is easy: when preparing the invocation string for gs, change
> single percent signs to double.

Hi Юрий,

I know it's been some time since your report, but could you please check
whether this bug is still present?  I tried to reproduce it (with a file
called foo%.pdf, on Fedora), and it seemed to work just fine.

Best,

-- 
Marcin




This bug report was last modified 9 years and 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.