Subject: bug#74553: [ELPA] [PATCH] register-list does not support framesets

From: Stefan Kangas <[email-masked]>
Date: Thu, 13 Feb 2025 04:05:58 -0600

Alex Bochannek <[email-masked]> writes:

> Hello!
>
> This is a follow-up to a comment I made on bug#73827. The register-list
> package only supports frames, but not framesets. The below patch is not
> particularly elegant, because framesets are saved as registers as type
> frameset-register, so the frameset-p predicate does not apply here. This
> is a pretty simple change and if there is a better way, I am obviously
> open to it.
>
> Also note that I did not remove support for the frame configurations. I
> instead kept type "F" for both and updated the documentation. Because
> neither the values of frames nor framesets can be edited, this did not
> present an issue in testing.

Bastien, do you have any comments on the below patch?

> From b5c881ef45a43b72c17dd27de2c3f9cd1c506fe1 Mon Sep 17 00:00:00 2001
> From: Alex Bochannek <[email-masked]>
> Date: Tue, 26 Nov 2024 17:58:06 -0800
> Subject: [PATCH] Add framesets as a register type
>
> ---
>  register-list.el | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/register-list.el b/register-list.el
> index 846d3efe49..435861cd32 100644
> --- a/register-list.el
> +++ b/register-list.el
> @@ -294,9 +294,9 @@ The Key column displays the character used for this register.
>  Hitting \\[register-list-call-handler-at-point] on the key will
>  prompt for a replacement.
>
> -The Type column displays the type of the register, either [F]rame
> -\[N]umber [M]arkers [R]ectangle [S]string or [W]window.  Hitting
> -\\[register-list-call-handler-at-point] on this column will
> +The Type column displays the type of the register, either
> +[F]rame/Frameset [N]umber [M]arkers [R]ectangle [S]tring or [W]indow.
> +Hitting \\[register-list-call-handler-at-point] on this column will
>  restrict the register list to this type of registers.  To quickly
>  list a specific type, hit the type character among [FNMRSW].
>
> @@ -466,7 +466,7 @@ the register or copy its value into the kill ring."
>  		  (frame-parameter
>  		   (window-configuration-frame (car value)) 'name)))
>  	((string= "F" type)
> -	 (format "[Frame configuration]"))
> +	 (format "[Frame/Frameset configuration]"))
>  	(t "[Error: unknown type]")))
>
>  (defun register-list-get-type (key)
> @@ -475,6 +475,7 @@ the register or copy its value into the kill ring."
>        (cond ((stringp key) "S")
>  	    ((markerp key) "M")
>  	    ((numberp key) "N")
> +	    ((equal 'frameset-register (type-of key)) "F")
>  	    (t "error"))
>      (cond ((window-configuration-p (car key)) "W")
>  	  ((frame-configuration-p (car key)) "F")
> --
> 2.39.5 (Apple Git-154)