| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix restore of multibyte buffer names when loading state from file.
|
|
Restore names as they were saved in the file, without backslash sequences for multibyte characters.
|
|
|
|
|
|
|
|
Do not require which-key and xref
|
|
|
|
|
|
|
|
|
|
— the current implementation causes massive performance problems.
|
|
|
|
|
|
|
|
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.
|
|
Utility function to switch to the current perspective's scratch
buffer, or to create one if it does not exist yet. Add binding
"C-x x B" to call 'persp-switch-to-scratch-buffer'.
|
|
Call 'persp-get-scratch-buffer', when needed, to get/create a
perspective's scratch buffer. The former function is able to
properly set a newly created perspective's scratch buffer.
|
|
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.
|
|
Delegate 'persp-get-scratch-buffer' to get/create a perspective's
scratch buffer named "*scratch* (NAME)". Modify 'persp-new' into
using this new function.
When a scratch buffer is created by 'persp-get-scratch-buffer' it
is properly set. An existing buffer is returned as is.
|
|
Like 'command-line' does, enable the 'initial-major-mode' in the
scratch buffer only when the buffer is in 'fundamental-mode'.
|
|
Like 'command-line-1' does, we need to 'substitute-command-keys' in
'initial-scratch-message'. Unsetting the scratch buffer's modified
flag is also a good idea.
|
|
Use 'persp-new' directly to get an existing perspective, or to create
a new one.
|
|
Do not modify an existing perspective, just return it. If the
perspective doesn't exist, create a new one.
A perspective's scratch buffer is not re-created, and the list
of buffer is preserved as is when the perspective exists.
|
|
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.
|
|
Use 'persp-forget-buffer' rather than 'persp-remove-buffer' to
disassociate a buffer with other perspectives.
|
|
Use 'persp-forget-buffer' rather than 'persp-remove-buffer' to
disassociate a buffer with other perspectives.
|
|
Update docstring. Use 'persp-forget-buffer' to disassociate a buffer
that is shared with other perspectives.
|
|
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.
|
|
New function to disassociate a buffer with the current perspective,
without killing it when it's not left in any perspective.
|
|
Prevent killing or removing the last buffer left in perspectives,
unless a perspective is killed, to avoid adding a buffer of other
perspectives to the perspective where the last buffer is removed.
|
|
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.
|
|
Up to Emacs 27.2, 'switch-to-buffer-preserve-window-point' allows
'delete-window' to update 'window-prev-buffers' of all windows if
it isn't set to nil.
After calling 'persp-reset-windows', 'window-prev-buffers' should
be empty to prevent perspectives from pulling in buffers of other
perspectives.
|
|
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."
|
|
A one way loop, with pre-defined start and end, prevents any infinite
ping-pong.
This is not just syntactic sugar. In a "while buried buffer found in
window" loop, there is the risk that when the buffer is buried in one
window, it may be un-buried in another (for "mystic" reasons) and the
loop will never end.
|
|
If burying the 'current-buffer' inside 'with-selected-window', then
force update the current buffer after, since 'with-selected-window'
may restore the buried buffer as current buffer after executing its
BODY.
|