diff options
| author | jao <jao@gnu.org> | 2026-11-27 22:59:47 +0000 |
|---|---|---|
| committer | jao <jao@gnu.org> | 2026-11-27 22:59:47 +0000 |
| commit | bca51e1655d5a305745b7826cf5134f37f6a960a (patch) | |
| tree | 47fa78d6fa69e004f412087722583b2efac1e95d /custom/jao-custom-pdf.el | |
| parent | 307f2adf232ab89325549346aadab69ed1702b8d (diff) | |
| download | elibs-bca51e1655d5a305745b7826cf5134f37f6a960a.tar.gz elibs-bca51e1655d5a305745b7826cf5134f37f6a960a.tar.bz2 | |
afio refactorings
Diffstat (limited to 'custom/jao-custom-pdf.el')
| -rw-r--r-- | custom/jao-custom-pdf.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/custom/jao-custom-pdf.el b/custom/jao-custom-pdf.el index cbe74ef..f42546b 100644 --- a/custom/jao-custom-pdf.el +++ b/custom/jao-custom-pdf.el @@ -78,6 +78,23 @@ ("S" . jao-doc-session-save) ("u" . jao-doc-view-visit-url))) +;;;; afio +(defvar jao-pdf-afio-left-width nil) + +(defun jao-afio-open-doc () + (interactive) + (delete-other-windows) + (split-window-right jao-pdf-afio-left-width) + (let ((docs (cl-remove-if-not 'jao-doc-session-is-doc (buffer-list)))) + (if (car docs) + (progn (switch-to-buffer (car docs)) + (switch-to-buffer-other-window (or (cadr docs) (car docs)))) + (when-let* ((docs (jao-doc-session))) + (when (y-or-n-p (format "Load saved session? (%d docs)" (length docs))) + (jao-pdf-open-session docs)))))) + +(setq jao-afio-open-doc #'jao-afio-open-doc) + ;;;; transient (defun jao-org-pdf-goto-org-linking () (interactive) |
