GNU bug report logs - #36603
[PATCH] Simplify calling convention of describe_map

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Thu, 11 Jul 2019 17:35:02 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefan <at> marxist.se>

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 36603 in the body.
You can then email your comments to 36603 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36603; Package emacs. (Thu, 11 Jul 2019 17:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Kangas <stefan <at> marxist.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 11 Jul 2019 17:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Simplify calling convention of describe_map
Date: Thu, 11 Jul 2019 19:34:22 +0200
This patch simplifies the calling convention of describe_map in
keymap.c.

The immediate motivation is to simplify a set of patches that I'm
preparing for Bug#8951 to rewrite substitute-command-keys in Lisp.
But I think this makes sense in any case.

(I'll send the patch in a separate message once this is assigned a bug
number.)

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36603; Package emacs. (Thu, 11 Jul 2019 17:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 36603 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: 36603 <at> debbugs.gnu.org
Subject: Re: bug#36603: [PATCH] Simplify calling convention of describe_map
Date: Thu, 11 Jul 2019 19:37:44 +0200
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefan <at> marxist.se> writes:
> (I'll send the patch in a separate message once this is assigned a bug
> number.)

Patch attached.

Thanks,
Stefan Kangas
[0001-Simplify-calling-convention-of-describe_map-Bug-3660.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36603; Package emacs. (Tue, 20 Aug 2019 15:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 36603 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36603 <at> debbugs.gnu.org
Subject: Re: bug#36603: [PATCH] Simplify calling convention of describe_map
Date: Tue, 20 Aug 2019 11:32:52 -0400
Stefan Kangas <stefan <at> marxist.se> writes:

> +  Lisp_Object seen_orig = Qnil;
> +  Lisp_Object *seen = &seen_orig;

Do we really need the seen_orig variable?  It looks like there is no
reason for having seen as a pointer at all, but maybe I'm missing
something.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36603; Package emacs. (Tue, 20 Aug 2019 16:01:02 GMT) Full text and rfc822 format available.

Message #14 received at 36603 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36603 <at> debbugs.gnu.org
Subject: Re: bug#36603: [PATCH] Simplify calling convention of describe_map
Date: Tue, 20 Aug 2019 12:00:35 -0400
Noam Postavsky <npostavs <at> gmail.com> writes:

> Stefan Kangas <stefan <at> marxist.se> writes:
>
>> +  Lisp_Object seen_orig = Qnil;
>> +  Lisp_Object *seen = &seen_orig;
>
> Do we really need the seen_orig variable?  It looks like there is no
> reason for having seen as a pointer at all, but maybe I'm missing
> something.

Actually, maybe the patch is wrong (i.e., over-simplifying), because it
has describe_map start with a fresh seen pointer each time; but the
current code passes the same pointer to each describe_map call in a
loop.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36603; Package emacs. (Tue, 20 Aug 2019 16:04:03 GMT) Full text and rfc822 format available.

Message #17 received at 36603 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36603 <at> debbugs.gnu.org
Subject: Re: bug#36603: [PATCH] Simplify calling convention of describe_map
Date: Tue, 20 Aug 2019 18:02:56 +0200
Noam Postavsky <npostavs <at> gmail.com> writes:
>
> Noam Postavsky <npostavs <at> gmail.com> writes:
>
> > Stefan Kangas <stefan <at> marxist.se> writes:
> >
> >> +  Lisp_Object seen_orig = Qnil;
> >> +  Lisp_Object *seen = &seen_orig;
> >
> > Do we really need the seen_orig variable?  It looks like there is no
> > reason for having seen as a pointer at all, but maybe I'm missing
> > something.
>
> Actually, maybe the patch is wrong (i.e., over-simplifying), because it
> has describe_map start with a fresh seen pointer each time; but the
> current code passes the same pointer to each describe_map call in a
> loop.

Thanks for that feedback.  I'll take another look and get back to you.

Best regards,
Stefan Kangas




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 11 Nov 2019 18:45:01 GMT) Full text and rfc822 format available.

Notification sent to Stefan Kangas <stefan <at> marxist.se>:
bug acknowledged by developer. (Mon, 11 Nov 2019 18:45:02 GMT) Full text and rfc822 format available.

Message #22 received at 36603-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36603-done <at> debbugs.gnu.org
Subject: Re: bug#36603: [PATCH] Simplify calling convention of describe_map
Date: Mon, 11 Nov 2019 19:44:29 +0100
Stefan Kangas <stefan <at> marxist.se> writes:

>> Actually, maybe the patch is wrong (i.e., over-simplifying), because it
>> has describe_map start with a fresh seen pointer each time; but the
>> current code passes the same pointer to each describe_map call in a
>> loop.
>
> Thanks for that feedback.  I'll take another look and get back to you.

I think your analysis is correct Noam, and I'm working on a different
approach here, although this project is has been put on the
back-burner for now.  I'll get back into it once I can finish up some
other things first.

Thanks for taking the time to review this.  Closing this bug report.

Best regards,
Stefan Kangas




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Dec 2019 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.