bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69993: Wrap window buffers while cycling


From: Juri Linkov
Subject: bug#69993: Wrap window buffers while cycling
Date: Thu, 25 Apr 2024 20:40:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> There is one problem with this line:
>>
>>    (add-to-list 'window-persistent-parameters '(tab-line-buffers . writable))
>>
>> This line is needed to be able to use 'window-swap-states'
>> because window-state-get/window-state-put should move the window
>> parameter 'tab-line-buffers' to the swapped window.
>
> Why does it have to be "writable"?  'window-swap-states' doesn't care
> about "writability".

Sorry, I don't know why I missed that cdr can be 't'
instead of 'writable'.  Now fixed.

>> A third solution would be to support a lambda in
>> 'window-persistent-parameters' that will process
>> the parameter before saving.  For example:
>>
>>    (add-to-list 'window-persistent-parameters
>>                 '(tab-line-buffers . (lambda (p) (mapcar #'buffer-name p))))
>
> You would call that function in window.el here
>
>                   (when (and pers (or (not writable) (eq pers 'writable)))
>                     (setq list (cons (cons (car par) (cdr par)) list)))))
>
> iff WRITABLE is non-nil and you would not call it here in window.c
>
>                   /* If the window has a value for the parameter,
>                      save it.  */
>                   p->window_parameters = Fcons (Fcons (XCAR (par), XCDR 
> (par)),
>                                          p->window_parameters);

This might be needed later for some other window parameters.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]