I'm trying to use a custom non-persp-mode-related buffer-predicate frame parameter together with persp-mode. From what I understand, this should be enough:
(push '(buffer-predicate . my-predicate) default-frame-alist)
(set-frame-parameter nil 'buffer-predicate 'my-predicate) ; I'm not sure if this is needed
(persp-mode)
And now C-x <right> (next-buffer) and friends should consider both persp-mode's predicate and my custom predicate. However, if I create a new frame, the command next-buffer ignores my custom predicate in the new frame.
Expected values:
In first frame: I don't know what to expect
In second frame: buffer-predicate should contain a call to my-test-func, according to the code in persp-set-frame-buffer-predicate:
I'm trying to use a custom non-persp-mode-related
buffer-predicate
frame parameter together with persp-mode. From what I understand, this should be enough:And now
C-x <right>
(next-buffer
) and friends should consider both persp-mode's predicate and my custom predicate. However, if I create a new frame, the commandnext-buffer
ignores my custom predicate in the new frame.Reproduction recipe:
temp.el
with this content:emacs -Q -L ~/.emacs.d/elpa/persp-mode-20160609.1316/ -l temp.el &
C-x 5 2
(make-frame-command
)buffer-predicate
andbuffer-predicate-old
Observed values: In first frame:
my-test-func
my-test-func
In second frame:
#[(b) "\303\304\305p!\"\203^K^@\306\207\307\310 \n\306$>\207" [b *persp-restrict-buffers-to* persp-restrict-buffers-to-if-foreign-buffer string-prefix-p " " buffer-name t persp-buffer-list-restricted selected-frame] 6]
my-test-func
Expected values: In first frame: I don't know what to expect In second frame:
buffer-predicate
should contain a call tomy-test-func
, according to the code inpersp-set-frame-buffer-predicate
: