[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex cc52bce 77/80: Fix for revised file access contr
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex cc52bce 77/80: Fix for revised file access controls of gs (bug#37719) |
Date: |
Wed, 16 Oct 2019 11:07:21 -0400 (EDT) |
branch: externals/auctex
commit cc52bce708a77654e1b89048cb8dce484a5e4e88
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Fix for revised file access controls of gs (bug#37719)
* preview.el.in (preview-prepare-fast-conversion): Add commands for
revised file access controls introduced after gs 9.27.
(preview-gs-restart): Use "-d" option instead of "-s" because the
former does not accept "%d" in OutputFile parameter.
Don't wrap the file name into parentheses in line with this change.
(preview-gs-flag-error): Adjust the reconstructed gs command line
argument so that it matches with the above change.
Add comments about limitations of this function.
---
preview.el.in | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/preview.el.in b/preview.el.in
index 148f05b..03e1d9b 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -727,8 +727,8 @@ Gets the usual PROCESS and STRING parameters, see
(setq preview-gs-sequence (list 1)))
(setcdr preview-gs-sequence 1)
(let* ((process-connection-type nil)
- (outfile (format "-dOutputFile=%s"
- (preview-ps-quote-filename
+ (outfile (format "-sOutputFile=%s"
+ (file-relative-name
(format "%s/pr%d-%%d.%s"
(car TeX-active-tempdir)
(car preview-gs-sequence)
@@ -1165,9 +1165,16 @@ NONREL is not NIL."
(list file))))
(setq preview-gs-dsc (preview-dsc-parse file))
(setq preview-gs-init-string
- (concat (format "{<</PermitFileReading[%s]>> setuserparams \
+ ;; Add commands for revised file access controls introduced
+ ;; after gs 9.27 (bug#37719)
+ (concat (format "systemdict /.addcontrolpath known {%s} if\n"
+ (mapconcat (lambda (f)
+ (format "/PermitFileReading %s
.addcontrolpath"
+ (preview-ps-quote-filename f)))
+ all-files "\n"))
+ (format "{<</PermitFileReading[%s]>> setuserparams \
.locksafe} stopped pop "
- (mapconcat 'preview-ps-quote-filename all-files ""))
+ (mapconcat #'preview-ps-quote-filename all-files ""))
preview-gs-init-string
(format " %s(r)file /.preview-ST 1 index def %s exec
.preview-ST "
(preview-ps-quote-filename file)
@@ -1257,10 +1264,18 @@ Try \\[ps-run-start] \\[ps-run-buffer] and \
(defun preview-gs-flag-error (ov err)
"Make an eps error flag in overlay OV for ERR string."
+ ;; N.B. Although this code shows command line of gs invocation and
+ ;; error together via mouse popup menu, they are not necessarilly
+ ;; associated with each other. There is a case that the command
+ ;; line is for "[...].prv/tmpXXXXXX/pr1-2.png" while the error is
+ ;; raised for "[...].prv/tmpXXXXXX/pr1-1.png". (c.f. bug#37719)
(let* ((filenames (overlay-get ov 'filenames))
(file (car (nth 0 filenames)))
- (outfile (format "-dOutputFile=%s"
- (preview-ps-quote-filename
+ ;; FIXME: This format isn't equal to actual invocation of gs
+ ;; command constructed in `preview-gs-restart', which
+ ;; contains "%d".
+ (outfile (format "-sOutputFile=%s"
+ (file-relative-name
(car (nth 1 filenames)))))
(ps-open
`(lambda() (interactive "@")
- [elpa] externals/auctex 7cb6c19 59/80: Fix lisp example for `TeX-electric-math', (continued)
- [elpa] externals/auctex 7cb6c19 59/80: Fix lisp example for `TeX-electric-math', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex a033c30 43/80: ; Use `LaTeX-extract-key-value-label', Tassilo Horn, 2019/10/16
- [elpa] externals/auctex aa17420 46/80: ; Silence the compiler, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 01dc048 78/80: Change default for new Ghostscript, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 799c844 63/80: Add new style/changelog.el, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex dc2c2d6 65/80: Make "PDF Tools" viewer available under Windows and macOS, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex dbc1fa0 71/80: Support new kernel macros \Ref and \labelformat, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 7cd329f 74/80: Add fontification support for ragged2e macros, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex 85dd4fe 73/80: Delete \Ref and \labelformat from varioref.el, Tassilo Horn, 2019/10/16
- [elpa] externals/auctex d93db40 72/80: * latex.el (LaTeX-common-initialization): Add \Ref to `TeX-complete-list'., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex cc52bce 77/80: Fix for revised file access controls of gs (bug#37719),
Tassilo Horn <=
- [elpa] externals/auctex 65607e5 76/80: * preview.el.in (preview-undump-replacements): Fix last commit., Tassilo Horn, 2019/10/16
- [elpa] externals/auctex c6d6c19 79/80: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2019/10/16