all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New package: activities
Date: Fri, 26 Jan 2024 15:59:20 -0600	[thread overview]
Message-ID: <3c51c1aa-ebe5-4dd3-b7cd-a12c972cee12@alphapapa.net> (raw)
In-Reply-To: <8634ukb7hv.fsf@gnu.org>

Hello Eli,

On 1/26/24 06:32, Eli Zaretskii wrote:
>> Date: Fri, 26 Jan 2024 04:42:26 -0600
>> Cc: emacs-devel@gnu.org
>> From: Adam Porter <adam@alphapapa.net>
>>
>>>   From the user-facing POV, how is this different from desktop.el's
>>> ability to save/restore Emacs sessions to/from separate desktop files?
>>
>> As the documentation explains:
>>
>>     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.
> 
> This could be added to desktop.el as a (relatively simple)
> enhancement.

I've looked at desktop.el's code.  I don't think it would be very simple 
to do so.

>> As well, it is not intended to be used on-demand to switch
>> between sets of buffers, windows, or frames (i.e. "activities").
> 
> Maybe I don't understand what this means, but desktop.el can be told
> to restore a session recorded in a specific directory, which allows
> the user to have several desktops recorded, and to restore each one
> when necessary.  Are you talking about something else?

1.  desktop.el seems to have the concept of one desktop being active at 
a time.  A desktop can be switched to, which kills and clears the active 
one.

activities.el has no such limitation.  A user can have as many 
activities active as needed and can switch between them independently at 
any time.

2. desktop.el works by the unusual concept of choosing a directory in 
which to save "a desktop file."  As a user, I have no interest in 
choosing a directory into which to save an activity's state file.  This 
should be transparent to the user.

activities.el stores activities in an alist which is stored with 
persist.el.  It's UI is far simpler and more intuitive.

>> In addition to that, activities.el provides a mode to automatically save
>> an activity's last window configuration in addition to its default.
> 
> Not sure what "in addition to its default" is about, but desktop.el
> also saves the current session regularly and automatically (see
> desktop-auto-save-timeout).

desktop.el allows a single desktop to be active at one time.

activities.el allows any number of activities to be active.

As well, activities.el does not "enforce" its paradigm upon the user, 
which means that frames/tabs that are not associated with an activity 
are left alone.

>> And it provides integration with tab-bar-mode, as well as other
>> conveniences and interactive commands.
> 
> Is that missing from desktop.el?  If so, can you tell what is missing?

desktop.el supports tab-bar-mode in one sense only: when it restores a 
frame containing a tab-bar, it enables tab-bar-mode.

activities.el supports tab-bar-mode more directly with 
activities-tabs-mode: activities are restored to and associated with 
tab-bar tabs.

>> Finally, activities.el is designed to be independent of other
>> features and co-exist with them, avoiding interference with other
>> libraries.  It's only a few days old, but is based on another
>> library of mine; I intend to continue developing it with user
>> feedback to allow further extension and integration with other
>> tools.
> 
> I wish people would extend existing features instead of reinventing
> them from scratch.  Would you perhaps consider extending desktop.el to
> add whatever you think is missing there?  If not, why not?

I generally agree with you.  However, desktop.el is a library nearly 
twice the size of activites.el and dating back 30 years.  It does many 
things that are now better served by other libraries (e.g. restoring 
variables' values is covered by tools like savehist.el).  It is 
complicated and full of anachronisms (like its own bespoke code to write 
variables and values to files with `setq' forms).  It would take much 
longer to refactor desktop.el to do what activities.el does, and 
impractical to do so while preserving its existing UI, which users have 
used for decades (not to mention the inevitable many hours of bug and 
compatibility fixing which such refactoring would entail).

activities.el is intended to be an alternative to desktop.el.  It is 
inspired by other software systems.  It's not intended to follow any of 
desktop.el's paradigms.

As well, I put this together in a few days, based on research done in 
some of my other packages over the last few years.  It's simple and 
seems to work well, and is designed in an extensible, flexible way.  A 
project to refactor desktop.el to encompass similar changes would be 
more than I have the time or interest to work on.

So I would like to add activities.el to ELPA as-is.

Thanks,
Adam



  reply	other threads:[~2024-01-26 21:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  0:59 [ELPA] New package: activities Adam Porter
2024-01-26  7:33 ` Philip Kaludercic
2024-01-26 10:36   ` Adam Porter
2024-01-29 19:50     ` Adam Porter
2024-01-30  7:16       ` Philip Kaludercic
2024-01-30  7:43         ` Adam Porter
2024-01-26  7:45 ` Eli Zaretskii
2024-01-26 10:42   ` Adam Porter
2024-01-26 12:32     ` Eli Zaretskii
2024-01-26 21:59       ` Adam Porter [this message]
2024-01-27  7:08         ` Eli Zaretskii
2024-01-27  8:46           ` Adam Porter
2024-01-27 14:53             ` Eric S Fraga
2024-01-27 15:32               ` Eli Zaretskii
2024-01-27 16:14               ` Sergey Organov
2024-01-28 11:25                 ` Eric S Fraga
2024-01-29 10:45                   ` Sergey Organov
2024-01-29 13:03                     ` Philip Kaludercic
2024-01-29 22:23                       ` Sergey Organov
2024-01-29 15:29                     ` Fraga, Eric
2024-01-26  8:25 ` Eshel Yaron
2024-01-26 10:48   ` Adam Porter
2024-01-29 21:48 ` JD Smith
2024-01-30  0:08   ` Chris Van Dusen
2024-01-30  0:24     ` Adam Porter
2024-02-01  3:49       ` Richard Stallman
2024-01-30  2:50     ` JD Smith
  -- strict thread matches above, loose matches on Subject: below --
2024-01-27 19:20 Drew Adams
2024-02-01  5:33 Joseph Turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c51c1aa-ebe5-4dd3-b7cd-a12c972cee12@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.