[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/doc-toc dc5be6442f 66/84: Add jump-by-level to toc-tabu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/doc-toc dc5be6442f 66/84: Add jump-by-level to toc-tabular-mode |
Date: |
Mon, 26 Sep 2022 13:58:39 -0400 (EDT) |
branch: externals/doc-toc
commit dc5be6442ffa3eac5742d6a7854194b1eb197d5d
Author: Daniel Nicolai <dalanicolai@gmail.com>
Commit: Daniel Nicolai <dalanicolai@gmail.com>
Add jump-by-level to toc-tabular-mode
---
README.org | 10 +++++++---
toc-mode.el | 9 +++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/README.org b/README.org
index e343f59dbd..f0932cc197 100644
--- a/README.org
+++ b/README.org
@@ -127,9 +127,12 @@ keys will shift =down/up= all the page numbers from the
current line and below
The =TAB= key jumps to the pagenumber of the current line, while
=C-right/C-left=
will shift all remaining page numbers up/down while jumping/scrolling to the
-line its page in the document window. to the =S-up/S-donw= in the tablist
window
-will just scroll page up/down in the document window and, only for pdf,
=C-up/C-down=
-will scroll smoothly in that window.
+line its page in the document window. Because the numbering of scanned books
+often breaks at sections of a certain level, =C-j= will let jo jump quickly to
the
+next entry of a certain level (e.g. you can quickly check if the page numbers
of
+all level 0 sections correspond to the page numbers in the document). The
+=S-up/S-down= in the tablist window will just scroll page up/down in the
document
+window and, =C-up/C-down= will scroll smoothly in that window.
Type =C-c C-c= when done.
@@ -174,6 +177,7 @@ toc-mode (tablist)
| ~S-right/S-left~ | in/decrease pagenumber current entry
|
| ~C-down/C-up~ | scroll document other window (only when other buffer
shows document) |
| ~S-down/S-up~ | full page scroll document other window ( idem )
|
+| =C-j= | toc--jump-to-next-entry-by-level
|
* Alternatives
diff --git a/toc-mode.el b/toc-mode.el
index c7d9f979d6..8887f4182b 100644
--- a/toc-mode.el
+++ b/toc-mode.el
@@ -753,6 +753,14 @@ Prompt for startpage and endpage and print OCR output to
new buffer."
((string= ".djvu" ext) (djvu-scroll-down-or-previous-page))))
(other-window 1))
+(defun toc--jump-to-next-entry-by-level (char)
+ (interactive "cJump to next entry of level: ")
+ (forward-line)
+ (let ((level (char-to-string char)))
+ (while (not (or (string= (aref (tabulated-list-get-entry) 0) level)
(eobp)))
+ (forward-line)))
+ (toc--tablist-follow))
+
(defvar toc-tabular-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [right] #'toc--increase-remaining)
@@ -766,6 +774,7 @@ Prompt for startpage and endpage and print OCR output to
new buffer."
(define-key map [S-up] #'toc--scroll-other-window-page-down)
(define-key map [C-down] #'toc--scroll-pdf-other-window-down)
(define-key map [C-up] #'toc--scroll-pdf-other-window-up)
+ (define-key map "\C-j" #'toc--jump-to-next-entry-by-level)
(define-key map "\C-c\C-c" #'toc--tablist-to-toc-source)
(define-key map "\C-c\C-c" #'toc--tablist-to-toc-source)
(when (featurep 'evil-commands)
- [elpa] externals/doc-toc a510f530cb 33/84: Merge branch 'master' of github.com:dalanicolai/toc-mode, (continued)
- [elpa] externals/doc-toc a510f530cb 33/84: Merge branch 'master' of github.com:dalanicolai/toc-mode, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 6eafd64b9e 38/84: Add # to tell compiler about function reference (for MELPA), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc c39306dad7 41/84: Fix docstrings with checkdoc (for MELPA), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc e52b2d8ee3 44/84: Improve some (add-to-document) docstrings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 7a436b0ca3 46/84: Remove info about limited level deepness for djvu, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 1602e353b0 49/84: Improve parsing djvu outline (prin1-to-string), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc a11b2caa88 51/84: Add paypal donate link, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 7e50cc20d0 53/84: Implement extract-only, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 10b254ef2c 58/84: Fix auto pagenumber contents OCR, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 8c2cb1283d 60/84: Add info about pdf.tocgen alternative, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc dc5be6442f 66/84: Add jump-by-level to toc-tabular-mode,
ELPA Syncer <=
- [elpa] externals/doc-toc 06de33f511 70/84: Fix pdf-view-current-page macro not function, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc a0018b8a63 71/84: Add replace fields in toc-tabular-mode feature, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc f2ea7db226 68/84: Fix all checkdoc warnings, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 487177a81b 73/84: Update package description, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 36fe728f38 72/84: Make tesseract psm code configurable via universal arg, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc d5629c7165 75/84: Update djvu ocr to djvu3.el (create ppm instead of svg), ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc a259f4cc65 77/84: Correct docstring position, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc 0671d11654 78/84: Merge pull request #8 from syohex/docstring, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc cf6b12ca35 79/84: Fix #10: prevent pdf-filename become nil, ELPA Syncer, 2022/09/26
- [elpa] externals/doc-toc b4bb748aa3 84/84: Fix README (remove repeated section), ELPA Syncer, 2022/09/26