GNU bug report logs - #5358
23.1; Adding comment loses customizations in progress

Previous Next

Package: emacs;

Reported by: David Abrahams <dave <at> boostpro.com>

Date: Mon, 11 Jan 2010 19:42:01 UTC

Severity: normal

Tags: confirmed, fixed

Found in version 25.0.95

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 5358 in the body.
You can then email your comments to 5358 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Mon, 11 Jan 2010 19:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Abrahams <dave <at> boostpro.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Jan 2010 19:42:01 GMT) Full text and rfc822 format available.

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

From: David Abrahams <dave <at> boostpro.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.1; Adding comment loses customizations in progress
Date: Mon, 11 Jan 2010 14:41:34 -0500
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Using the customization interface, I can make a change to a variable,
then try to add a comment before saving.  When I do that, the changes
I've already made are lost.

If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.


In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
 of 2009-08-16 on black.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--with-ns''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Major mode: Custom

Minor modes in effect:
  diff-auto-refine-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  server-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-n C-n C-p C-p C-. C-. C-. C-b C-b <return> C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-e <backspace> 0 C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-p C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-a C-p C-. C-. C-, <return> 
7 C-n C-n C-n C-e M-< C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e <backspace> 
0 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-x C-s C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p <M-return> 
<C-return> C-q C-j I SPC r e a l l y SPC d o n ' t 
SPC w a n t SPC t o SPC s e t e <backspace> <backspace> 
e SPC H T M L S-SPC u n l e s s SPC i <backspace> t 
h a t ' s SPC a l l SPC t h e r e SPC i s . <backspace> 
C-c C-c C-x C-s C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p M-x r e p o <tab> r <tab> b <tab> <return>

Recent messages:
Mark set [2 times]
Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
Wrote /Users/dave/src/elisp.repo/elisp/custom.el
Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
Wrote /Users/dave/src/elisp.repo/elisp/custom.el
Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
Making completion list...
-- 
Dave Abrahams           Meet me at BoostCon: http://www.boostcon.com
BoostPro Computing
http://www.boostpro.com






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Wed, 17 Feb 2016 03:49:01 GMT) Full text and rfc822 format available.

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

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: David Abrahams <dave <at> boostpro.com>
Cc: 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Tue, 16 Feb 2016 22:48:33 -0500
Sorry, I don't understand this bug report. What do you mean by adding
comments?

David Abrahams <dave <at> boostpro.com> writes:

> Please write in English if possible, because the Emacs maintainers
> usually do not have translators to read other languages for them.
>
> Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
> and to the gnu.emacs.bug news group.
>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
>
> Using the customization interface, I can make a change to a variable,
> then try to add a comment before saving.  When I do that, the changes
> I've already made are lost.
>
> If Emacs crashed, and you have the Emacs process in the gdb debugger,
> please include the output from the following gdb commands:
>     `bt full' and `xbacktrace'.
> If you would like to further debug the crash, please read the file
> /Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.
>
>
> In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
>  of 2009-08-16 on black.local
> Windowing system distributor `Apple', version 10.3.1038
> configured using `configure  '--with-ns''
>
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: nil
>   value of $XMODIFIERS: nil
>   locale-coding-system: nil
>   default-enable-multibyte-characters: t
>
> Major mode: Custom
>
> Minor modes in effect:
>   diff-auto-refine-mode: t
>   shell-dirtrack-mode: t
>   show-paren-mode: t
>   server-mode: t
>   global-auto-revert-mode: t
>   delete-selection-mode: t
>   tooltip-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   global-auto-composition-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent input:
> C-n C-n C-p C-p C-. C-. C-. C-b C-b <return> C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
> C-e <backspace> 0 C-n C-n C-n C-n C-n C-n C-n C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
> C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p 
> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
> C-p C-p C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-p C-n C-n C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-a C-p C-. C-. C-, <return> 
> 7 C-n C-n C-n C-e M-< C-n C-n C-n C-n C-n C-n C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e <backspace> 
> 0 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p 
> C-p C-p C-p C-p C-p C-p C-p C-x C-s C-n C-n C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p <M-return> 
> <C-return> C-q C-j I SPC r e a l l y SPC d o n ' t 
> SPC w a n t SPC t o SPC s e t e <backspace> <backspace> 
> e SPC H T M L S-SPC u n l e s s SPC i <backspace> t 
> h a t ' s SPC a l l SPC t h e r e SPC i s . <backspace> 
> C-c C-c C-x C-s C-p C-p C-p C-p C-p C-p C-p C-p C-p 
> C-p C-p M-x r e p o <tab> r <tab> b <tab> <return>
>
> Recent messages:
> Mark set [2 times]
> Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
> Wrote /Users/dave/src/elisp.repo/elisp/custom.el
> Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
> Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
> Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
> Wrote /Users/dave/src/elisp.repo/elisp/custom.el
> Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
> Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
> Making completion list...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Thu, 18 Feb 2016 15:31:01 GMT) Full text and rfc822 format available.

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

