diff options
Diffstat (limited to 'lib/eos/jao-afio.el')
| -rw-r--r-- | lib/eos/jao-afio.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/eos/jao-afio.el b/lib/eos/jao-afio.el index a5d9b24..162a1b7 100644 --- a/lib/eos/jao-afio.el +++ b/lib/eos/jao-afio.el @@ -1,6 +1,6 @@ ;;; jao-afio.el --- workspaces in just one frame -*- lexical-binding: t; -*- -;; Copyright (C) 2020, 2021, 2022, 2024 jao +;; Copyright (C) 2020, 2021, 2022, 2024, 2025 jao ;; Author: jao <mail@jao.io> ;; Keywords: frames @@ -41,7 +41,7 @@ (interactive) (jao-afio--current-config ?c) (if jao-afio-use-frames - (set-frame-name "W1") + (set-frame-name (jao-afio-frame-name ?c)) (window-configuration-to-register ?c))) (defun jao-afio--check-frame () @@ -71,12 +71,11 @@ ;;;###autoload (defun jao-afio-open-pdf-session (&optional docs) (interactive) - (let ((jao-doc-session-inhibit-save t)) - (dolist (doc (or docs (jao-doc-session))) - (when (and doc (file-exists-p doc)) - (if (jao-pdf-is-pdf-file doc) (jao-open-doc doc) (find-file doc)) - (other-window 1))) - (other-window 1))) + (dolist (doc (or docs (jao-doc-session))) + (when (and doc (file-exists-p doc)) + (if (jao-pdf-is-pdf-file doc) (jao-open-doc doc) (find-file doc)) + (other-window 1))) + (other-window 1)) (defun jao-afio-open-doc () (interactive) @@ -86,7 +85,7 @@ (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-let (docs (jao-doc-session)) (when (y-or-n-p (format "Load saved session? (%d docs)" (length docs))) (jao-afio-open-pdf-session docs)))))) @@ -96,7 +95,7 @@ (declare-function jao-eww-session-load "jao-eww-session") (defun jao-afio--open-eww-session () - (if-let* ((b (jao-eww-session-eww-buffers))) + (if-let (b (jao-eww-session-eww-buffers)) (switch-to-buffer (car b)) (jao-eww-session-load))) @@ -122,10 +121,10 @@ ;;;###autoload (defun jao-afio-open-gnus () (interactive) - (delete-other-windows) (jao-org-agenda) (calendar) (find-file (expand-file-name "inbox.org" org-directory)) + (delete-other-windows) (gnus) (jao-gnus--set-summary-line)) @@ -196,7 +195,7 @@ (select-frame-set-input-focus (or f (make-frame))) (when (setq reset (or reset (not f))) (set-frame-name - (format "W%s" (or (jao-afio-frame-no next) next))))) + (format "%s" (or (jao-afio-frame-name next) next))))) (window-configuration-to-register (jao-afio--current-config)) (when (and (not reset) (get-register next)) (ignore-errors (jump-to-register next))) @@ -228,7 +227,7 @@ (defun jao-afio-goto-scratch (&optional one-win) (interactive "P") - (jao-afio--goto-frame ?s nil) + (jao-afio--goto-frame ?s one-win) (when one-win (delete-other-windows))) (defun jao-afio-goto-chats (&optional reset) |
