-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow multiple workspaces per buffer
- Rename `bufler-workspace-name` to `bufler-workspace-names` to show it can hold multiple values - Add prefix to workspace names in the groups - Make `bufler-workspace-buffer-name-workspace` add to list of buffer-local workspace value instead of replacing it - Use another version of `seq-group-by` in `bufler-group-tree` that adds an element in multiple groups if the grouping function returns a list. For the last point, it would be better to use `cl-defmethod` to override the `seq-group-by` function only when grouping workspaces but currently no version tried work. Last try : ```lisp (cl-defmethod seq-group-by ((function (eql 'bufler-group-auto-workspace)) sequence) "Specialization of `seq-group-by' that puts elements of SEQUENCES in each of the workspaces returned by FUNCTION." (seq-reduce (lambda (acc elt) (let ((keys (funcall function elt)) (add-to-groups (lambda (key) (let ((cell (assoc key acc))) (if cell (setcdr cell (push elt (cdr cell))) (push (list key elt) acc)))))) (mapc add-to-groups keys) acc)) (seq-reverse sequence) nil)) ``` Co-authored-by: Adam Porter <[email protected]>
- Loading branch information
Showing
3 changed files
with
41 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters