GNU bug report logs -
#73827
[ELPA] [PATCH] register-list fails on "Unprintable entity" registers
Previous Next
Reported by: Alex Bochannek <alex <at> bochannek.com>
Date: Tue, 15 Oct 2024 23:26:02 UTC
Severity: normal
Tags: patch
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 73827 in the body.
You can then email your comments to 73827 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Tue, 15 Oct 2024 23:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Alex Bochannek <alex <at> bochannek.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 15 Oct 2024 23:26:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello!
I have not submitted patches against an ELPA package before, so I hope
this format is OK. I tried to follow the instruction on pulling ELPA
from Git, but the make step failed for me.
The register-list mode throws an error on start-up when there are
unknown register types in the register-alist. This can happen with
window configurations and saved session state after a restart. The
reason for this is a simple line flip in the register-list-get-type
function.
[Message part 2 (text/x-patch, inline)]
--- /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el.~1~ 2023-01-10 19:36:23
+++ /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el 2024-10-15 15:49:37
@@ -483,8 +483,8 @@
(t "error"))
(cond ((window-configuration-p (car key)) "W")
((frame-configuration-p (car key)) "F")
- ((stringp (car key)) "R")
((string= "Unprintable entity" (car key)) "?")
+ ((stringp (car key)) "R")
(t "error"))))
;;; Edit key/value of the register
[Message part 3 (text/plain, inline)]
Apologies again for the format of this submission. If someone could
point me at instructions for how to make your life easier next time, I'd
appreciate it.
Thanks!
--
Alex.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Thu, 17 Oct 2024 02:45:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 73827 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Jeremy Bryant <jb <at> jeremybryant.net> writes:
> Alex Bochannek <alex <at> bochannek.com> writes:
>
>> Hello!
>>
>> I have not submitted patches against an ELPA package before, so I hope
>
> Philip, any comments?
>
>>
>> Apologies again for the format of this submission. If someone could
>> point me at instructions for how to make your life easier next time, I'd
>> appreciate it.
>
> Please read the file CONTRIBUTE in the Emacs source tree.
Figured out my issue with populating the ELPA repo (new computer, old
version of gmake) and I am including the patch in the proper format now.
[0001-Fix-unprintable-register-display-logic.patch (text/x-patch, inline)]
From dafcff7c7a9cb6952aa740ef34a67eb61fd2a90d Mon Sep 17 00:00:00 2001
From: Alex Bochannek <alex <at> bochannek.com>
Date: Wed, 16 Oct 2024 19:35:33 -0700
Subject: [PATCH] Fix unprintable register display logic
---
register-list.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/register-list.el b/register-list.el
index 846d3efe49..5a81b1b7bb 100644
--- a/register-list.el
+++ b/register-list.el
@@ -478,8 +478,8 @@ the register or copy its value into the kill ring."
(t "error"))
(cond ((window-configuration-p (car key)) "W")
((frame-configuration-p (car key)) "F")
- ((stringp (car key)) "R")
((string= "Unprintable entity" (car key)) "?")
+ ((stringp (car key)) "R")
(t "error"))))
;;; Edit key/value of the register
--
2.39.5 (Apple Git-154)
[Message part 3 (text/plain, inline)]
--
Alex.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Mon, 25 Nov 2024 23:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 73827 <at> debbugs.gnu.org (full text, mbox):
Anything else that's needed from me here? I have another trivial fix for
register-list I would like to submit.
Thanks!
Alex Bochannek <alex <at> bochannek.com> writes:
> Jeremy Bryant <jb <at> jeremybryant.net> writes:
>
>> Alex Bochannek <alex <at> bochannek.com> writes:
>>
>>> Hello!
>>>
>>> I have not submitted patches against an ELPA package before, so I hope
>>
>> Philip, any comments?
>>
>>>
>>> Apologies again for the format of this submission. If someone could
>>> point me at instructions for how to make your life easier next time, I'd
>>> appreciate it.
>>
>> Please read the file CONTRIBUTE in the Emacs source tree.
>
> Figured out my issue with populating the ELPA repo (new computer, old
> version of gmake) and I am including the patch in the proper format now.
>
> From dafcff7c7a9cb6952aa740ef34a67eb61fd2a90d Mon Sep 17 00:00:00 2001
> From: Alex Bochannek <alex <at> bochannek.com>
> Date: Wed, 16 Oct 2024 19:35:33 -0700
> Subject: [PATCH] Fix unprintable register display logic
>
> ---
> register-list.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/register-list.el b/register-list.el
> index 846d3efe49..5a81b1b7bb 100644
> --- a/register-list.el
> +++ b/register-list.el
> @@ -478,8 +478,8 @@ the register or copy its value into the kill ring."
> (t "error"))
> (cond ((window-configuration-p (car key)) "W")
> ((frame-configuration-p (car key)) "F")
> - ((stringp (car key)) "R")
> ((string= "Unprintable entity" (car key)) "?")
> + ((stringp (car key)) "R")
> (t "error"))))
>
> ;;; Edit key/value of the register
> --
> 2.39.5 (Apple Git-154)
--
Alex.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Tue, 26 Nov 2024 21:36:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 73827 <at> debbugs.gnu.org (full text, mbox):
Alex Bochannek <alex <at> bochannek.com> writes:
> Anything else that's needed from me here? I have another trivial fix for
> register-list I would like to submit.
Thanks alex for your contribution.
Adding Philip, any comments or suggestions on this short ELPA patch?
>
> Thanks!
>
> Alex Bochannek <alex <at> bochannek.com> writes:
>
>> Jeremy Bryant <jb <at> jeremybryant.net> writes:
>>
>>> Alex Bochannek <alex <at> bochannek.com> writes:
>>>
>>>> Hello!
>>>>
>>>> I have not submitted patches against an ELPA package before, so I hope
>>>
>>> Philip, any comments?
>>>
>>>>
>>>> Apologies again for the format of this submission. If someone could
>>>> point me at instructions for how to make your life easier next time, I'd
>>>> appreciate it.
>>>
>>> Please read the file CONTRIBUTE in the Emacs source tree.
>>
>> Figured out my issue with populating the ELPA repo (new computer, old
>> version of gmake) and I am including the patch in the proper format now.
>>
>> From dafcff7c7a9cb6952aa740ef34a67eb61fd2a90d Mon Sep 17 00:00:00 2001
>> From: Alex Bochannek <alex <at> bochannek.com>
>> Date: Wed, 16 Oct 2024 19:35:33 -0700
>> Subject: [PATCH] Fix unprintable register display logic
>>
>> ---
>> register-list.el | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/register-list.el b/register-list.el
>> index 846d3efe49..5a81b1b7bb 100644
>> --- a/register-list.el
>> +++ b/register-list.el
>> @@ -478,8 +478,8 @@ the register or copy its value into the kill ring."
>> (t "error"))
>> (cond ((window-configuration-p (car key)) "W")
>> ((frame-configuration-p (car key)) "F")
>> - ((stringp (car key)) "R")
>> ((string= "Unprintable entity" (car key)) "?")
>> + ((stringp (car key)) "R")
>> (t "error"))))
>>
>> ;;; Edit key/value of the register
>> --
>> 2.39.5 (Apple Git-154)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Tue, 26 Nov 2024 21:57:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 73827 <at> debbugs.gnu.org (full text, mbox):
Alex Bochannek <alex <at> bochannek.com> writes:
> Hello!
>
> I have not submitted patches against an ELPA package before, so I hope
> this format is OK. I tried to follow the instruction on pulling ELPA
> from Git, but the make step failed for me.
>
> The register-list mode throws an error on start-up when there are
> unknown register types in the register-alist. This can happen with
> window configurations and saved session state after a restart. The
> reason for this is a simple line flip in the register-list-get-type
> function.
>
> --- /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el.~1~ 2023-01-10 19:36:23
> +++ /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el 2024-10-15 15:49:37
> @@ -483,8 +483,8 @@
> (t "error"))
> (cond ((window-configuration-p (car key)) "W")
> ((frame-configuration-p (car key)) "F")
> - ((stringp (car key)) "R")
> ((string= "Unprintable entity" (car key)) "?")
The change confuses me, are we sure that (car key) must be a string at
this point? If not, should be prefer `equal' over `string='?
> + ((stringp (car key)) "R")
> (t "error"))))
>
> ;;; Edit key/value of the register
>
>
> Apologies again for the format of this submission. If someone could
> point me at instructions for how to make your life easier next time, I'd
> appreciate it.
You can try out
M-x package-vc-install register-list RET
that should give you a checkout. You can then make your changes as
usual and then prepare a patch using vc-prepare-patch or git-format-patch(1).
> Thanks!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Wed, 27 Nov 2024 01:40:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 73827 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Alex Bochannek <alex <at> bochannek.com> writes:
>
>> --- /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el.~1~ 2023-01-10 19:36:23
>> +++ /Users/awb/.emacs.d/elpa/register-list-0.1/register-list.el 2024-10-15 15:49:37
>> @@ -483,8 +483,8 @@
>> (t "error"))
>> (cond ((window-configuration-p (car key)) "W")
>> ((frame-configuration-p (car key)) "F")
>> - ((stringp (car key)) "R")
>> ((string= "Unprintable entity" (car key)) "?")
>
> The change confuses me, are we sure that (car key) must be a string at
> this point? If not, should be prefer `equal' over `string='?
>
>> + ((stringp (car key)) "R")
The change simply swaps the stringp and string= predicates in the cond.
If there is a register with "Unprintable entity" (which desktop.el
produces), it would not show up correctly as a "?" (assuming "?" has
been added to register-list-default-type).
Looking at register-alist in my .emacs.desktop, it is always the string
"Unprintable entity" and never a symbol. Whether it's string= or equal
shouldn't matter, because the difference in error handling between the
two isn't relevant here.
Unrelated, I looked into how to get frameset support in register-list
and the way framesets are stored in register-alist is very different.
I'll submit another patch for that, although it isn't particularly
elegant.
> You can try out
>
> M-x package-vc-install register-list RET
>
> that should give you a checkout. You can then make your changes as
> usual and then prepare a patch using vc-prepare-patch or git-format-patch(1).
Perfect, thank you! Didn't know about package-vc-install.
--
Alex.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Tue, 11 Feb 2025 19:20:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 73827 <at> debbugs.gnu.org (full text, mbox):
Jeremy Bryant <jb <at> jeremybryant.net> writes:
> Alex Bochannek <alex <at> bochannek.com> writes:
>
>> Anything else that's needed from me here? I have another trivial fix for
>> register-list I would like to submit.
>
> Thanks alex for your contribution.
>
> Adding Philip, any comments or suggestions on this short ELPA patch?
Ping, Philip and/or Stefan M.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#73827
; Package
emacs
.
(Wed, 12 Feb 2025 00:05:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 73827 <at> debbugs.gnu.org (full text, mbox):
>> @@ -483,8 +483,8 @@
>> (t "error"))
>> (cond ((window-configuration-p (car key)) "W")
>> ((frame-configuration-p (car key)) "F")
>> - ((stringp (car key)) "R")
>> ((string= "Unprintable entity" (car key)) "?")
>
> The change confuses me, are we sure that (car key) must be a string at
> this point? If not, should be prefer `equal' over `string='?
The `string=` was wrong (if we get to that branch we know it's not
a string) and should be `equal`, indeed. It's an orthogonal problem to
the one the OP is solving, tho.
The patch looks fine to me, tho I have no idea how desktop's
"Unprintable entity" can end up in this position: I think this points to
a bug elsewhere.
Stefan
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Thu, 13 Feb 2025 10:24:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Alex Bochannek <alex <at> bochannek.com>
:
bug acknowledged by developer.
(Thu, 13 Feb 2025 10:24:03 GMT)
Full text and
rfc822 format available.
Message #31 received at 73827-done <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefankangas <at> gmail.com> writes:
> Jeremy Bryant <jb <at> jeremybryant.net> writes:
>
>> Alex Bochannek <alex <at> bochannek.com> writes:
>>
>>> Anything else that's needed from me here? I have another trivial fix for
>>> register-list I would like to submit.
>>
>> Thanks alex for your contribution.
>>
>> Adding Philip, any comments or suggestions on this short ELPA patch?
>
> Ping, Philip and/or Stefan M.
Actually, the patch was quite trivial, and there was already an LGTM, so
I went ahead and pushed it.
Feel free to revert, and so on. Boldly closing this bug report.
Thanks Alex, for your contribution to Emacs.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 13 Mar 2025 11:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.