You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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]>
0 commit comments