From: Alex Bochannek <alex@bochannek.com>
To: 74553@debbugs.gnu.org
Cc: Philip Kaludercic <philipk@posteo.net>
Subject: bug#74553: [ELPA] [PATCH] register-list does not support framesets
Date: Tue, 26 Nov 2024 18:18:18 -0800 [thread overview]
Message-ID: <m2ed2xifmd.fsf@bochannek.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 623 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-framesets-as-a-register-type.patch --]
[-- Type: text/x-patch, Size: 1798 bytes --]
From b5c881ef45a43b72c17dd27de2c3f9cd1c506fe1 Mon Sep 17 00:00:00 2001
From: Alex Bochannek <alex@bochannek.com>
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)
[-- Attachment #3: Type: text/plain, Size: 11 bytes --]
--
Alex.
reply other threads:[~2024-11-27 2:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ed2xifmd.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=74553@debbugs.gnu.org \
--cc=philipk@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).