| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
This adds the `'oldest` keyword to sort by creation day, ascending (oldest
first). This also adds a test for this behavior and the needed documentation.
|
|
|
|
|
|
|
|
Remove leading tab.
|
|
New ert test designed to test 'persp-switch-to-scratch-buffer'.
Test switching to a perspective's scratch buffer. Test if the scratch
buffer is created when there isn't one.
|
|
Test that the function 'persp-get-scratch-buffer' can get a scratch
buffer from different perspectives without modifying it. Test that
its created scratch buffer is conformant to a default scratch buffer.
|
|
New ert test that verifies that the created scratch buffer conforms
to the startup scratch buffer.
The scratch buffer should be created with 'initial-scratch-message'
command key descriptions resolved to command names. Also, its mode
should be 'initial-major-mode'. It shouldn't have a modified flag.
|
|
Test 'persp-forget-buffer' and 'persp-remove-buffer', also test the
function 'persp-set-buffer'.
The function 'persp-forget-buffer' should disassociate buffers with
perspectives, never killing them.
The function 'persp-remove-buffer' should disassociate buffers when
they are shared between perspectives and kill unshared buffers, aka
buffers not found in any other perspective.
|
|
A buffer should not be killable when it's a perspective's last left
buffer. This prevents adding a buffer from another perspective. A
perspective can be killed, though, even if it has only one buffer.
It should be possible to remove buffers from perspectives, unless a
buffer is the perspective's last left buffer.
|
|
A dirty 'window-prev-buffers' may allow a perspective to pull in
buffers from other perspectives.
Till Emacs 27.2, 'delete-window' may update 'window-prev-buffers'
for all windows. This means that after 'persp-reset-windows' the
single window left may end up with a dirty 'window-prev-buffers',
unless 'switch-to-buffer-preserve-window-point' is nil.
Upstream commit 8f63f0078a23421eada97b4da51b9308b82532ce reverted
window/winner changes (Revert 0454bfd3313) in Emacs (bug#23621).
So, what said above should not apply any more after that commit,
and 'switch-to-buffer-preserve-window-point' could not be used."
|
|
Switching to a new perspective should set the 'current-buffer' to the
perspective's scratch buffer. Removing a buffer should switch to the
next one available in the perspective setting it as current buffer.
|
|
Thoroughly test 'persp-set-buffer'. It should not allow to share
buffers between perspectives, and a non-existing buffer passed as
argument should be discarded.
|
|
Thoroughly test 'persp-add-buffer'. It should allow to share buffers
between perspectives, a non-existing buffer passed as argument should
be discarded.
|
|
Test the utility function 'persp-get-buffer-names'. Expect the list
of a perspective's live buffers.
|
|
Test the utility function 'persp-get-buffers'. Expect the list of a
perspective's buffers.
|
|
Test 'persp-current-name' and also killing the main perspective. When
killing the main perspective, preserve the *ert* buffer when the tests
are run interactively, and always preserve *Messages*, because it's an
ert's requirement for properly executing tests.
|
|
Test the new utility function 'persp-test-buffer-in-persps'.
As arguments, expect a buffer or it's name, and perspective names, or
perspective data (aka 'perspective-p' objects). The buffer must be a
live buffer, but a perspective data not necessarily should reflect an
existing perspective.
The buffer must be found exactly in the given perspectives and not in
all other existing perspectives.
Perspectives owning the buffer may be provided as `perspective-p' data
passed as arguments, even when it isn't of an existing perspective.
|
|
New ert's utility function. Verify that a buffer is in specified
perspectives and not, at the same time, in the remaining existing
perspectives.
|
|
Test the ert's utility function 'persp-test-kill-extra-buffers'.
It should automatically cleanup *scratch* buffers that are not the
main scratch buffer, and also the buffers provided as arguments.
|
|
Utility function to reset a state, cleaning up a list of extra buffers
and, automatically each time it is called, "*scratch* (NAME)" buffers.
|
|
Add tests for 'persp-test-match-scratch-buffers' utility function, to
verify that it can detect buffers which may be all considered scratch
buffer.
|
|
New utility function to return a list of live buffers where all may be
considered scratch buffers. Basically, buffers whose name begins with
the string "*scratch*".
|
|
If executing body fails, cleanup buffers and turn off 'persp-mode'.
|
|
Kill other perspectives than the main perspective before cleaning up
the buffers. This is to get rid of buffers that aren't found in the
main perspective.
|
|
Before killing a "*scratch* (NAME)" buffer, verify that it exists.
|
|
Test if 'persp-test-with-persp' will try to kill a non-existent
"*scratch* (NAME)" buffer just because a perspective named NAME
exists. Other starred buffers like "*dummy* (NAME)" should not
be killed just because follow the pattern "*scratch* (NAME)".
Spotting a 'kill-buffer' failure caused by the execution of the
macro code itself, may be subtle. That error may be suppressed
and ert tests may fail for apparently unknown reasons.
Buffers found only in other perspectives, not shared with main,
should always be killed when killing their perspective.
|
|
Test whether disabling 'persp-mode' while in a buffer with a locally
modified 'header-line-format' uses the latter's to update the global
default value of 'header-line-format'. Because it shouldn't.
|
|
Strings comparison requires 'equal', not 'eq', i.e. 'delq' will not
remove "main" (aka 'persp-initial-frame-name') from '("main" "A")'.
Using 'delq', 'persp-test-with-persp' will try to improperly kill a
scratch buffer named "*scratch* (main)", if 'persp-names' returns a
list like '("main" "A")'.
|
|
|
|
This doesn't deal with lexical-let + cl.
|
|
|
|
Clean up buffer cleanup test code.
|
|
persp-last nil.
|
|
* "main" -> persp-initial-frame-name.
* use delq against persp-names directly.
* mapc on kill-buffer + format.
|
|
When cleaning up perspectives, don't forget to remove their scratch buffers.
|
|
Rename perspective-specific scratch buffer when perspective is renamed
|
|
|
|
|
|
|
|
|
|
|
|
As per https://github.com/nex3/perspective-el/pull/85#issuecomment-535316131
|
|
|