emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/activities 910f70ea8f 2/2: Release: v0.6


From: ELPA Syncer
Subject: [elpa] externals-release/activities 910f70ea8f 2/2: Release: v0.6
Date: Mon, 4 Mar 2024 21:57:21 -0500 (EST)

branch: externals-release/activities
commit 910f70ea8ff7a5d25adf34d50ea0a2d43f3cb6a6
Merge: 12e2c3a29b 7db998d883
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>

    Release: v0.6
---
 README.org         |  26 ++++++--
 activities-list.el |   2 +-
 activities-tabs.el |  71 +++++++++++++++++++-
 activities.el      | 115 ++++++++++++++++++++++++++++-----
 activities.info    | 185 +++++++++++++++++++++++++++++++++--------------------
 5 files changed, 309 insertions(+), 90 deletions(-)

diff --git a/README.org b/README.org
index 86685b7a88..fc91b0b152 100644
--- a/README.org
+++ b/README.org
@@ -2,11 +2,13 @@
 
 
[[https://elpa.gnu.org/packages/activities.html][file:https://elpa.gnu.org/packages/activities.svg]]
 
-Inspired by Genera's and KDE's concepts of "activities", this library allows 
the user to select an "activity", the loading of which restores a window 
configuration into a ~tab-bar~ tab or frame, along with the buffers shown in 
each window.  Saving an activity saves the state for later restoration.  
Switching away from an activity saves the last-used state for later switching 
back to, while still allowing the activity's initial or default state to be 
restored on demand.  Resuming an activ [...]
+Inspired by Genera's and KDE's concepts of "activities", this Emacs library 
allows the user to manage frames/tabs, windows, and buffers according to their 
purpose.  An "activity" comprises a frame or tab, its window configuration, and 
the buffers displayed in them--its "state"; this state would be related to a 
certain task the user performs at various times, such as developing a certain 
software project, reading and writing email, working with one's Org mode 
system, etc.
 
-The implementation uses the bookmark system to save buffers' states--that is, 
any major mode that supports the bookmark system is compatible.  A buffer whose 
major mode does not support the bookmark system (or does not support it well 
enough to restore useful state) is not compatible and can't be fully restored, 
or perhaps not at all; but solving that is as simple as implementing bookmark 
support for the mode, which is usually trivial.
+"Suspending" an activity saves the activity's state and closes its frame/tab; 
the user would do this when finished with the activity's task for the time 
being.  "Resuming" the activity restores its buffers and windows to its 
frame/tab; the user would do this when ready to resume the task at a later 
time.  This saves the user from having to manually arrange the same windows and 
buffers each time the task is to be done.
 
-Integration with Emacs's ~tab-bar-mode~ is provided: a window configuration or 
can be restored to a ~tab-bar~ tab or to a frame.
+Each activity saves two states: the default state, set when the activity is 
defined by the user, and the last-used state, which was how the user left it 
when the activity was suspended (or when Emacs exited, etc).  This allows the 
user to resume the activity where the task was left off, while also allowing it 
to be reverted to the default state, providing a consistent entry point into 
the activity.
+
+Internally, the Emacs ~bookmark~ library is used to save and restore buffers' 
states--that is, any major mode that supports the bookmark system is 
compatible.  A buffer whose major mode does not support the bookmark system (or 
does not support it well enough to restore useful state) is not compatible and 
can't be fully restored, or perhaps not at all; but solving that is as simple 
as implementing bookmark support for the mode, which is often trivial.
 
 Various hooks are (or will be--feedback is welcome) provided, both globally 
and per-activity, so that the user can define functions to be called when an 
activity is saved, restored, or switched from/to.  For example, this could be 
used to limit the set of buffers offered for switching to within an activity, 
or to track the time spent in an activity.
 
@@ -64,6 +66,7 @@ This is the recommended configuration, in terms of a 
~use-package~ form to be pl
      ("C-x C-a C-k" . activities-kill)
      ;; This binding mirrors, e.g. "C-x t RET".
      ("C-x C-a RET" . activities-switch)
+     ("C-x C-a b" . activities-switch-buffer)
      ("C-x C-a g" . activities-revert)
      ("C-x C-a l" . activities-list)))
 #+END_SRC
