Replies: 8 comments
-
Hey, thanks for the feedback. Your initial impressions are valuable.
This could be done, but the idea is for this to be automated; the user shouldn't have to think about manually persisting the last-used state. That's what The
This is already the case. Each activity has a default state, which is defined (and re-defined) with
Yes, please see the option I just added yesterday, Filtering out certain buffers (i.e. saving the activity's state, but ignoring certain buffers) is a similar but slightly different idea. It would be a bit more complex to implement, but it could be useful (e.g. if a window is displaying an unrestorable buffer, like an ERT results buffer, the window's previous-buffers list could be looked at to find the last-displayed buffer that is restorable, and it could be saved instead). However, I'm not sure yet if the complexity and edge cases would be worth it, so I think I'll let the
That's surely a useful idea (I still use a Helm command that offers a variety of recent items, including buffers, recent files, files in the current project, recent Org headings, bookmarks, etc). However, I think its scope is outside of
I would be glad if you would chime in on #4, where we're trying to decide the best way to handle this. I use Thanks. |
Beta Was this translation helpful? Give feedback.
-
How about filtering the new state and merging it with the old state? This would allow valid updates to move forward while ignoring invalid updates. Invalidating a buffer shouldn't leave an empty window. If any old buffer is available, it should be used.
The example in the table is realistic for me Frequently when working on a project, the same several buffers trade windows like musical chairs along with 1-2 irrelevant buffers showing up until I need a relevant one again. I imagine you're already having to handle cases where a file no longer exists.
I'm in the cohort of people who only use one frame and no tabs. Without using tabs or frames:
Perhaps not using
The really common case for users like me is instead to have switched to an irrelevant buffer. Since I'm switching to irrelevant buffers almost all the time and I don't have a natural grouping mechanism, activities would form valuable abstractions that allow switching all of the windows and all of the buffers, a very fine complement to my default filthy manner of use. However, because my manner of use will remain filthy, either i need really strict (probably keyed on project) update rules or just to never update automatically. I think there's your key advice for new users. |
Beta Was this translation helpful? Give feedback.
-
The more I think about this the more I think a standalone command for updating the default state is better, for discovery. I appreciate the desire to keep the command footprint low, but it's a bit hard to discover how to do this. |
Beta Was this translation helpful? Give feedback.
-
I don't know what that would mean. Each window state is atomic. (The only mutation we do is to add the What would it mean to merge two states? (As well, I'm doubtful that the complexity of trying to merge parts of two window states would be worth the trouble.)
I don't know what you mean about valid/invalid updates or invalidating a buffer.
There are only two alternatives when a buffer can't be restored: show a buffer with the error message (which the user can kill and ignore), or try to use a heuristic to choose another buffer to be displayed.
I guess that depends on what "any old buffer" means. In my experience with Burly and Bufler, having an unexpected buffer displayed tends to be confusing to the user; if they expect buffer A to be shown, but instead they get shown buffer Z that just happens to be open in Emacs at that moment, they will perceive that as a bug and report it. It seems better to show a buffer with a useful error that helps the user understand the problem; then the user can just choose another buffer or revert to the default state.
The "musical chairs" thing is certainly true for me; that's what reversion is intended for. (Beyond that, I think
Yes, that's where the error buffer is shown, e.g.:
So IIUC that means that you don't want to have access to multiple activities at once, and that you want resuming an activity to overwrite the current frame's window configuration?
The new
Well, I did make it optional on purpose, but I didn't envision that disabling it would be necessary in normal usage. But, sure, if you don't want to automatically save activity states when Emacs is idle, but only when switching activities, then disabling the mode will accomplish that. (Note that disabling it will remove it from
Yes, this is the nature of the problem, all these transient (not Transient.el) buffers that are only used and useful for a moment, ones that shouldn't or couldn't be restored when resuming an activity. I'm expecting that the anti-save-predicates will help with that. We could also consider having a list of major modes whose buffers should not be preserved (and possibly a way to determine that automatically depending on whether the mode seems to support |
Beta Was this translation helpful? Give feedback.
-
If only users would read the manual, where it's mentioned at least twice... :) But I'll consider having a command for it. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I second a need for at least one command. I started reading your replies, but my language was as an outsider looking in, not as someone who understands the internals and implementation. Sorry, my reply is incomplete for now.
Yes. I could have some use for live updating, but on an ephemeral basis or persisted independently of what is persisted for |
Beta Was this translation helpful? Give feedback.
-
I feel like you're almost wanting more than two persisted states. Am I wrong? |
Beta Was this translation helpful? Give feedback.
-
I can't complain about this because I make the same point for many packages of mine ;). But you do have the worthy goal of "almost nothing to learn". In terms of what would make intuitive sense (to "guess" how to do this) and not add commands, I mentioned in another issue allowing activities-new to overwrite default. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry for this immense lack of effort. Writing my initial impressions, while fresh and ignorant.
activities-save
command that explicitly only updates the persisted state of the current activity and leaves others aloneactivities-mode
should "set" the live updating state while "save" should be more durable. This way, if I get too far off of what that activity actually is, I can get back to what it was intended to be. Both "set" and "save" states should persist, but independently.I did not look in depth. My thoughts reflect first impressions.
Resuming an activity will create a new frame but using my default frame alist instead of copying the current frame. Since my frame almost never matches the default while setting up for screencaps etc, I wind up with frames spawning when I just want to re-use the existing one.
Beta Was this translation helpful? Give feedback.
All reactions