From 1a9bf87a43a8d3c5e8fd2b30fc7d6ac696be7ef5 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 20 May 2022 13:24:01 +0100 Subject: avoiding eww session reopening --- eww.org | 3 +-- lib/net/jao-eww-session.el | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/eww.org b/eww.org index 56203bc..4a9dd71 100644 --- a/eww.org +++ b/eww.org @@ -110,8 +110,7 @@ * Sessions #+begin_src emacs-lisp (use-package jao-eww-session - :custom ((jao-eww-session-duplicate-tabs 'ask) - (jao-eww-session-file "~/.emacs.d/cache/eww-session.eld"))) + :custom ((jao-eww-session-file "~/.emacs.d/cache/eww-session.eld"))) #+end_src * Package #+begin_src emacs-lisp diff --git a/lib/net/jao-eww-session.el b/lib/net/jao-eww-session.el index ac9691b..9a34656 100644 --- a/lib/net/jao-eww-session.el +++ b/lib/net/jao-eww-session.el @@ -135,7 +135,10 @@ the session is already displayed in a eww tab, jao-eww-session can: (with-current-buffer b (when-let (url (jao-eww--current-url)) (when (member url urls) - (or (eq jao-eww-session-duplicate-tabs 'never) + (when (y-or-n-p "Already open session, abort? ") + (switch-to-buffer b) + (user-error "Aborted")) + (or (and (eq jao-eww-session-duplicate-tabs 'never)) (not (y-or-n-p (format "'%s' (%s) is already open. Duplicate? " (jao-eww-buffer-title) url)))))))) (jao-eww-session--list-buffers))) -- cgit v1.2.3