diff options
| -rw-r--r-- | lisp/ChangeLog | 33 | ||||
| -rw-r--r-- | lisp/doc-view.el | 53 |
2 files changed, 53 insertions, 33 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3cb8779df67..182812f2c7a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,28 +1,33 @@ | |||
| 1 | 2008-01-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * doc-view.el (doc-view-pdf/ps->png): Make sure we a have a valid cwd. | ||
| 4 | (doc-view-insert-image): Do something if the image is missing. | ||
| 5 | (doc-view-mode): Don't use file-remote-p. | ||
| 6 | |||
| 1 | 2008-01-18 Bastien Guerry <Bastien.Guerry@ens.fr> | 7 | 2008-01-18 Bastien Guerry <Bastien.Guerry@ens.fr> |
| 2 | 8 | ||
| 3 | * textmodes/org-export-latex.el (org-export-latex-cleaned-string): | 9 | * textmodes/org-export-latex.el (org-export-latex-cleaned-string): Fix. |
| 4 | Fixed. | 10 | (org-export-latex-special-chars): Convert "..." in \ldots |
| 5 | (org-export-latex-special-chars): Convert "..." in \ldots | ||
| 6 | and skip tables. | 11 | and skip tables. |
| 7 | (org-export-latex-fontify-headline): Changed parameter name. | 12 | (org-export-latex-fontify-headline): Change parameter name. |
| 8 | (org-export-as-latex): Handle export of subtrees. | 13 | (org-export-as-latex): Handle export of subtrees. |
| 9 | (org-export-latex-make-header): New argument TITLE. | 14 | (org-export-latex-make-header): New argument TITLE. |
| 10 | (org-export-latex-content): New argument EXCLUDE-LIST. | 15 | (org-export-latex-content): New argument EXCLUDE-LIST. |
| 11 | (org-list-parse-list): New name for org-export-latex-parse-list. | 16 | (org-list-parse-list): New name for org-export-latex-parse-list. |
| 12 | (org-export-latex-make-header): New name for | 17 | (org-export-latex-make-header): New name for |
| 13 | org-export-latex-make-preamble. | 18 | org-export-latex-make-preamble. |
| 14 | (org-list-to-generic): New name of org-export-list-to-generic. | 19 | (org-list-to-generic): New name of org-export-list-to-generic. |
| 15 | (org-list-to-latex): New name of org-export-list-to-latex. | 20 | (org-list-to-latex): New name of org-export-list-to-latex. |
| 16 | (org-list-item-begin, org-list-end, org-list-insert-radio-list) | 21 | (org-list-item-begin, org-list-end, org-list-insert-radio-list) |
| 17 | (org-list-send-list, org-list-to-texinfo) | 22 | (org-list-send-list, org-list-to-texinfo) |
| 18 | (org-list-to-html): New functions. | 23 | (org-list-to-html): New functions. |
| 19 | (org-export-latex-tables-column-borders) | 24 | (org-export-latex-tables-column-borders) |
| 20 | (org-export-latex-default-class, org-export-latex-classes) | 25 | (org-export-latex-default-class, org-export-latex-classes) |
| 21 | (org-export-latex-classes-sectioning) | 26 | (org-export-latex-classes-sectioning) |
| 22 | (org-list-radio-list-templates): New options. | 27 | (org-list-radio-list-templates): New options. |
| 23 | (org-export-latex-header): New variable. | 28 | (org-export-latex-header): New variable. |
| 24 | (org-latex-entities): New constant. | 29 | (org-latex-entities): New constant. |
| 25 | (org-export-latex-default-sectioning, org-export-latex-preamble) | 30 | (org-export-latex-default-sectioning, org-export-latex-preamble) |
| 26 | (org-export-latex-prepare-text-option) | 31 | (org-export-latex-prepare-text-option) |
| 27 | (org-export-latex-get-sectioning): Remove. | 32 | (org-export-latex-get-sectioning): Remove. |
| 28 | 33 | ||
| @@ -35,14 +40,14 @@ | |||
| 35 | (org-export-html-convert-special-strings): New function. | 40 | (org-export-html-convert-special-strings): New function. |
| 36 | (org-html-do-expand): `org-export-html-convert-special-strings' | 41 | (org-html-do-expand): `org-export-html-convert-special-strings' |
| 37 | added to the list of conversion. | 42 | added to the list of conversion. |
| 38 | (org-infile-export-plist, org-get-current-options): Added support | 43 | (org-infile-export-plist, org-get-current-options): Add support |
| 39 | for "-" in the #+OPTION line to let user switch on/off special | 44 | for "-" in the #+OPTION line to let user switch on/off special |
| 40 | strings conversion. | 45 | strings conversion. |
| 41 | (org-export-plist-vars): New :html-table-tag property. | 46 | (org-export-plist-vars): New :html-table-tag property. |
| 42 | (org-export-as-html, org-format-org-table-html) | 47 | (org-export-as-html, org-format-org-table-html) |
| 43 | (org-format-table-table-html) Use the :html-table-tag property | 48 | (org-format-table-table-html) Use the :html-table-tag property |
| 44 | instead of the `org-export-html-table-tag' global value. | 49 | instead of the `org-export-html-table-tag' global value. |
| 45 | (org-additional-option-like-keywords): Added "TBLFM". | 50 | (org-additional-option-like-keywords): Add "TBLFM". |
| 46 | (org-entry-properties): Include the CLOCKSUM special property. | 51 | (org-entry-properties): Include the CLOCKSUM special property. |
| 47 | (org-columns-edit-value): Do not allow to edit the special | 52 | (org-columns-edit-value): Do not allow to edit the special |
| 48 | CLOCKSUM property. | 53 | CLOCKSUM property. |
| @@ -88,7 +93,7 @@ | |||
| 88 | (org-agenda-restriction-lock): New face. | 93 | (org-agenda-restriction-lock): New face. |
| 89 | (org-agenda-restriction-lock-overlay) | 94 | (org-agenda-restriction-lock-overlay) |
| 90 | (org-speedbar-restriction-lock-overlay): New variables. | 95 | (org-speedbar-restriction-lock-overlay): New variables. |
| 91 | (org-open-at-point): Removed obsolete way to do redirection in | 96 | (org-open-at-point): Remove obsolete way to do redirection in |
| 92 | shell links. | 97 | shell links. |
| 93 | (org-imenu-and-speedbar): New customization group. | 98 | (org-imenu-and-speedbar): New customization group. |
| 94 | (org-entry-properties): Return keyword-less time strings. | 99 | (org-entry-properties): Return keyword-less time strings. |
| @@ -114,7 +119,7 @@ | |||
| 114 | (org-verbatim-re): New variable. | 119 | (org-verbatim-re): New variable. |
| 115 | (org-hide-emphasis-markers): New option. | 120 | (org-hide-emphasis-markers): New option. |
| 116 | (org-additional-option-like-keywords): Add new keywords. | 121 | (org-additional-option-like-keywords): Add new keywords. |
| 117 | (org-get-entry): Renamed from `org-get-cleaned-entry'. | 122 | (org-get-entry): Rename from `org-get-cleaned-entry'. |
| 118 | (org-icalendar-cleanup-string): New function for quoting icalendar text. | 123 | (org-icalendar-cleanup-string): New function for quoting icalendar text. |
| 119 | (org-agenda-skip-scheduled-if-done): New option. | 124 | (org-agenda-skip-scheduled-if-done): New option. |
| 120 | (org-agenda-get-scheduled, org-agenda-get-blocks): | 125 | (org-agenda-get-scheduled, org-agenda-get-blocks): |
| @@ -123,7 +128,7 @@ | |||
| 123 | (org-entry-properties): Add CATEGORY as a special property. | 128 | (org-entry-properties): Add CATEGORY as a special property. |
| 124 | (org-use-property-inheritance): Allow a list of properties as a value. | 129 | (org-use-property-inheritance): Allow a list of properties as a value. |
| 125 | (org-eval-in-calendar): No longer update the prompt. | 130 | (org-eval-in-calendar): No longer update the prompt. |
| 126 | (org-read-date-popup-calendar): Renamed from | 131 | (org-read-date-popup-calendar): Rename from |
| 127 | `org-popup-calendar-for-date-prompt'. | 132 | `org-popup-calendar-for-date-prompt'. |
| 128 | (org-read-date-display-live): New variable. | 133 | (org-read-date-display-live): New variable. |
| 129 | (org-read-date-display): New function. | 134 | (org-read-date-display): New function. |
diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 23bf4096e93..ba4aadb1e6b 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el | |||
| @@ -100,10 +100,9 @@ | |||
| 100 | ;;; Todo: | 100 | ;;; Todo: |
| 101 | 101 | ||
| 102 | ;; - better menu. | 102 | ;; - better menu. |
| 103 | ;; - don't use `find-file'. | ||
| 104 | ;; - Bind slicing to a drag event. | 103 | ;; - Bind slicing to a drag event. |
| 105 | ;; - doc-view-fit-doc-to-window and doc-view-fit-window-to-doc. | 104 | ;; - doc-view-fit-doc-to-window and doc-view-fit-window-to-doc. |
| 106 | ;; - zoom a the region around the cursor (like xdvi). | 105 | ;; - zoom the region around the cursor (like xdvi). |
| 107 | ;; - get rid of the silly arrow in the fringe. | 106 | ;; - get rid of the silly arrow in the fringe. |
| 108 | ;; - improve anti-aliasing (pdf-utils gets it better). | 107 | ;; - improve anti-aliasing (pdf-utils gets it better). |
| 109 | 108 | ||
| @@ -558,13 +557,16 @@ Should be invoked when the cached images aren't up-to-date." | |||
| 558 | (defun doc-view-pdf/ps->png (pdf-ps png) | 557 | (defun doc-view-pdf/ps->png (pdf-ps png) |
| 559 | "Convert PDF-PS to PNG asynchronously." | 558 | "Convert PDF-PS to PNG asynchronously." |
| 560 | (setq doc-view-current-converter-process | 559 | (setq doc-view-current-converter-process |
| 561 | (apply 'start-process | 560 | ;; Make sure the process is started in an existing directory, |
| 562 | (append (list "pdf/ps->png" doc-view-conversion-buffer | 561 | ;; (rather than some file-name-handler-managed dir, for example). |
| 563 | doc-view-ghostscript-program) | 562 | (let ((default-directory (file-name-directory pdf-ps))) |
| 564 | doc-view-ghostscript-options | 563 | (apply 'start-process |
| 565 | (list (format "-r%d" (round doc-view-resolution))) | 564 | (append (list "pdf/ps->png" doc-view-conversion-buffer |
| 566 | (list (concat "-sOutputFile=" png)) | 565 | doc-view-ghostscript-program) |
| 567 | (list pdf-ps))) | 566 | doc-view-ghostscript-options |
| 567 | (list (format "-r%d" (round doc-view-resolution))) | ||
| 568 | (list (concat "-sOutputFile=" png)) | ||
| 569 | (list pdf-ps)))) | ||
| 568 | mode-line-process (list (format ":%s" doc-view-current-converter-process))) | 570 | mode-line-process (list (format ":%s" doc-view-current-converter-process))) |
| 569 | (process-put doc-view-current-converter-process | 571 | (process-put doc-view-current-converter-process |
| 570 | 'buffer (current-buffer)) | 572 | 'buffer (current-buffer)) |
| @@ -705,13 +707,23 @@ ARGS is a list of image descriptors." | |||
| 705 | (when doc-view-pending-cache-flush | 707 | (when doc-view-pending-cache-flush |
| 706 | (clear-image-cache) | 708 | (clear-image-cache) |
| 707 | (setq doc-view-pending-cache-flush nil)) | 709 | (setq doc-view-pending-cache-flush nil)) |
| 708 | (let ((image (apply 'create-image file 'png nil args))) | 710 | (if (null file) |
| 709 | (setq doc-view-current-image image) | 711 | ;; We're trying to display a page that doesn't exist. Typically happens |
| 710 | (move-overlay doc-view-current-overlay (point-min) (point-max)) | 712 | ;; if the conversion process somehow failed. Better not signal an |
| 711 | (overlay-put doc-view-current-overlay 'display | 713 | ;; error here because it could prevent a subsequent reconversion from |
| 712 | (if doc-view-current-slice | 714 | ;; fixing the problem. |
| 713 | (list (cons 'slice doc-view-current-slice) image) | 715 | (progn |
| 714 | image)))) | 716 | (setq doc-view-current-image nil) |
| 717 | (move-overlay doc-view-current-overlay (point-min) (point-max)) | ||
| 718 | (overlay-put doc-view-current-overlay 'display | ||
| 719 | "Cannot display this page! Probably a conversion failure!")) | ||
| 720 | (let ((image (apply 'create-image file 'png nil args))) | ||
| 721 | (setq doc-view-current-image image) | ||
| 722 | (move-overlay doc-view-current-overlay (point-min) (point-max)) | ||
| 723 | (overlay-put doc-view-current-overlay 'display | ||
| 724 | (if doc-view-current-slice | ||
| 725 | (list (cons 'slice doc-view-current-slice) image) | ||
| 726 | image))))) | ||
| 715 | 727 | ||
| 716 | (defun doc-view-sort (a b) | 728 | (defun doc-view-sort (a b) |
| 717 | "Return non-nil if A should be sorted before B. | 729 | "Return non-nil if A should be sorted before B. |
| @@ -952,9 +964,12 @@ toggle between displaying the document or editing it as text." | |||
| 952 | (file-name-nondirectory | 964 | (file-name-nondirectory |
| 953 | (file-name-sans-extension buffer-file-name)) | 965 | (file-name-sans-extension buffer-file-name)) |
| 954 | doc-view-cache-directory)) | 966 | doc-view-cache-directory)) |
| 955 | ((or | 967 | ;; Is the file readable by local processes? |
| 956 | (not (file-exists-p buffer-file-name)) | 968 | ;; We used to use `file-remote-p' but it's unclear what it's |
| 957 | (file-remote-p buffer-file-name)) | 969 | ;; supposed to return nil for things like local files accessed via |
| 970 | ;; `su' or via file://... | ||
| 971 | ((let ((file-name-handler-alist nil)) | ||
| 972 | (not (file-readable-p buffer-file-name))) | ||
| 958 | (expand-file-name | 973 | (expand-file-name |
| 959 | (file-name-nondirectory buffer-file-name) | 974 | (file-name-nondirectory buffer-file-name) |
| 960 | doc-view-cache-directory)) | 975 | doc-view-cache-directory)) |