From: Dave Abrahams <dave <at> boostpro.com>
To: Andrew Hyatt <ahyatt <at> gmail.com>
Cc: 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Thu, 18 Feb 2016 07:29:56 -0800
There's an choice in the customization UI on emacsen < 24.5 that lets you add
a comment to any customization, but now I don't see it.  Apparently that
feature was dropped :(

on Tue Feb 16 2016, Andrew Hyatt <ahyatt-AT-gmail.com> wrote:

> Sorry, I don't understand this bug report. What do you mean by adding
> comments?
>
> David Abrahams <dave <at> boostpro.com> writes:
>
>> Please write in English if possible, because the Emacs maintainers
>> usually do not have translators to read other languages for them.
>>
>> Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
>> and to the gnu.emacs.bug news group.
>>
>> Please describe exactly what actions triggered the bug
>> and the precise symptoms of the bug:
>>
>> Using the customization interface, I can make a change to a variable,
>> then try to add a comment before saving.  When I do that, the changes
>> I've already made are lost.
>>
>> If Emacs crashed, and you have the Emacs process in the gdb debugger,
>> please include the output from the following gdb commands:
>>     `bt full' and `xbacktrace'.
>> If you would like to further debug the crash, please read the file
>> /Applications/Emacs.app/Contents/Resources/etc/DEBUG for instructions.
>>
>>
>> In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
>>  of 2009-08-16 on black.local
>> Windowing system distributor `Apple', version 10.3.1038
>> configured using `configure  '--with-ns''
>>
>> Important settings:
>>   value of $LC_ALL: nil
>>   value of $LC_COLLATE: nil
>>   value of $LC_CTYPE: nil
>>   value of $LC_MESSAGES: nil
>>   value of $LC_MONETARY: nil
>>   value of $LC_NUMERIC: nil
>>   value of $LC_TIME: nil
>>   value of $LANG: nil
>>   value of $XMODIFIERS: nil
>>   locale-coding-system: nil
>>   default-enable-multibyte-characters: t
>>
>> Major mode: Custom
>>
>> Minor modes in effect:
>>   diff-auto-refine-mode: t
>>   shell-dirtrack-mode: t
>>   show-paren-mode: t
>>   server-mode: t
>>   global-auto-revert-mode: t
>>   delete-selection-mode: t
>>   tooltip-mode: t
>>   mouse-wheel-mode: t
>>   menu-bar-mode: t
>>   file-name-shadow-mode: t
>>   global-font-lock-mode: t
>>   font-lock-mode: t
>>   global-auto-composition-mode: t
>>   auto-composition-mode: t
>>   auto-encryption-mode: t
>>   auto-compression-mode: t
>>   line-number-mode: t
>>   transient-mark-mode: t
>>
>> Recent input:
>> C-n C-n C-p C-p C-. C-. C-. C-b C-b <return> C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
>> C-e <backspace> 0 C-n C-n C-n C-n C-n C-n C-n C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
>> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
>> C-p C-p C-p C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p 
>> C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
>> C-p C-p C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-p C-n C-n C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-a C-p C-. C-. C-, <return> 
>> 7 C-n C-n C-n C-e M-< C-n C-n C-n C-n C-n C-n C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e <backspace> 
>> 0 C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p 
>> C-p C-p C-p C-p C-p C-p C-p C-x C-s C-n C-n C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
>> C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p <M-return> 
>> <C-return> C-q C-j I SPC r e a l l y SPC d o n ' t 
>> SPC w a n t SPC t o SPC s e t e <backspace> <backspace> 
>> e SPC H T M L S-SPC u n l e s s SPC i <backspace> t 
>> h a t ' s SPC a l l SPC t h e r e SPC i s . <backspace> 
>> C-c C-c C-x C-s C-p C-p C-p C-p C-p C-p C-p C-p C-p 
>> C-p C-p M-x r e p o <tab> r <tab> b <tab> <return>
>>
>> Recent messages:
>> Mark set [2 times]
>> Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
>> Wrote /Users/dave/src/elisp.repo/elisp/custom.el
>> Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
>> Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
>> Saving file /Users/dave/src/elisp.repo/elisp/custom.el...
>> Wrote /Users/dave/src/elisp.repo/elisp/custom.el
>> Compiling /Users/dave/src/elisp.repo/elisp/custom.el...done
>> Wrote /Users/dave/src/elisp.repo/elisp/custom.elc
>> Making completion list...

-- 
-Dave




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Thu, 18 Feb 2016 16:49:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: Andrew Hyatt <ahyatt <at> gmail.com>, 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Thu, 18 Feb 2016 11:47:58 -0500
?

M-x customize-variable RET fill-column RET
Click "State", see "Add Comment".

(Current master.)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 19 Feb 2016 16:19:01 GMT) Full text and rfc822 format available.

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

From: Andrew Hyatt <ahyatt <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Dave Abrahams <dave <at> boostpro.com>, 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 19 Feb 2016 11:18:11 -0500
Thanks, now I see it.

