Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a recent list to the frame multiplexer + small enhancements. #1229

Merged
merged 2 commits into from
Jan 6, 2024

Conversation

mychris
Copy link
Contributor

@mychris mychris commented Jan 4, 2024

Some enhancements for the frame-multiplexer.

  • Adds a recent list, so one can jump between recently visited frames. Mostly used to the jump to the most recent.
  • Adds names to the frames. If no name is given, the behaviour is unchanged. Names can be removed by giving a frame an empty name

New commands:

  • frame-multiplexer-switch jump to a frame with the given ID (prefix argument)
  • frame-multiplexer-recent go to a frame in the recent list
  • frame-multiplexer-rename give a name to a frame
  • frame-multiplexer-nomalize-ids re-assign IDs in case many frames have been deleted and created, so it is easier to jump with frame-multiplexer-switch

Changed commands:

  • frame-multiplexer-next Accepts a prefix argument with which the jump can get bigger
  • frame-multiplexer-prev Same as next
  • frame-multiplexer-delete Accepts a prefix argument with which a specific frame can be deleted

@mychris mychris force-pushed the patch/frame-multiplexer-recent-list branch from b275417 to 1d949aa Compare January 4, 2024 17:12
@mychris
Copy link
Contributor Author

mychris commented Jan 4, 2024

Maybe the frame-multiplexer is a good place to start with feature keymaps, as described in #1208?

I am not sure if such a change would be too disruptive for users, but I would propose to create a new exported variable *keymap*, which is a keymap, assigning all the commands within the frame-multiplexer to this keymap and then assigning C-z to the *keymap*.

(let ((entry (aref (virtual-frame-id/frame-table vf) recent-frame-id)))
(switch-current-frame vf (frame-table-entry-frame entry)))))))

(define-key *global-keymap* "C-z r" 'frame-mulitplexer-rename)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current style is to put all the define-keys at the top of the file, though there is no official rule and I don't know the maintainer's opinion.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I think that is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, moved all define-keys to the top of the file.

@cxxxr
Copy link
Member

cxxxr commented Jan 5, 2024

I think it's very nice!
Can I merge this PR?

@mychris
Copy link
Contributor Author

mychris commented Jan 6, 2024

Nothing to add from my side. What do you think about my first comment, should I just create a PR so we can look at it there?

@cxxxr
Copy link
Member

cxxxr commented Jan 6, 2024

What do you think about my first comment, should I just create a PR so we can look at it there?

I agree that users should be able to set a prefix other than C-z.
Looking forward to the PR.

@cxxxr cxxxr merged commit 7353311 into lem-project:main Jan 6, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants