Closed bmag closed 7 years ago
possibly fixed 4aac831b911a475ff68fe27642213b7a4c6ac34d
I can confirm that it is fixed, at least for this set of names. We did get a report on spacemacs (https://github.com/syl20bnr/spacemacs/issues/7459) that the order is consistent, but it doesn't reflect the order in which the perspectives were created. I'm not sure if that is supposed to be a supported feature, though, because I didn't see persp-mode's documentation talking about the order of perspectives.
In the linked report, SPC l <number>
calls persp-switch
, SPC l S
calls persp-save-to-file-by-names
, SPC l L
calls persp-load-state-from-file
, and the order is the same as returned by persp-names-current-frame-fast-ordered
(and "layout" means "perspective", as you probably know already).
Yep, I can confirm that the alternating order issue has been fixed. However, previously my layout order was preserved when saving, not anymore. So I'm guessing that some recent changes have broken that (if that is even something that was supposed to be supported). Or is there some other way how to set the order of layouts (perspectives?)?
EDIT: My hypothesis is that if there are hyphens in the names, the ones with hyphens in the names are put first in the saved order. I wasn't able to reproduce the issue without having hyphens in some names.
@jluttine your issue must be fixed now(d7ccbf8e7959beaab3ff9c0bd266d337940ffe3d)
@jluttine after you install the updated persp-mode
, can you report if the issue is fixed, and then I'll close both issues (this one and the one in spacemacs)?
I tested now and it seems to work. Thanks!
It seems that if I save some perspectives to file with
persp-save-to-file-by-names
, and in later Emacs sessions I load that file withpersp-load-state-from-file
, then the order of perspectives (as returned bypersp-names-current-frame-fast-ordered
) is inconsistent . For some reason, if I save withpersp-save-state-to-file
instead ofpersp-save-to-file-by-names
, then the order is consistent (at least in the scenario I tried).Original report: https://github.com/syl20bnr/spacemacs/issues/7396
Reproduction guide :beetle:
test-init.el
:("none" "foo" "bar")
foo
andbar
to filefoobar
: M-x persp-save-to-file-by-names foo bar [("none" "bar" "foo")
("none" "foo" "bar")
Observed behaviour: :eyes: :broken_heart:
Output of
(persp-names-current-frame-fast-ordered)
is inconsistent. It alternates between("none" "foo" "bar")
and("none" "bar" "foo")
.Expected behaviour: :heart: :smile:
Output of
(persp-names-current-frame-fast-ordered)
should be consistent -("none" "foo" "bar")
everytime.