GNU bug report logs -
#41742
28.0.50; Derive gnus-edit-form-mode from lisp-data-mode
Previous Next
Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date: Sat, 6 Jun 2020 19:25:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>
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 41742 in the body.
You can then email your comments to 41742 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#41742
; Package
emacs
.
(Sat, 06 Jun 2020 19:25:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eric Abrahamsen <eric <at> ericabrahamsen.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 06 Jun 2020 19:25:02 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)]
Hopefully this is fairly uncontroversial: Gnus has a gnus-edit-form-mode
for editing group parameters and other things, which presents the data
as elisp forms and is a perfect use-case for lisp-data-mode -- turning
on paredit or what have you. This patch derives the former from the
latter.
Eric
[0001-Derive-gnus-edit-form-mode-from-lisp-data-mode.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 20:07:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 41742 <at> debbugs.gnu.org (full text, mbox):
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> Hopefully this is fairly uncontroversial: Gnus has a gnus-edit-form-mode
> for editing group parameters and other things, which presents the data
> as elisp forms and is a perfect use-case for lisp-data-mode -- turning
> on paredit or what have you. This patch derives the former from the
> latter.
LGTM, FWIW.
While there, would you mind cleaning up how gnus-edit-form-mode-map is
defined? It currently does a defvar+unless+setq dance, whereas it
should ideally only be a defvar+let, as per the last few paragraphs of
(info "(elisp) Tips for Defining").
Thanks,
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 20:26:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 41742 <at> debbugs.gnu.org (full text, mbox):
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Hopefully this is fairly uncontroversial: Gnus has a gnus-edit-form-mode
>> for editing group parameters and other things, which presents the data
>> as elisp forms and is a perfect use-case for lisp-data-mode -- turning
>> on paredit or what have you. This patch derives the former from the
>> latter.
>
> LGTM, FWIW.
>
> While there, would you mind cleaning up how gnus-edit-form-mode-map is
> defined? It currently does a defvar+unless+setq dance, whereas it
> should ideally only be a defvar+let, as per the last few paragraphs of
> (info "(elisp) Tips for Defining").
Huh, the last few paragraphs of that info page make it look like it's
_okay_ to do defvar+unless+setq, am I misreading this? Granted it only
says to do it so you can get the docstring closer to the defvar, and
there's no docstring in this case, but it does seem acceptable.
I wonder what the point of writing it this way is, otherwise?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 22:32:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 41742 <at> debbugs.gnu.org (full text, mbox):
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> While there, would you mind cleaning up how gnus-edit-form-mode-map is
>> defined? It currently does a defvar+unless+setq dance, whereas it
>> should ideally only be a defvar+let, as per the last few paragraphs of
>> (info "(elisp) Tips for Defining").
>
> Huh, the last few paragraphs of that info page make it look like it's
> _okay_ to do defvar+unless+setq, am I misreading this? Granted it only
> says to do it so you can get the docstring closer to the defvar, and
> there's no docstring in this case, but it does seem acceptable.
I posit it's always better to defvar+let in one swell foop.
> I wonder what the point of writing it this way is, otherwise?
In most places I've seen defvar+unless, it's due to the author thinking
in terms of "if the user hasn't already defined this map before loading
this file, then..."
But defvar provides these semantics for free and in a cleaner way.
Unless I'm missing something, that is.
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 23:35:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 41742 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 06/06/20 23:31 PM, Basil L. Contovounesios wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>>
>>> While there, would you mind cleaning up how gnus-edit-form-mode-map is
>>> defined? It currently does a defvar+unless+setq dance, whereas it
>>> should ideally only be a defvar+let, as per the last few paragraphs of
>>> (info "(elisp) Tips for Defining").
>>
>> Huh, the last few paragraphs of that info page make it look like it's
>> _okay_ to do defvar+unless+setq, am I misreading this? Granted it only
>> says to do it so you can get the docstring closer to the defvar, and
>> there's no docstring in this case, but it does seem acceptable.
>
> I posit it's always better to defvar+let in one swell foop.
In principle, I agree.
>> I wonder what the point of writing it this way is, otherwise?
>
> In most places I've seen defvar+unless, it's due to the author thinking
> in terms of "if the user hasn't already defined this map before loading
> this file, then..."
>
> But defvar provides these semantics for free and in a cleaner way.
>
> Unless I'm missing something, that is.
I can't imagine anyone actually defining the whole map in their own
config, rather than just adding keybindings as necessary. And as you
(and the manual) point out, defvar already handles atomic
definition/double loading avoidance, etc.
Here's another version...
[0001-Derive-gnus-edit-form-mode-from-lisp-data-mode-fix-m.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 23:42:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 41742 <at> debbugs.gnu.org (full text, mbox):
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> Here's another version...
Thanks, LGTM except for one tiny nit.
> From 0ee576ed0819a15a37a01e2b3a3bc176e9827c04 Mon Sep 17 00:00:00 2001
> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
> Date: Sat, 6 Jun 2020 12:13:15 -0700
> Subject: [PATCH] Derive gnus-edit-form-mode from lisp-data-mode, fix mode map
>
> * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Handy for users who
> have turned on things like paredit for lisp-data-mode.
I'd say "Derive from lisp-data-mode" here as well, since the sentence
does not otherwise stand on its own without the preceding commit
summary's context.
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Sat, 06 Jun 2020 23:47:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 41742 <at> debbugs.gnu.org (full text, mbox):
On 06/07/20 00:41 AM, Basil L. Contovounesios wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Here's another version...
>
> Thanks, LGTM except for one tiny nit.
>
>> From 0ee576ed0819a15a37a01e2b3a3bc176e9827c04 Mon Sep 17 00:00:00 2001
>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Date: Sat, 6 Jun 2020 12:13:15 -0700
>> Subject: [PATCH] Derive gnus-edit-form-mode from lisp-data-mode, fix mode map
>>
>> * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Handy for users who
>> have turned on things like paredit for lisp-data-mode.
>
> I'd say "Derive from lisp-data-mode" here as well, since the sentence
> does not otherwise stand on its own without the preceding commit
> summary's context.
Sure! I've made the change locally. I'll wait a few days for possible
objections (though I don't expect any) and then push.
Thanks,
Eric
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#41742
; Package
emacs
.
(Fri, 12 Jun 2020 16:32:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 41742 <at> debbugs.gnu.org (full text, mbox):
On 06/07/20 00:41 AM, Basil L. Contovounesios wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Here's another version...
>
> Thanks, LGTM except for one tiny nit.
>
>> From 0ee576ed0819a15a37a01e2b3a3bc176e9827c04 Mon Sep 17 00:00:00 2001
>> From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
>> Date: Sat, 6 Jun 2020 12:13:15 -0700
>> Subject: [PATCH] Derive gnus-edit-form-mode from lisp-data-mode, fix mode map
>>
>> * lisp/gnus/gnus-eform.el (gnus-edit-form-mode): Handy for users who
>> have turned on things like paredit for lisp-data-mode.
>
> I'd say "Derive from lisp-data-mode" here as well, since the sentence
> does not otherwise stand on its own without the preceding commit
> summary's context.
Done, and pushed. Thanks!
Reply sent
to
Eric Abrahamsen <eric <at> ericabrahamsen.net>
:
You have taken responsibility.
(Fri, 12 Jun 2020 16:32:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Eric Abrahamsen <eric <at> ericabrahamsen.net>
:
bug acknowledged by developer.
(Fri, 12 Jun 2020 16:32:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 11 Jul 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 339 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.