Now that I see it, I was able to reproduce this bug on Emacs 25.

Glenn Morris <rgm <at> gnu.org> writes:

> ?
>
> M-x customize-variable RET fill-column RET
> Click "State", see "Add Comment".
>
> (Current master.)




Added tag(s) confirmed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 08 Jul 2016 01:14:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 25.0.95. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Fri, 08 Jul 2016 01:14:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 06 Sep 2019 14:49:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 5358 <at> debbugs.gnu.org
Cc: dave <at> boostpro.com, Glenn Morris <rgm <at> gnu.org>, ahyatt <at> gmail.com
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 6 Sep 2019 11:47:57 -0300
[Message part 1 (text/plain, inline)]
The possibility to preserve the customizations in progress is already
present in the customize machinery, but for some reason it wasn't used
in this case.

I propose a patch that makes use of the :shown-value property of the
custom-variable and custom-face widgets, thus allowing to preserve the
customizations in progress when redrawing a widget.

Since after redrawing customize recomputes the state of the widget, it
is necessary to check if the widget was modified.  That isn't
possible with `custom-variable-state' or `custom-face-state',
because they are pretty "widget unaware".  So I added a check in
`custom-variable-state-set' and `custom-face-state-set' to catch this
situation.

Finally, to be able to use the value of the widget in
`custom-face-state-set', it is necessary to rearrange the final part of
`custom-face-value-create'.  Namely, add the children to the :children
property, before calling `custom-face-state-set'.

Best regards,
Mauro.
[Message part 2 (text/html, inline)]
[0001-Don-t-discard-customizations-in-progress-when-adding.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 27 Sep 2019 12:32:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 5358 <at> debbugs.gnu.org
Cc: Dave Abrahams <dave <at> boostpro.com>, Glenn Morris <rgm <at> gnu.org>,
 ahyatt <at> gmail.com
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 09:31:31 -0300
[Message part 1 (text/plain, inline)]
I added a test for this change.

Best regards,
Mauro.
[Message part 2 (text/html, inline)]
[0001-Don-t-discard-customizations-in-progress-when-adding.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 27 Sep 2019 14:10:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Dave Abrahams <dave <at> boostpro.com>, ahyatt <at> gmail.com, 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 16:09:40 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Subject: [PATCH] Don't discard customizations in progress when adding comments
>  (Bug#5358)

Looks good to me.  Just one tiny comment:

> +  (condition-case nil
> +      (let* ((symbol (widget-get widget :value))
> +             (get (or (get symbol 'custom-get) 'default-value))
> +             (value (if (default-boundp symbol)
> +                        (funcall get symbol)
> +                      (symbol-value symbol))))
> +        (not (equal value (widget-value (car (widget-get widget :children))))))
> +    (error t)))

If it's just the funcall you expect that might fail, then moving the
condition-case down there might be a better choice.  Having a
condition-case around code that shouldn't fail can hide errors you don't
want to hide.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 27 Sep 2019 15:05:02 GMT) Full text and rfc822 format available.

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

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Dave Abrahams <dave <at> boostpro.com>, ahyatt <at> gmail.com, 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 12:04:37 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Subject: [PATCH] Don't discard customizations in progress when adding
comments
>>  (Bug#5358)
>
> Looks good to me.  Just one tiny comment:
>
>> +  (condition-case nil
>> +      (let* ((symbol (widget-get widget :value))
>> +             (get (or (get symbol 'custom-get) 'default-value))
>> +             (value (if (default-boundp symbol)
>> +                        (funcall get symbol)
>> +                      (symbol-value symbol))))
>> +        (not (equal value (widget-value (car (widget-get widget
:children))))))
>> +    (error t)))
>
> If it's just the funcall you expect that might fail, then moving the
> condition-case down there might be a better choice.  Having a
> condition-case around code that shouldn't fail can hide errors you don't
> want to hide.

Right, thanks for noticing that.

I've moved down the condition-case, and I've added an outer catch, to
avoid the comparison in case of an error.  I think that's OK, but if you
see something wrong, please let me know.
[Message part 2 (text/html, inline)]
[0001-Don-t-discard-customizations-in-progress-when-adding.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5358; Package emacs. (Fri, 27 Sep 2019 16:08:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: Dave Abrahams <dave <at> boostpro.com>, ahyatt <at> gmail.com, 5358 <at> debbugs.gnu.org
Subject: Re: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 18:07:03 +0200
Mauro Aranda <maurooaranda <at> gmail.com> writes:

> I've moved down the condition-case, and I've added an outer catch, to
> avoid the comparison in case of an error.  I think that's OK, but if you
> see something wrong, please let me know.

Looks good to me, so I've applied it to the trunk now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2019 16:08:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 5358 <at> debbugs.gnu.org and David Abrahams <dave <at> boostpro.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2019 16:08: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, 26 Oct 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 238 days ago.

Previous Next


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