From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ryan C. Thompson" Newsgroups: gmane.emacs.bugs Subject: bug#5056: Minor fix for a defcustom in savehist mode (patch included) Date: Thu, 26 Nov 2009 22:39:00 -0800 Message-ID: <4B0F7404.2080106@thompsonclan.org> Reply-To: "Ryan C. Thompson" , 5056@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010704090205080107080301" X-Trace: ger.gmane.org 1259307419 16684 80.91.229.12 (27 Nov 2009 07:36:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2009 07:36:59 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 27 08:36:52 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NDvNs-0006U5-0m for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Nov 2009 08:36:52 +0100 Original-Received: from localhost ([127.0.0.1]:37264 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDvNr-0001ee-2n for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Nov 2009 02:36:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDuc6-0004fC-5U for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:47:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDuc1-0004cK-Pu for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:47:29 -0500 Original-Received: from [199.232.76.173] (port=44547 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDuc1-0004cE-Kx for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:47:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46246) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDuc0-00010c-PQ for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:47:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAR6lMSM019913; Thu, 26 Nov 2009 22:47:22 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAR6j5CM019629; Thu, 26 Nov 2009 22:45:05 -0800 Resent-Date: Thu, 26 Nov 2009 22:45:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Ryan C. Thompson" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 27 Nov 2009 06:45:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 5056 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125930395619190 (code B ref -1); Fri, 27 Nov 2009 06:45:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 27 Nov 2009 06:39:16 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAR6dFtj019187 for ; Thu, 26 Nov 2009 22:39:16 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDuU6-0007HM-Ku for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:39:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDuU0-0007E5-Cz for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:39:13 -0500 Original-Received: from [199.232.76.173] (port=59770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDuU0-0007Dj-1L for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:39:08 -0500 Original-Received: from mail-pw0-f47.google.com ([209.85.160.47]:35588) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDuTz-0008VV-IQ for bug-gnu-emacs@gnu.org; Fri, 27 Nov 2009 01:39:07 -0500 Original-Received: by pwi9 with SMTP id 9so949381pwi.26 for ; Thu, 26 Nov 2009 22:39:02 -0800 (PST) Original-Received: by 10.114.237.24 with SMTP id k24mr1352245wah.5.1259303942142; Thu, 26 Nov 2009 22:39:02 -0800 (PST) Original-Received: from ?192.168.1.100? (user-0c9h9j8.cable.mindspring.com [24.152.166.104]) by mx.google.com with ESMTPS id 22sm979475pzk.14.2009.11.26.22.39.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 26 Nov 2009 22:39:01 -0800 (PST) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 27 Nov 2009 01:47:29 -0500 X-Mailman-Approved-At: Fri, 27 Nov 2009 02:20:20 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32980 Archived-At: This is a multi-part message in MIME format. --------------010704090205080107080301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 * 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 --------------010704090205080107080301 Content-Type: message/rfc822; name="Re: minor bugfix for savehist mode.eml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Re: minor bugfix for savehist mode.eml" Delivered-To: rct@thompsonclan.org Received: by 10.223.107.1 with SMTP id z1cs24249fao; Mon, 31 Aug 2009 04:37:39 -0700 (PDT) Received: by 10.204.36.210 with SMTP id u18mr4281052bkd.19.1251718658921; Mon, 31 Aug 2009 04:37:38 -0700 (PDT) Return-Path: Received: from jimbo.globalnet.hr (jimbo.bnet.hr [213.149.32.23]) by mx.google.com with ESMTP id 25si5094087bwz.82.2009.08.31.04.37.38; Mon, 31 Aug 2009 04:37:38 -0700 (PDT) Received-SPF: neutral (google.com: 213.149.32.23 is neither permitted nor denied by best guess record for domain of hniksic@xemacs.org) client-ip=213.149.32.23; Authentication-Results: mx.google.com; spf=neutral (google.com: 213.149.32.23 is neither permitted nor denied by best guess record for domain of hniksic@xemacs.org) smtp.mail=hniksic@xemacs.org Received: from mail.globalnet.hr (cartman.globalnet.hr [213.149.32.10]) by jimbo.globalnet.hr (Postfix) with ESMTP id 693AB2D52AF for ; Mon, 31 Aug 2009 13:37:33 +0200 (CEST) Received: (qmail 15175 invoked from network); 31 Aug 2009 11:37:33 -0000 X-Mail-Scanner: Scanned by qSheff-II-2.1-r2 (http://www.enderunix.org/qsheff/) Received: from cpezg-94-253-142-222-cbl.xnet.hr (HELO mulj) ([94.253.142.222]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 31 Aug 2009 11:37:33 -0000 Received: from hniksic by mulj with local (Exim 4.69) (envelope-from ) id 1Mi5CN-00056D-Lo for rct@thompsonclan.org; Mon, 31 Aug 2009 13:37:23 +0200 From: Hrvoje Niksic To: "Ryan C. Thompson" Subject: Re: minor bugfix for savehist mode References: <4A9AE586.8060201@thompsonclan.org> Date: Mon, 31 Aug 2009 13:37:23 +0200 In-Reply-To: <4A9AE586.8060201@thompsonclan.org> (Ryan C. Thompson's message of "Sun, 30 Aug 2009 13:48:06 -0700") Message-ID: <87pracgqoc.fsf@busola.homelinux.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Ryan C. Thompson" 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. --------------010704090205080107080301--