@@ -115,6 +118,8 @@ Key bindings are, as always, ultimately up to the user.  
However, in [[Configura
 + ~activities-resume~ (~C-x C-a C-a~) :: Resume an activity, switching to a 
new frame or tab for its window configuration, and restoring its buffers.  With 
prefix argument, restore its default state rather than its last.
 + ~activities-revert~ (~C-x C-a g~) :: Revert an activity to its default state.
 + ~activities-switch~ (~C-x C-a RET~) :: Switch to an already-active activity.
++ ~activities-switch-buffer~ (~C-x C-a b~) :: Switch to a buffer associated 
with the current activity (or, with prefix argument, another activity).
++ ~activities-rename~ :: Rename an activity.
 + ~activities-discard~ :: Discard an activity permanently.
 + ~activities-save-all~ :: Save all active activities' states.  
(~activities-mode~ does this automatically, so this command should rarely be 
needed.)
 
@@ -126,7 +131,7 @@ When option ~activities-bookmark-store~ is enabled, an 
Emacs bookmark is stored
 
 + How is this different from 
[[https://github.com/alphapapa/burly.el][Burly.el]] or 
[[https://github.com/alphapapa/bufler.el/][Bufler.el]]? :: Burly is a 
well-polished tool for restoring window and frame configurations, which could 
be considered an incubator for some of the ideas furthered here.  Bufler's 
~bufler-workspace~ library uses Burly to provide some similar functionality, 
which is at an exploratory stage.  ~activities~ hopes to provide a longer-term 
solution more suitable for in [...]
 
-+ How does this differ from "workspace" packages? :: Yes, there are many Emacs 
packages that provide "workspace"-like features in one way or another.  To 
date, only Burly and Bufler seem to offer the ability to restore one across 
Emacs sessions.  As mentioned, ~activities~ is intended to be more refined and 
easier to use (e.g. automatically saving activities' states when 
~activities-mode~ is enabled).  Comparisons to other packages are left to the 
reader; suffice to say that ~activities~ [...]
++ How does this differ from "workspace" packages? :: Yes, there are many Emacs 
packages that provide "workspace"-like features in one way or another.  To 
date, only Burly and Bufler seem to offer the ability to restore one across 
Emacs sessions, including non-file-backed buffers.  As mentioned, ~activities~ 
is intended to be more refined and easier to use (e.g. automatically saving 
activities' states when ~activities-mode~ is enabled).  Comparisons to other 
packages are left to the reade [...]
 
 + How does this differ from the built-in ~desktop-mode~? :: As best this 
author can tell, ~desktop-mode~ saves and restores one set of buffers, with 
various options to control its behavior.  It does not use ~bookmark~ 
internally, which prevents it from restoring non-file-backed buffers.  As well, 
it is not intended to be used on-demand to switch between sets of buffers, 
windows, or frames (i.e. "activities").
 
@@ -138,6 +143,19 @@ When option ~activities-bookmark-store~ is enabled, an 
Emacs bookmark is stored
 
 * Changelog
 
+** v0.6
+
+*Additions*
++ Command ~activities-switch-buffer~ switches to a buffer associated with the 
current activity (or, with prefix argument, another activity).  (A buffer is 
considered to be associated with an activity if it has been displayed in its 
tab.  Note that this feature currently requires ~activities-tabs-mode~.)
++ Command ~activities-rename~ renames an activity.
++ Option ~activities-after-switch-functions~, a hook called after switching to 
an activity.
++ Option ~activities-set-frame-name~ sets the frame name after switching to an 
activity.  ([[https://github.com/alphapapa/activities.el/issues/33][#33]].  
Thanks to [[https://github.com/jdtsmith][JD Smith]].)
++ Option ~activities-kill-buffers~, when suspending an activity, kills buffers 
that were only shown in that activity.
+
+*Changes*
++ Default time format in activities list.
++ When saving all activities, don't persist to disk for each activity.  
([[https://github.com/alphapapa/activities.el/issues/34][#34]].  Thanks to 
[[https://github.com/yrns][Al M.]] for reporting.)
+
 ** v0.5.1
 
 *Fixes*
diff --git a/activities-list.el b/activities-list.el
index f1ca384c0d..0a4529b50f 100644
--- a/activities-list.el
+++ b/activities-list.el
@@ -32,7 +32,7 @@
   "Activities list buffer."
   :group 'activities)
 
-(defcustom activities-list-time-format "%c"
+(defcustom activities-list-time-format "%Y-%m-%d %H:%M:%S"
   "Time format for `activities-list' buffer."
   :type 'string)
 
diff --git a/activities-tabs.el b/activities-tabs.el
index 8e02fc62a0..fdeefa442e 100644
--- a/activities-tabs.el
+++ b/activities-tabs.el
@@ -35,6 +35,8 @@
   "Records the original value of `tab-bar-tab-face-function'.
 When `activities-tabs-mode' is enabled.")
 
+(defvar activities-kill-buffers)
+
 ;;;; Customization
 
 (defgroup activities-tabs nil
@@ -67,10 +69,12 @@ accordingly."
                         (activities--set . activities-tabs-activity--set)
                         (activities--switch . activities-tabs--switch)
                         (activities-current . activities-tabs-current)
-                        (activities-close . activities-tabs-close))))
+                        (activities-close . activities-tabs-close)
+                        (activities-switch-buffer . 
activities-tabs--switch-buffer))))
     (if activities-tabs-mode
         (progn
           (tab-bar-mode 1)
+          (add-hook 'window-configuration-change-hook 
#'activities-tabs--window-configuration-change)
           (advice-add #'activities-resume :before 
#'activities-tabs-before-resume)
           (pcase-dolist (`(,symbol . ,function) override-map)
             (advice-add symbol :override function))
@@ -83,6 +87,7 @@ accordingly."
           (unless activities-tabs-tab-bar-tab-face-function-original
             (setf activities-tabs-tab-bar-tab-face-function-original 
tab-bar-tab-face-function
                   tab-bar-tab-face-function 
#'activities-tabs--tab-bar-tab-face-function)))
+      (remove-hook 'window-configuration-change-hook 
#'activities-tabs--window-configuration-change)
       (advice-remove #'activities-resume #'activities-tabs-before-resume)
       (pcase-dolist (`(,symbol . ,function) override-map)
         (advice-remove symbol function))
@@ -90,6 +95,42 @@ accordingly."
         (setf tab-bar-tab-face-function 
activities-tabs-tab-bar-tab-face-function-original
               activities-tabs-tab-bar-tab-face-function-original nil)))))
 
+;;;; Commands
+
+(defun activities-tabs--switch-buffer (activity)
+  "Switch to a buffer associated with ACTIVITY.
+Interactively, select from buffers associated with ACTIVITY; or,
+with prefix argument, choose another activity."
+  (interactive
+   (list (if current-prefix-arg
+             (activities-completing-read)
+           (or (activities-current) (activities-completing-read)))))
+  ;; Much code borrowed from `read-buffer-to-switch', which see.
+  (let* ((tab (activities-tabs--tab activity))
+         (activity-buffers (activities-tabs--tab-parameter 
'activities-buffer-list tab))
+         (current-buffer-name (buffer-name (current-buffer)))
+         (rbts-completion-table
+          (apply-partially
+           #'completion-table-with-predicate
+          #'internal-complete-buffer
+          (lambda (buffer-name)
+             (let ((buffer-name (if (consp buffer-name) (car buffer-name) 
buffer-name)))
+               (and (not (equal buffer-name current-buffer-name))
+                    (cl-member buffer-name activity-buffers :key 
#'buffer-name))))
+          nil))
+         (selected-buffer
+          (minibuffer-with-setup-hook
+              (lambda ()
+                (setq-local minibuffer-completion-table rbts-completion-table)
+                (if (and (boundp 'icomplete-with-completion-tables)
+                         (listp icomplete-with-completion-tables))
+                    (setq-local icomplete-with-completion-tables
+                                (cons rbts-completion-table
+                                      icomplete-with-completion-tables))))
+            (read-buffer "Switch to activity buffer:" (other-buffer 
(current-buffer))
+                         (confirm-nonexistent-file-or-buffer)))))
+    (switch-to-buffer selected-buffer)))
+
 ;;;; Functions
 
 (cl-defun activities-tabs-close (activity)
@@ -97,8 +138,36 @@ accordingly."
 Its state is not saved, and its frames, windows, and tabs are
 closed."
   (activities--switch activity)
+  (activities-tabs--kill-buffers)
   (tab-bar-close-tab))
 
+(defun activities-tabs--window-configuration-change ()
+  "Add frame's windows' buffers to the current tab's `buffer-list' parameter."
+  (cl-assert tab-bar-mode)
+  (let ((tab (tab-bar--current-tab-find)))
+    (walk-windows (lambda (window)
+                    (cl-pushnew (window-buffer window)
+                                (alist-get 'activities-buffer-list (cdr 
tab)))))))
+
+(defun activities-tabs--kill-buffers ()
+  ;; TODO: Frame parameter name should be prefixed with `activities'.
+  "Kill buffers that are only in the current tab's buffer list.
+Only does so when `activities-kill-buffers' is non-nil."
+  (when activities-kill-buffers
+    (let* ((all-tabs (funcall tab-bar-tabs-function))
+           (current-tab (tab-bar--current-tab-find))
+           (tab-buffers
+            (cl-reduce
+             (lambda (acc tab)
+               (seq-difference acc (activities-tabs--tab-parameter 
'activities-buffer-list tab)))
+             (remove current-tab all-tabs)
+             :initial-value (activities-tabs--tab-parameter 
'activities-buffer-list current-tab)))
+           (target-buffers (cl-remove-if (lambda (buffer)
+                                           (run-hook-with-args-until-success
+                                            'activities-anti-kill-predicates 
buffer))
+                                         tab-buffers)))
+      (mapc #'kill-buffer target-buffers))))
+
 (defun activities-tabs--switch (activity)
   "Switch to ACTIVITY.
 Selects its tab, making one if needed.  Its state is not changed."
diff --git a/activities.el b/activities.el
index a891739b90..d86d26c6d8 100644
--- a/activities.el
+++ b/activities.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Adam Porter <adam@alphapapa.net>
 ;; URL: https://github.com/alphapapa/activities.el
 ;; Keywords: convenience
-;; Version: 0.5.1
+;; Version: 0.6
 ;; Package-Requires: ((emacs "29.1") (persist "0.6"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -266,6 +266,11 @@ Called with one argument, the activity."
 Called with one argument, the activity."
   :type 'hook)
 
+(defcustom activities-after-switch-functions nil
+  "Functions called after switching to an activity.
+Called with one argument, the activity."
+  :type 'hook)
+
 (defcustom activities-default-name-fn 'activities--project-name
   "Function that returns the default name for a new activity.
 The string should not be prefixed by, e.g. \"Activity\" because
@@ -274,6 +279,22 @@ prefixes will be added automatically."
                  (const :tag "Current project's name" activities--project-name)
                  (function-item :tag "Other function")))
 
+(defcustom activities-set-frame-name t
+  "Set frame name after switching activity.
+Only applies when `activities-tabs-mode' is disabled."
+  :type 'boolean)
+
+(defcustom activities-anti-kill-predicates
+  '(activities-buffer-hidden-p activities-buffer-special-p)
+  "Predicates which prevent a buffer from being killed.
+Used when suspending an activity and `activities-kill-buffers' is
+enabled.  Each predicate is called with the buffer as its
+argument.  If any predicate returns non-nil, the buffer is not
+killed."
+  :type '(set (function-item activities-buffer-special-p)
+              (function-item activities-buffer-hidden-p)
+              (function :tag "Other predicate")))
+
 (defcustom activities-anti-save-predicates
   '(active-minibuffer-window activities--backtrace-visible-p)
   "Predicates which prevent an activity's state from being saved.
@@ -301,6 +322,12 @@ which will cause a message to be printed for such buffers 
when an
 activity's state is saved."
   :type 'boolean)
 
+(defcustom activities-kill-buffers nil
+  "Kill buffers when suspending an activity.
+Kills buffers that have only been shown in that activity's
+frame/tab."
+  :type 'boolean)
+
 ;;;; Commands
 
 ;;;###autoload
@@ -325,6 +352,19 @@ activity."
     (activities--switch activity)
     activity))
 
+(defun activities-rename (activity name)
+  "Rename ACTIVITY to NAME."
+  (interactive
+   (let* ((activity (activities-completing-read :prompt "Rename activity" 
:default nil))
+          (name (read-string (format "Rename activity %S to: "
+                                     (activities-activity-name activity)))))
+     (list activity name)))
+  (setf activities-activities (map-delete activities-activities
+                                          (activities-activity-name activity))
+        (activities-activity-name activity) name
+        (map-elt activities-activities name) activity)
+  (activities--persist))
+
 ;;;###autoload
 (cl-defun activities-resume (activity &key resetp)
   "Resume ACTIVITY.
@@ -346,7 +386,8 @@ Interactively, offers active activities."
    (list (activities-completing-read
           :activities (cl-remove-if-not #'activities-activity-active-p 
activities-activities :key #'cdr)
           :prompt "Switch to activity")))
-  (activities--switch activity))
+  (activities--switch activity)
+  (run-hook-with-args 'activities-after-switch-functions activity))
 
 (defun activities-suspend (activity)
   "Suspend ACTIVITY.
@@ -372,20 +413,26 @@ state will be used), and close its frame or tab."
   (activities-save activity)
   (activities-close activity))
 
-(defun activities-save-all ()
+(cl-defun activities-save-all (&key persistp)
   "Save all active activities' last states.
-In order to be safe for `kill-emacs-hook', this demotes errors."
+With PERSISTP, persist to disk (otherwise see
+`activities-always-persist').  To be safe for `kill-emacs-hook',
+this demotes errors."
   (interactive)
   (with-demoted-errors "activities-save-all: ERROR: %S"
     (dolist (activity (cl-remove-if-not #'activities-activity-active-p 
(map-values activities-activities)))
-      (let ((activities-saving-p t))
-        (activities-save activity :lastp t)))))
+      (let ((activities-saving-p t)
+            ;; Don't write to disk for each activity.
+            (activities-always-persist nil))
+        (activities-save activity :lastp t)))
+    (activities--persist persistp)))
 
 (defun activities-revert (activity)
   "Reset ACTIVITY to its default state."
   (interactive (list (activities-current)))
   (unless activity
     (user-error "No active activity"))
+  ;; TODO: Consider resetting the activity's buffers list.
   (activities-set activity :state 'default))
 
 (defun activities-discard (activity)
@@ -489,6 +536,7 @@ See option `activities-always-persist'."
 Its state is not saved, and its frames, windows, and tabs are
 closed."
   (activities--switch activity)
+  (activities--kill-buffers)
   ;; TODO: Set frame parameter when resuming.
   (delete-frame))
 
@@ -510,7 +558,8 @@ is not changed."
     ;; (I don't love this solution, largely because it only applies
     ;; when not using `activities-tabs-mode', but it will do for now.)
     (raise-frame))
-  (set-frame-name (activities-name-for activity)))
+  (when activities-set-frame-name
+    (set-frame-name (activities-name-for activity))))
 
 (defun activities--frame (activity)
   "Return ACTIVITY's frame."
@@ -654,14 +703,14 @@ activity's name is NAME."
 
 (cl-defmethod activities--deserialize ((struct activities-buffer))
   "Return buffer for `activities-buffer' STRUCT."
-  (pcase-let (((cl-struct activities-buffer bookmark filename name) struct))
-    (let ((buffer (cond (bookmark (activities--bookmark-buffer struct))
-                        (filename (activities--filename-buffer struct))
-                        (name (activities--name-buffer struct))
-                        (t (error "Activity struct is invalid: %S" struct)))))
-      (cl-assert (buffer-live-p buffer))
-      (activities-debug struct buffer)
-      buffer)))
+  (pcase-let* (((cl-struct activities-buffer bookmark filename name) struct)
+               (buffer (cond (bookmark (activities--bookmark-buffer struct))
+                             (filename (activities--filename-buffer struct))
+                             (name (activities--name-buffer struct))
+                             (t (error "Activity struct is invalid: %S" 
struct)))))
+    (cl-assert (buffer-live-p buffer))
+    (activities-debug struct buffer)
+    buffer))
 
 (defun activities--bookmark-buffer (struct)
   "Return buffer for `activities-buffer' STRUCT."
@@ -762,6 +811,42 @@ Adds `activities-name-prefix'."
                       (when (derived-mode-p 'backtrace-mode)
                         (throw :found t)))))))
 
+(defun activities--kill-buffers ()
+  ;; TODO: Frame parameter name should be prefixed with `activities'.
+  "Kill buffers that are only in the current frame's/tab's buffer list.
+Only does so when `activities-kill-buffers' is non-nil."
+  (when activities-kill-buffers
+    (let* ((frame-buffers (cl-reduce (lambda (acc frame)
+                                       (seq-difference acc (frame-parameter 
frame 'buffer-list)))
+                                     (remove (selected-frame) (frame-list))
+                                     :initial-value (frame-parameter nil 
'buffer-list)))
+           (target-buffers (cl-remove-if (lambda (buffer)
+                                           (run-hook-with-args-until-success
+                                            'activities-anti-kill-predicates 
buffer))
+                                         frame-buffers)))
+      (mapc #'kill-buffer target-buffers))))
+
+(defun activities-buffer-special-p (buffer)
+  "Return non-nil if BUFFER is special.
+That is, if its name starts with an asterisk."
+  (string-prefix-p "*" (buffer-name buffer)))
+
+(defun activities-buffer-hidden-p (buffer)
+  "Return non-nil if BUFFER is hidden.
+That is, if its name starts with a space."
+  (string-prefix-p " " (buffer-name buffer)))
+
+(defun activities-switch-buffer (_activity)
+  "Switch to a buffer associated with ACTIVITY.
+Interactively, select from buffers associated with ACTIVITY; or,
+with prefix argument, choose another activity."
+  (interactive
+   (list (if current-prefix-arg
+             (activities-completing-read)
+           (or (activities-current) (activities-completing-read)))))
+  (unless (defvar activities-tabs-mode)
+    (error "`activities-switch-buffer' currently requires 
`activities-tabs-mode'")))
+
 ;;;; Project support
 
 (declare-function project-name "project")
diff --git a/activities.info b/activities.info
index 5d96ba5668..a90e6eb4dc 100644
--- a/activities.info
+++ b/activities.info
@@ -14,26 +14,35 @@ activities.el
 file:https://elpa.gnu.org/packages/activities.svg
 (https://elpa.gnu.org/packages/activities.html)
 
-   Inspired by Genera’s and KDE’s concepts of "activities", this library
-allows the user to select an "activity", the loading of which restores a
-window configuration into a ‘tab-bar’ tab or frame, along with the
-buffers shown in each window.  Saving an activity saves the state for
-later restoration.  Switching away from an activity saves the last-used
-state for later switching back to, while still allowing the activity’s
-initial or default state to be restored on demand.  Resuming an activity
-loads the last-used state, or the initial/default state when a universal
-argument is provided.
-
-   The implementation uses the bookmark system to save buffers’
-states–that is, any major mode that supports the bookmark system is
-compatible.  A buffer whose major mode does not support the bookmark
-system (or does not support it well enough to restore useful state) is
-not compatible and can’t be fully restored, or perhaps not at all; but
-solving that is as simple as implementing bookmark support for the mode,
-which is usually trivial.
-
-   Integration with Emacs’s ‘tab-bar-mode’ is provided: a window
-configuration or can be restored to a ‘tab-bar’ tab or to a frame.
+   Inspired by Genera’s and KDE’s concepts of "activities", this Emacs
+library allows the user to manage frames/tabs, windows, and buffers
+according to their purpose.  An "activity" comprises a frame or tab, its
+window configuration, and the buffers displayed in them–its "state";
+this state would be related to a certain task the user performs at
+various times, such as developing a certain software project, reading
+and writing email, working with one’s Org mode system, etc.
+
+   "Suspending" an activity saves the activity’s state and closes its
+frame/tab; the user would do this when finished with the activity’s task
+for the time being.  "Resuming" the activity restores its buffers and
+windows to its frame/tab; the user would do this when ready to resume
+the task at a later time.  This saves the user from having to manually
+arrange the same windows and buffers each time the task is to be done.
+
+   Each activity saves two states: the default state, set when the
+activity is defined by the user, and the last-used state, which was how
+the user left it when the activity was suspended (or when Emacs exited,
+etc).  This allows the user to resume the activity where the task was
+left off, while also allowing it to be reverted to the default state,
+providing a consistent entry point into the activity.
+
+   Internally, the Emacs ‘bookmark’ library is used to save and restore
+buffers’ states–that is, any major mode that supports the bookmark
+system is compatible.  A buffer whose major mode does not support the
+bookmark system (or does not support it well enough to restore useful
+state) is not compatible and can’t be fully restored, or perhaps not at
+all; but solving that is as simple as implementing bookmark support for
+the mode, which is often trivial.
 
    Various hooks are (or will be–feedback is welcome) provided, both
 globally and per-activity, so that the user can define functions to be
@@ -70,6 +79,7 @@ Usage
 
 Changelog
 
+* v0.6: v06.
 * v0.5.1: v051.
 * v0.5: v05.
 * v0.4: v04.
@@ -156,6 +166,7 @@ to be placed in the user’s init file:
         ("C-x C-a C-k" . activities-kill)
         ;; This binding mirrors, e.g. "C-x t RET".
         ("C-x C-a RET" . activities-switch)
+        ("C-x C-a b" . activities-switch-buffer)
         ("C-x C-a g" . activities-revert)
         ("C-x C-a l" . activities-list)))
 
@@ -296,6 +307,11 @@ File: README.info,  Node: Commands,  Next: Bookmarks,  
Prev: Bindings,  Up: Usag
      Revert an activity to its default state.
 ‘activities-switch’ (‘C-x C-a RET’)
      Switch to an already-active activity.
+‘activities-switch-buffer’ (‘C-x C-a b’)
+     Switch to a buffer associated with the current activity (or, with
+     prefix argument, another activity).
+‘activities-rename’
+     Rename an activity.
 ‘activities-discard’
      Discard an activity permanently.
 ‘activities-save-all’
@@ -330,13 +346,13 @@ How is this different from Burly.el 
(https://github.com/alphapapa/burly.el) or B
 How does this differ from "workspace" packages?
      Yes, there are many Emacs packages that provide "workspace"-like
      features in one way or another.  To date, only Burly and Bufler
-     seem to offer the ability to restore one across Emacs sessions.  As
-     mentioned, ‘activities’ is intended to be more refined and easier
-     to use (e.g.  automatically saving activities’ states when
-     ‘activities-mode’ is enabled).  Comparisons to other packages are
-     left to the reader; suffice to say that ‘activities’ is intended to
-     provide what other tools haven’t, in an idiomatic, intuitive way.
-     (Feedback is welcome.)
+     seem to offer the ability to restore one across Emacs sessions,
+     including non-file-backed buffers.  As mentioned, ‘activities’ is
+     intended to be more refined and easier to use (e.g.  automatically
+     saving activities’ states when ‘activities-mode’ is enabled).
+     Comparisons to other packages are left to the reader; suffice to
+     say that ‘activities’ is intended to provide what other tools
+     haven’t, in an idiomatic, intuitive way.  (Feedback is welcome.)
 
 How does this differ from the built-in ‘desktop-mode’?
      As best this author can tell, ‘desktop-mode’ saves and restores one
@@ -378,6 +394,7 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: FAQ,  Up: Top
 
 * Menu:
 
+* v0.6: v06.
 * v0.5.1: v051.
 * v0.5: v05.
 * v0.4: v04.
@@ -392,9 +409,38 @@ File: README.info,  Node: Changelog,  Next: Development,  
Prev: FAQ,  Up: Top
 * v0.1: v01.
 
 
-File: README.info,  Node: v051,  Next: v05,  Up: Changelog
+File: README.info,  Node: v06,  Next: v051,  Up: Changelog
 
-5.1 v0.5.1
+5.1 v0.6
+========
+
+*Additions*
+   • Command ‘activities-switch-buffer’ switches to a buffer associated
+     with the current activity (or, with prefix argument, another
+     activity).  (A buffer is considered to be associated with an
+     activity if it has been displayed in its tab.  Note that this
+     feature currently requires ‘activities-tabs-mode’.)
+   • Command ‘activities-rename’ renames an activity.
+   • Option ‘activities-after-switch-functions’, a hook called after
+     switching to an activity.
+   • Option ‘activities-set-frame-name’ sets the frame name after
+     switching to an activity.  (#33
+     (https://github.com/alphapapa/activities.el/issues/33).  Thanks to
+     JD Smith (https://github.com/jdtsmith).)
+   • Option ‘activities-kill-buffers’, when suspending an activity,
+     kills buffers that were only shown in that activity.
+
+   *Changes*
+   • Default time format in activities list.
+   • When saving all activities, don’t persist to disk for each
+     activity.  (#34
+     (https://github.com/alphapapa/activities.el/issues/34).  Thanks to
+     Al M.  (https://github.com/yrns) for reporting.)
+
+
+File: README.info,  Node: v051,  Next: v05,  Prev: v06,  Up: Changelog
+
+5.2 v0.5.1
 ==========
 
 *Fixes*
@@ -403,7 +449,7 @@ File: README.info,  Node: v051,  Next: v05,  Up: Changelog
 
 File: README.info,  Node: v05,  Next: v04,  Prev: v051,  Up: Changelog
 
-5.2 v0.5
+5.3 v0.5
 ========
 
 *Additions*
@@ -444,7 +490,7 @@ File: README.info,  Node: v05,  Next: v04,  Prev: v051,  
Up: Changelog
 
 File: README.info,  Node: v04,  Next: v033,  Prev: v05,  Up: Changelog
 
-5.3 v0.4
+5.4 v0.4
 ========
 
 *Additions*
@@ -461,7 +507,7 @@ File: README.info,  Node: v04,  Next: v033,  Prev: v05,  
Up: Changelog
 
 File: README.info,  Node: v033,  Next: v032,  Prev: v04,  Up: Changelog
 
-5.4 v0.3.3
+5.5 v0.3.3
 ==========
 
 *Fixes*
@@ -475,7 +521,7 @@ File: README.info,  Node: v033,  Next: v032,  Prev: v04,  
Up: Changelog
 
 File: README.info,  Node: v032,  Next: v031,  Prev: v033,  Up: Changelog
 
-5.5 v0.3.2
+5.6 v0.3.2
 ==========
 
 Updated documentation, etc.
@@ -483,7 +529,7 @@ Updated documentation, etc.
 
 File: README.info,  Node: v031,  Next: v03,  Prev: v032,  Up: Changelog
 
-5.6 v0.3.1
+5.7 v0.3.1
 ==========
 
 *Fixes*
@@ -495,7 +541,7 @@ File: README.info,  Node: v031,  Next: v03,  Prev: v032,  
Up: Changelog
 
 File: README.info,  Node: v03,  Next: v02,  Prev: v031,  Up: Changelog
 
-5.7 v0.3
+5.8 v0.3
 ========
 
 *Additions*
@@ -508,7 +554,7 @@ File: README.info,  Node: v03,  Next: v02,  Prev: v031,  
Up: Changelog
 
 File: README.info,  Node: v02,  Next: v013,  Prev: v03,  Up: Changelog
 
-5.8 v0.2
+5.9 v0.2
 ========
 
 *Additions*
@@ -524,8 +570,8 @@ File: README.info,  Node: v02,  Next: v013,  Prev: v03,  
Up: Changelog
 
 File: README.info,  Node: v013,  Next: v012,  Prev: v02,  Up: Changelog
 
-5.9 v0.1.3
-==========
+5.10 v0.1.3
+===========
 
 *Fixes*
    • Autoloads.
@@ -534,7 +580,7 @@ File: README.info,  Node: v013,  Next: v012,  Prev: v02,  
Up: Changelog
 
 File: README.info,  Node: v012,  Next: v011,  Prev: v013,  Up: Changelog
 
-5.10 v0.1.2
+5.11 v0.1.2
 ===========
 
 *Fixes*
@@ -543,7 +589,7 @@ File: README.info,  Node: v012,  Next: v011,  Prev: v013,  
Up: Changelog
 
 File: README.info,  Node: v011,  Next: v01,  Prev: v012,  Up: Changelog
 
-5.11 v0.1.1
+5.12 v0.1.1
 ===========
 
 *Fixes*
@@ -552,7 +598,7 @@ File: README.info,  Node: v011,  Next: v01,  Prev: v012,  
Up: Changelog
 
 File: README.info,  Node: v01,  Prev: v011,  Up: Changelog
 
-5.12 v0.1
+5.13 v0.1
 =========
 
 Initial release.
@@ -589,34 +635,35 @@ to request the assignment form.
 
 Tag Table:
 Node: Top231
-Node: Installation2479
-Node: GNU ELPA2630
-Node: Quelpa2995
-Node: Configuration3715
-Node: Usage4671
-Node: Activities4873
-Node: Compatibility5861
-Node: Modes6345
-Node: Workflow7013
-Node: Bindings7966
-Node: Commands8612
-Node: Bookmarks10061
-Node: FAQ10413
-Node: Changelog13489
-Node: v05113782
-Node: v0513929
-Node: v0415906
-Node: v03316447
-Node: v03216877
-Node: v03117005
-Node: v0317335
-Node: v0217725
-Node: v01318217
-Node: v01218366
-Node: v01118545
-Node: v0118710
-Node: Development18811
-Node: Copyright assignment19083
+Node: Installation3086
+Node: GNU ELPA3237
+Node: Quelpa3602
+Node: Configuration4322
+Node: Usage5327
+Node: Activities5529
+Node: Compatibility6517
+Node: Modes7001
+Node: Workflow7669
+Node: Bindings8622
+Node: Commands9268
+Node: Bookmarks10927
+Node: FAQ11279
+Node: Changelog14390
+Node: v0614696
+Node: v05115929
+Node: v0516088
+Node: v0418065
+Node: v03318606
+Node: v03219036
+Node: v03119164
+Node: v0319494
+Node: v0219884
+Node: v01320376
+Node: v01220527
+Node: v01120706
+Node: v0120871
+Node: Development20972
+Node: Copyright assignment21244
 
 End Tag Table
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]