[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/doc-toc 102e14199c 65/84: pdf.tocgen replace original p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/doc-toc 102e14199c 65/84: pdf.tocgen replace original pdf, and show message on fail |
Date: |
Mon, 26 Sep 2022 13:58:39 -0400 (EDT) |
branch: externals/doc-toc
commit 102e14199c973f0b832880a33247794902003304
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
pdf.tocgen replace original pdf, and show message on fail
---
toc-mode.el | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/toc-mode.el b/toc-mode.el
index bf8cfa3c4c..c7d9f979d6 100644
--- a/toc-mode.el
+++ b/toc-mode.el
@@ -312,8 +312,15 @@ named output.pdf and opened in a new buffer. Don't forget
to
rename this new file."
(interactive)
(write-file default-directory)
- (shell-command (format "pdftocio -o output.pdf '%s' < toc" pdf-filename))
- (find-file "output.pdf"))
+ (let* ((message (shell-command-to-string (format "pdftocio '%s' < toc"
pdf-filename))))
+ (kill-buffer-if-not-modified (find-file pdf-filename))
+ (when (file-exists-p (concat (file-name-base pdf-filename) "_out.pdf"))
+ (delete-file pdf-filename)
+ (rename-file (concat (file-name-base pdf-filename) "_out.pdf")
pdf-filename))
+ (find-file pdf-filename)
+ (unless (string= message "")
+ (message (concat "The pdftocio command returned the following message:
\n\n" message)))))
+
(defvar toc-pdftocgen-mode-map
(let ((map (make-sparse-keymap)))
- [elpa] externals/doc-toc 0c9a7a484f 09/84: Update README with link to djvulibre website, (continued)
- [elpa] externals/doc-toc 0c9a7a484f 09/84: Update README with link to djvulibre website, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 559e7bbf3d 13/84: Implement extract with tesseract ocr, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 97c0ce5c40 19/84: Implement from tabular jump to/scroll page for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 2b6045b0a3 22/84: minor additions i.e. autoload comment and docstrings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc dda3491299 34/84: Fix djvu parse tablist to djvused algorithm, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc e84c00c923 45/84: Fix/remove ask for path before add TOC djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc eb8c6a0c00 56/84: Fix seq and cl compiler warnings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 05b6d034aa 59/84: Fix djvu/pdf hard dependency (github issue #3), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 8d4817a543 62/84: Fix org-noter conflict (github #4), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc a14dbb4c25 67/84: Fix beginning-of-buffer compilation warning, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 102e14199c 65/84: pdf.tocgen replace original pdf, and show message on fail,
ELPA Syncer <=
- [elpa] externals/doc-toc 4c9ce0f54d 76/84: Fix: eval-when-compile pdf-tools, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 2ec9515f0d 81/84: Apply patch S. Monnier, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc ca80abf2f8 83/84: Update name to doc-toc (i.e. make doc-tools extension), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 3d286633a9 11/84: Update README, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 3acf45b0f7 18/84: Implement C-c C-c functionality also for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 74c68f0cda 24/84: Update README.org, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f8fbca0c41 23/84: README add features and keybindings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f643745b06 32/84: Set windows encoding for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc c521029525 36/84: Change (beginning-og-buffer) to (goto-char (point-min)) for MELPA, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc a1d26eceb5 37/84: Add defvar and declare-function to avoid warning MELPA, ELPA Syncer, 2022/09/26