Skip to content

feat: add frame specific spaces - #21

Draft
AlAl45643 wants to merge 5 commits into
chiply:mainfrom
AlAl45643:frames
Draft

feat: add frame specific spaces#21
AlAl45643 wants to merge 5 commits into
chiply:mainfrom
AlAl45643:frames

Conversation

@AlAl45643

Copy link
Copy Markdown

Description

Add frame specific spaces to allow each frame to have its own space tree instead of mirroring spaces for all frames which causes confusing behavior. This is useful for multi-monitor setups where a frame is created for each monitor.

  • Make space-tree frame specific by replacing space-tree variables with space-tree--get and space-tree--set functions that use frame-parameter and set-frame-parameter respectively. Replace any calls or setqs to these space-tree variables in space-tree.el with the space-tree--get and space-tree--set functions. Also, fix any setf macros that break after replacing these variables.
  • Create #'space-tree-init-frames which hooks #'space-tree-init to 'after-make-frame-functions unless it is already in 'after-make-frame-functions. Change the signature and function calls of any function called by #'space-tree--create-space-at that call or eventually call our #'space-tree-get functions so that we can can pass our frame parameter from 'after-make-functions.
  • Fix tests by replacing space-tree variable calls and setqs with space-tree--get and space-tree--set functions.
  • Add (space-tree-init-frames) to ## Installation in README

Testing

I didn't fix any linting issues that I didn't introduce to the code.

  • eask test ert test/space-tree-test.el (all tests passed) (tests were modified with changes)

  • eask lint package (no issues found)

  • eask lint checkdoc
    space-tree.el with checkdoc (0.6.2)
    space-tree.el:221: Probably "runs" should be imperative "run"
    space-tree.el:338: Probably "starts" should be imperative "start"

  • eask lint elisp-lint
    space-tree.el with elisp-lint (20220419.252)
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:16:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:17:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:18:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:19:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:20:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:23:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:26:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:27:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:28:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:29:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:30:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:31:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:82:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:101:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:221:0 (checkdoc) Probably "runs" should be imperative "run"
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:221:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:252:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:338:0 (checkdoc) Probably "starts" should be imperative "start"
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:472:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:496:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:509:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:553:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:719:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:727:0 (fill-column) line length 70 exceeded
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:748:0 (indent) ! "Switch to top-level space %d." 9
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:749:0 (indent) ! (list n))
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:752:0 (indent) ! "Switch to second-level space %d under the current top-level." 5
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:753:0 (indent) ! (list (nth 0 (space-tree--get-current-address)) n))
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:756:0 (indent) ! "Switch to third-level space %d under the current path." 5
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:757:0 (indent) ! (list (nth 0 (space-tree--get-current-address))
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:758:0 (indent) ! (nth 1 (space-tree--get-current-address)) n))
    /home/work/.emacs.d/elpaca/sources/space-tree/space-tree.el:758:0 (indent-character) spaces instead of tabs

  • eask lint relint (no issues found)

  • CI matrix (Ubuntu + Windows × Emacs 28.2, 29.4, 30.2, snapshot)

AlAl45643 and others added 5 commits September 1, 2026 19:49
Make space-tree frame specific by replacing space-tree variables
with --get and --set functions. Replace any calls to these variables
with the --get and --set functions.
Create #'space-tree-init-frames to hook #'space-tree-init
to 'after-make-frame-functions unless it is already in
'after-make-frame-functions. Change signature and function calls
of any functions called by #'space-tree--create-space-at, and the
functions they call, to pass frame parameter to our #'space-tree--get
functions.
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.

1 participant