Replies: 15 comments 20 replies
-
The documentation should explain the difference. Please let me know if it's not clear.
I don't think it would make the UI clearer to combine the command that defines a new thing with the command that activates an already-defined thing.
I guess there's a misunderstanding, because buffers are neither added to nor removed from activities. An activity has an associated window configuration, within which each window has a buffer displayed in it. If you want to change the buffer shown in a window, or change the window configuration, then arrange the windows and buffers to your liking, and then (re)define the activity.
Along the same lines, this seems to be a misunderstanding. An activity cannot be "blank"; one devoid of saved states would be useless. Note that the list of buffers shown in an activity's tab is not saved and restored across sessions. |
Beta Was this translation helpful? Give feedback.
-
Then I don't understand the purpose of an activity-specific buffer list. If an activity has an associated buffer list, then it should be possible to remove a buffer from it. I guess I also don't understand the creation of new activities. An activity in my mind should start as a blank slate, not a fork of an existing activity. Laying my cards out on the table: I fell into maintaining Perspective because I was willing to fix a bunch of long-standing bugs and add a few needed features. Perspective has an old codebase and a few bugs and corner cases that are difficult to fix or improve upon. I'm wondering if Activities can make Perspective obsolete the same way Vertico makes other completion frameworks obsolete (except maybe Helm). This wouldn't be a bad thing at all (I don't mind maintaining fewer things!). So I'm looking to see if Activities can do what Perspective does, at least for my needs. Perspective goes to great lengths to keep a perspective-specific buffer list (along with a window configuration). Although the user may decide to have multiple perspectives share a buffer, any behavior that results in a buffer "leaking" into another perspective is a bug. Adding and removing buffers from perspectives are important operations. Reading the project description, it seemed to me that Activities manage buffer lists along with window configurations. If this isn't where you're going with Activities, that's cool. |
Beta Was this translation helpful? Give feedback.
-
Defining a new activity simply assigns the current window configuration to a new activity. It's kind of like In other words, the intended workflow (so far) is more like "Hm, this window configuration looks useful, I'll define it as an activity so I can use it again," more than, "Hm, I want to do something, let me make a new activity in which to begin doing it." But, again, nothing stops you from Regarding buffer lists: Well, first, maintaining a list of buffers associated with an activity is a very recent addition. This package is also very new. I added the buffer list initially to allow buffers to be killed when an activity is suspended. Then I just (what, yesterday? haha) added the command to switch to a buffer associated with an activity. One of the principles I'm trying to follow with this package is that it should be a "good citizen," i.e. it should not interfere with other packages, libraries, or features in Emacs. So, for example, To put it another way, Another principle is that it should require minimal direction from the user. The idea of having to manually add or remove buffers from a list is anathema to me. More than that, I don't think the user should need to care whether a buffer is associated with one activity or another. (I wrote So the way it works now is simple (and only for the tabs mode at the moment): when a buffer is shown in an activity, it is added to the activity's buffer list. But nothing prevents a buffer from being on any other activities' lists as well. When an activity is resumed, its buffer list starts with just the buffers initially displayed in it. As other buffers are shown in it, they are added to its list; but no activity's buffer list is exclusive to it. And ultimately I think this is more useful for the user as well: if a user shows a buffer in an activity that is technically associated with another project (e.g. I'm working on Now, having said all that, again, this is a young package, and I want it to grow to meet users' needs, within its vaguely defined vision. So I'm certainly willing to discuss the design and entertain features and ways to make it more flexible and powerful. But I generally lean away from patterns that expect the user to manually maintain lists of this or that. I want the computer to make my work easier, not to require more work of me. I want Well, I hope all that makes sense. Happy to hear your feedback, to have your interest and any contributions you might offer. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I totally hear you! It's a great design philosophy. For me, the list of buffers associated with an "activity" or "perspective" is a key part of reminding me what I'm actually doing there. If I'm switching perspectives, it usually means I'm switching contexts. I find context-switching difficult, and the more help I have to remind me, the better. If my project has two tasks, one touching files "file11" and "file23", and another touching "file4" and "file18", then it's really helpful for me to look at the buffer list for the perspective I created for the specific task and remind me that those are the relevant files or buffers. Seeing unrelated buffers pulled into a task-dedicated perspective is really jarring, and Perspective goes to considerable lengths to keep that from happening. In Perspective, there isn't much pain involved in adding buffers. |
Beta Was this translation helpful? Give feedback.
-
Well, I may be wrong, but I think the current implementation of Now that could include, e.g. help buffers, if the user looks at one while in an activity. But I have no objection to adding a list of predicate functions, similar to the Would that help achieve the behavior you need?
Yeah, |
Beta Was this translation helpful? Give feedback.
-
I made a comment related to the discussion in this issue in #43 (comment) and alphapapa replied in the following comment with some good info including a link to this discussion. This issue is much more related to what I raised, so I’ll reply here to keep the linked issue focused specifically on the current buffer switching implementation.
I fully agree with trying to keep packages orthogonal and “good citizens”; that’s why I didn’t make this request before, as I assumed it would be out of scope. But from my perspective at least, now that
I can’t speak for gcv, but I don’t think what I’m proposing would conflict with these properties. Suspending would just serialize more buffers, and resuming would just load them in the background and restore
Regarding bufler, I think my first read of the README gave me the impression that this package was meant as a successor to both burly and bufler, but on second look I see that that only applied to burly and the bufler-workspace extension specifically. So I took another look at bufler. At least for me, I am not interested in setting up predefined rules for grouping buffers. project.el is sufficient for 80% of that, and the additional complexity of setting up custom grouping functions could only take me another 10% further or so anyway. I find that the best complement to to the highly structured project.el groups is something that allows for fully arbitrary, unstructured groups based on buffers opened in a current “workspace”—much like the window switch hook you just implemented for activities.el. Hopefully this clarifies where I’m coming from.
I think this is a perfectly valid approach, but I would say that some users prefer to manually clean up this garbage! And laborious manual removal of buffers from activities lists could often be avoided by quitting an activity without suspending (e.g. by just closing the tab or using Thanks again! |
Beta Was this translation helpful? Give feedback.
-
To clarify my thoughts by contrasting them with gcv’s: I agree that the ability to make a “blank” activity is not particularly necessary when you can just open a new tab and call
I don’t think adding is particularly important to me (the current
Now that I think about it, this would probably help reduce the manual labor associated with managing activity buffer lists even further, so I’m on board with it! |
Beta Was this translation helpful? Give feedback.
-
One more thing for @gcv: if you do want tabs to align directly with workspaces (automatically create new ones as blank, no separate |
Beta Was this translation helpful? Give feedback.
-
I don't need tab integration at all. It's nice, of course, and maybe I could get used to it. But Perspective doesn't have tabs and works fine without it (though someone asked me to add support when Making a blank activity by opening a new tab and then a new activity: I think that works, but I'd have to write a wrapper command to automate doing two actions in one step. On the subject of buffer management: I need the ability to remove a buffer from an activity/perspective manually. If one was added accidentally but belongs in another activity/perspective, for example. I also absolutely need the ability to persist the buffer list to disk so that state is preserved across Emacs sessions. I looked into Bufler, and it's definitely cool, but I also don't want to write rules for grouping buffers. That a buffer was opened in an activity/perspective is all I care about. Maybe an Activities+Bufler integration mode could be used to automate that behavior in Bufler? To reiterate, I'm not pushing for any features to get added to this project. It would be cool if it became the modern, slicker replacement for Perspective, but it certainly doesn't have to happen. Activity currently offers a very different UX, but I've also spent about 10 years using Perspective almost daily, so I have a lot of mental and muscle memory attached to its workflow assumptions. |
Beta Was this translation helpful? Give feedback.
-
Ah, that may be why you were wondering about the difference between |
Beta Was this translation helpful? Give feedback.
-
Certainly. :)
Well, I can imagine that being useful, so I'm willing to consider it. I might explore coding it myself, but I have a lot going on right now, so patches welcome, also.
FWIW, Bufler's default groups are designed to be generally useful, so the user needn't write any. For example, it groups buffers by project, whether they're special/hidden, major mode, etc. I think you would likely find it useful as-is (e.g. if you want to periodically see what buffers are open and clean them up, it's much easier when they're grouped smartly).
Also, Bufler supports that: manually placing buffers into ad-hoc "workspace" groups with a keystroke. (I know the readme is large, so it's not easy to get a quick understanding of everything it does.) If you ever try it, feel free to send feedback.
Well, if that's something that some users want, I'm willing to consider adding it. Here are some steps I can think of for the development process:
Probably this would live on a feature branch for testing for a week or two, then on |
Beta Was this translation helpful? Give feedback.
-
Thanks for taking the time to read my screed!
Perhaps I should bite the bullet and try it out then. It looks rather substantial for my needs, but looks can be deceiving.
Yeah, I really need to get my copyright assignment ducks in a row. I’ve been meaning to revisit my email setup before then; this may be the impetus I need to take care of that. |
Beta Was this translation helpful? Give feedback.
-
I use and like
This brings to mind another idea I've had for a while: to rename the
Fair enough. I'm willing for those features to exist in
The default rules should be generally useful. Most users won't need to write their own. At the moment, the challenge for grouping buffers by activity is that buffers aren't strictly associated with activities. We could iterate over activities' buffer lists to see whether a buffer is present in one, but it may also be present in another's, and Bufler as-designed shows a buffer in a single group. However, if we do end up with something like (bufler-defauto-group activity
(cl-loop for activity
in (cl-remove-if-not #'activities-activity-active-p
activities-activities)
when (memq buffer (activities-activity-buffers activity))
return (activities-activity-name activity)))
Sure. I'm not necessarily trying to replace those other packages, more like to offer my own vision of something similar that meets my needs, while also being flexible and extensible enough to meet others'. And my vision is not firmly defined, so I hope that users will help me shape it as well. |
Beta Was this translation helpful? Give feedback.
-
That sounds great.
Yes. To use the Vertico analogy again, several important features live in non-core minor modes, and it works well. There's a bit of a learning curve at configuration time, but it's not important in the end. |
Beta Was this translation helpful? Give feedback.
-
I’m not sure how much of this has yet been implemented other than the new blank slate How about combining these: let the user configure an |
Beta Was this translation helpful? Give feedback.
-
Overall, I think Activities is really promising. I have a few questions/suggestions:
activities-resume
andactivities-switch
. They seem to do the same thing, so maybe they can just be one command? Maybeactivities-new
can also be consolidated into the same command.Beta Was this translation helpful? Give feedback.
All reactions