Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5986c5c6
Commit
5986c5c6
authored
Mar 13, 2008
by
Tassilo Horn
Browse files
(doc-view-doc->txt, doc-view-convert-current-doc):
Create cache dir only if it doesn't already exist.
parent
23ae1f25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/doc-view.el
lisp/doc-view.el
+5
-3
No files found.
lisp/ChangeLog
View file @
5986c5c6
2008-03-13 Tassilo Horn <tassilo@member.fsf.org>
* doc-view.el (doc-view-doc->txt, doc-view-convert-current-doc):
Create cache dir only if it doesn't already exist.
2008-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
2008-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh-font-lock-quoted-subshell): Fix handling
* progmodes/sh-script.el (sh-font-lock-quoted-subshell): Fix handling
...
...
lisp/doc-view.el
View file @
5986c5c6
...
@@ -600,7 +600,8 @@ Should be invoked when the cached images aren't up-to-date."
...
@@ -600,7 +600,8 @@ Should be invoked when the cached images aren't up-to-date."
(
defun
doc-view-doc->txt
(
txt
callback
)
(
defun
doc-view-doc->txt
(
txt
callback
)
"Convert the current document to text and call CALLBACK when done."
"Convert the current document to text and call CALLBACK when done."
(
make-directory
(
doc-view-current-cache-dir
))
(
unless
(
file-exists-p
(
doc-view-current-cache-dir
))
(
make-directory
(
doc-view-current-cache-dir
)))
(
case
doc-view-doc-type
(
case
doc-view-doc-type
(
pdf
(
pdf
;; Doc is a PDF, so convert it to TXT
;; Doc is a PDF, so convert it to TXT
...
@@ -649,7 +650,8 @@ Those files are saved in the directory given by the function
...
@@ -649,7 +650,8 @@ Those files are saved in the directory given by the function
(
setq
doc-view-pending-cache-flush
t
)
(
setq
doc-view-pending-cache-flush
t
)
(
let
((
png-file
(
expand-file-name
"page-%d.png"
(
let
((
png-file
(
expand-file-name
"page-%d.png"
(
doc-view-current-cache-dir
))))
(
doc-view-current-cache-dir
))))
(
make-directory
(
doc-view-current-cache-dir
))
(
unless
(
file-exists-p
(
doc-view-current-cache-dir
))
(
make-directory
(
doc-view-current-cache-dir
)))
(
case
doc-view-doc-type
(
case
doc-view-doc-type
(
dvi
(
dvi
;; DVI files have to be converted to PDF before Ghostscript can process
;; DVI files have to be converted to PDF before Ghostscript can process
...
@@ -1036,7 +1038,7 @@ toggle between displaying the document or editing it as text.
...
@@ -1036,7 +1038,7 @@ toggle between displaying the document or editing it as text.
name-types
content-types
))
name-types
content-types
))
name-types
content-types
name-types
content-types
(
error
"Cannot determine the document type"
)))))
(
error
"Cannot determine the document type"
)))))
(
doc-view-make-safe-dir
doc-view-cache-directory
)
(
doc-view-make-safe-dir
doc-view-cache-directory
)
;; Handle compressed files, remote files, files inside archives
;; Handle compressed files, remote files, files inside archives
(
set
(
make-local-variable
'doc-view-buffer-file-name
)
(
set
(
make-local-variable
'doc-view-buffer-file-name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment