GNU bug report logs - #5056
Minor fix for a defcustom in savehist mode (patch included)

Previous Next

Package: emacs;

Reported by: "Ryan C. Thompson" <rct <at> thompsonclan.org>

Date: Fri, 27 Nov 2009 06:45:04 UTC

Severity: normal

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Ryan C. Thompson" <rct <at> thompsonclan.org>
Subject: bug#5056 closed by Juanma Barranquero <lekktu <at> gmail.com> (Re:
 bug#5056: Minor fix for a defcustom in savehist mode (patch  included))
Date: Mon, 30 Nov 2009 23:45:04 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#5056: Minor fix for a defcustom in savehist mode (patch included)

It has been closed by Juanma Barranquero <lekktu <at> gmail.com>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Juanma Barranquero <lekktu <at> gmail.com> by
replying to this email.


-- 
5056: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5056
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Juanma Barranquero <lekktu <at> gmail.com>
To: "Ryan C. Thompson" <rct <at> thompsonclan.org>
Cc: 5056-done <at> debbugs.gnu.org
Subject: Re: bug#5056: Minor fix for a defcustom in savehist mode (patch 
	included)
Date: Tue, 1 Dec 2009 00:39:47 +0100
On Fri, Nov 27, 2009 at 07:39, Ryan C. Thompson <rct <at> thompsonclan.org> wrote:

> make things clearer for the user. Here is the one-line diff (assuming
> that it doesn't get too badly mangled in transit):

Applied, thanks.

    Juanma
[Message part 3 (message/rfc822, inline)]
From: "Ryan C. Thompson" <rct <at> thompsonclan.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Minor fix for a defcustom in savehist mode (patch included)
Date: Thu, 26 Nov 2009 22:39:00 -0800
[Message part 4 (text/plain, inline)]
While customizing savehist mode through the emacs Custom interface, I
discovered that I could not set `savehist-autosave-interval' to nil
because the custom buffer only had an integer entry field for that
variable, although the docstring said that nil was a valid value. So I
edited the custom definition to allow choosing either nil or an integer,
instead of just an integer. I also added labels to the two choices to
make things clearer for the user. Here is the one-line diff (assuming
that it doesn't get too badly mangled in transit):

BEGIN DIFF
*** old/savehist.el    2009-11-26 21:47:52.378311830 -0800
--- new/savehist.el    2009-11-26 21:19:12.118518476 -0800
***************
*** 120,126 ****
 (defcustom savehist-autosave-interval (* 5 60)
   "The interval between autosaves of minibuffer history.
 If set to nil, disables timer-based autosaving."
!   :type 'integer
   :group 'savehist)

 (defcustom savehist-mode-hook nil
--- 120,127 ----
 (defcustom savehist-autosave-interval (* 5 60)
   "The interval between autosaves of minibuffer history.
 If set to nil, disables timer-based autosaving."
!   :type '(choice (const :tag "Disabled" nil)
!                  (integer :tag "Seconds" 300))
   :group 'savehist)

 (defcustom savehist-mode-hook nil
END DIFF

Here is my attempt at manually writing a changelog entry:

BEGIN CHANGELOG
    2009-11-62  Ryan C. Thompson  <rct <at> thompsonclan.org>

            * savehist.el: Allow setting `savehist-autosave-interval'
              to nil in Custom.
END CHANGELOG

If it matters, you have my blessing to license this code however you please.

- Ryan Thompson
[Re: minor bugfix for savehist mode.eml (message/rfc822, inline)]
From: Hrvoje Niksic <hniksic <at> xemacs.org>
To: "Ryan C. Thompson" <rct <at> thompsonclan.org>
Subject: Re: minor bugfix for savehist mode
Date: Mon, 31 Aug 2009 13:37:23 +0200
"Ryan C. Thompson" <rct <at> thompsonclan.org> writes:

> I would like to submit a minor improvement for savehist mode. I
> noticed that the variable savehist-autosave-interval could be either
> an integer or nil, but its definition allowed it to be customized only
> as an integer. I changed the definition to allow it to also be set to
> nil in Custom.

Please post your bugfix to Emacs maintainers so it gets incorporated
into the next release.  I no longer actively maintain savehist-mode.

Thank you.

This bug report was last modified 15 years and 180 days ago.

Previous Next


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