GNU bug report logs - #12309
24.2.50; Option `(bookmark-)version-control': Use :tag so doc string matches menu

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 29 Aug 2012 22:59:02 UTC

Severity: normal

Found in version 24.2.50

Done: Karl Fogel <kfogel <at> red-bean.com>

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 12309 in the body.
You can then email your comments to 12309 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#12309; Package emacs. (Wed, 29 Aug 2012 22:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 29 Aug 2012 22:59:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.2.50;
	Option `(bookmark-)version-control': Use :tag so doc string matches
	menu
Date: Wed, 29 Aug 2012 15:57:05 -0700
The doc strings of these variables speak of values t, nil, `never', and
(for `bookmark-version-control) `nospecial'.
 
The Value Menu for `version-control' shows "Never", "If existing",
"Always".  At least you can see the correspondence, because the same
words are used - you can tell that "Always" corresponds to "always" in
the doc string, which corresponds to value `t'.
 
The Value Menu for `bookmark-version-control' shows "nil", "never",
"nospecial", and "Other".  It is "Other" that is problematic for a user
- it doesn't correspond to anything in the doc string (except by process
of elimination).
 
Please use :tag to make things clearer.  In particular, use something
besides "Other" (the default name) for `t' (i.e., for any other non-nil value
than `never' and `nospecial').
 

In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600)
 of 2012-08-26 on MARVIN
Bzr revision: 109788 dmantipov <at> yandex.ru-20120827041533-3cy7pdjdqz14o90c
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Sun, 16 Sep 2012 23:34:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <12309 <at> debbugs.gnu.org>
Subject: RE: bug#12309: 24.2.50;
	Option `(bookmark-)version-control': Use :tag so doc string
	matchesmenu
Date: Sun, 16 Sep 2012 16:32:26 -0700
ping





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Mon, 01 Oct 2012 04:07:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Karl Fogel'" <kfogel <at> red-bean.com>, <12309 <at> debbugs.gnu.org>,
	<12507 <at> debbugs.gnu.org>
Subject: RE: bug#12507: Option `(bookmark-)version-control': Use :tag so
	docstring matches menu
Date: Sun, 30 Sep 2012 21:06:00 -0700
Ouch!

You fixed bug #12309, Karl (thanks; looks good).  But you closed bug #12507
instead.

Please reopen #12507 and correct the subject lines etc. of the mails if needed,
so that things are put right again.  It is #12309 that should be closed, not
@12507.

To answer your questions:

`other' in a `choice' just means any value other than the other choices listed.
If the user picks the `other' choice interactively then the value given (`t'
here) is used.  E.g., if you set the variable to 99999 (outside of Customize)
then it will act just like a value of `t'.

The last sentence of the original report just meant to please at least use a
:tag for the `other' choice.  It is the one where a :tag is most important for
clarity.  But you've added :tag for each of them, which is even better.

Thx - Drew

P.S. FWIW, here is what I've been using for this defcustom.  It's almost the
same as what you have.

"Whether to make numbered backups of your bookmarking files.
The option can have value `nospecial', `t', `nil', or `never' .  Value
`nospecial' means to use the `version-control' value.  The others have
the same meanings as for option `version-control'.

Use value `t' if your bookmarks are important to you.  Consider also
using numeric backups.  See also nodes `Backup Names' and `Backup
Deletion' in the Emacs manual."

  :type '(choice :tag "When to make numbered backups"
          (const :tag "Use value of option `version-control'" nospecial)
          (const :tag "Never"                                 never)
          (const :tag "If existing already"                   nil)
          (other :tag "Always"                                t))

> From: Karl Fogel Sent: Sunday, September 30, 2012 8:38 PM
> To: 12507-done <at> debbugs.gnu.org
> Subject: bug#12507: Option `(bookmark-)version-control': Use 
> :tag so docstring matches menu
> 
> Fixed (see below), but please review.  
> 
> I don't fully understand the whole customization system 
> because I never
> use it myself (I just read doc strings and set variables directly in
> Elisp), so I don't quite get what `other' mean if used instead of
> `const', and I didn't fully understand the last paragraph of the
> original bug report.  I looked in the Info pages, but they didn't
> clarify much about this.
> 
> -Karl
> 
> Revision info:
> 
>   revno: 110305
>   revision-id: kfogel <at> red-bean.com-20121001033206-5eja4ztyhs1sjm7q
>   parent: cyd <at> gnu.org-20121001031702-2mei04wuzv2pk1e7
>   committer: Karl Fogel <kfogel <at> red-bean.com>
>   branch nick: trunk
>   timestamp: Sun 2012-09-30 22:32:06 -0500
>   message:
>     * lisp/bookmark.el (bookmark-version-control): Give tags in the
>       :type choices (Bug#12309), and improve doc string.
> 
> Diff:
> 
>   === modified file 'lisp/ChangeLog'
>   --- lisp/ChangeLog	2012-10-01 02:07:14 +0000
>   +++ lisp/ChangeLog	2012-10-01 03:31:41 +0000
>   @@ -1,3 +1,8 @@
>   +2012-10-01  Karl Fogel  <kfogel <at> red-bean.com>
>   +
>   +	* bookmark.el (bookmark-version-control): Give tags in the
>   +	:type choices (Bug#12309), and improve doc string.
>   +
>    2012-10-01  Paul Eggert  <eggert <at> cs.ucla.edu>
>    
>    	Revert the FOLLOW-SYMLINKS change for file-attributes.
>   
>   === modified file 'lisp/bookmark.el'
>   --- lisp/bookmark.el	2012-09-25 04:13:02 +0000
>   +++ lisp/bookmark.el	2012-10-01 03:32:18 +0000
>   @@ -99,12 +99,14 @@
>    
>    (defcustom bookmark-version-control 'nospecial
>      "Whether or not to make numbered backups of the bookmark file.
>   -It can have four values: t, nil, `never', and `nospecial'.
>   +It can have four values: t, nil, `never', or `nospecial'.
>    The first three have the same meaning that they do for the
>   -variable `version-control', and the final value 
> `nospecial' means just
>   -use the value of `version-control'."
>   -  :type '(choice (const nil) (const never) (const nospecial)
>   -		 (other t))
>   +variable `version-control'; the value `nospecial' (the 
> default) means
>   +just use the value of `version-control'."
>   +  :type '(choice (const :tag "If existing" nil)
>   +                 (const :tag "Never" never)
>   +                 (const :tag "Use the value of 
> `version-control'" nospecial)
>   +                 (const :tag "Always" t))
>      :group 'bookmark)





Reply sent to Karl Fogel <kfogel <at> red-bean.com>:
You have taken responsibility. (Mon, 01 Oct 2012 04:38:16 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Mon, 01 Oct 2012 04:38:17 GMT) Full text and rfc822 format available.

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

From: Karl Fogel <kfogel <at> red-bean.com>
To: 12309-done <at> debbugs.gnu.org
Subject: Re: Option `(bookmark-)version-control': Use :tag so doc string
	matches menu
Date: Sun, 30 Sep 2012 23:37:11 -0500
Fixed (see below), but please review.  

I don't fully understand the whole customization system because I never
use it myself (I just read doc strings and set variables directly in
Elisp), so I don't quite get what `other' mean if used instead of
`const', and I didn't fully understand the last paragraph of the
original bug report.  I looked in the Info pages, but they didn't
clarify much about this.

-Karl

Revision info:

  revno: 110305
  revision-id: kfogel <at> red-bean.com-20121001033206-5eja4ztyhs1sjm7q
  parent: cyd <at> gnu.org-20121001031702-2mei04wuzv2pk1e7
  committer: Karl Fogel <kfogel <at> red-bean.com>
  branch nick: trunk
  timestamp: Sun 2012-09-30 22:32:06 -0500
  message:
    * lisp/bookmark.el (bookmark-version-control): Give tags in the
      :type choices (Bug#12309), and improve doc string.

Diff:

  === modified file 'lisp/ChangeLog'
  --- lisp/ChangeLog	2012-10-01 02:07:14 +0000
  +++ lisp/ChangeLog	2012-10-01 03:31:41 +0000
  @@ -1,3 +1,8 @@
  +2012-10-01  Karl Fogel  <kfogel <at> red-bean.com>
  +
  +	* bookmark.el (bookmark-version-control): Give tags in the
  +	:type choices (Bug#12309), and improve doc string.
  +
   2012-10-01  Paul Eggert  <eggert <at> cs.ucla.edu>
   
   	Revert the FOLLOW-SYMLINKS change for file-attributes.
  
  === modified file 'lisp/bookmark.el'
  --- lisp/bookmark.el	2012-09-25 04:13:02 +0000
  +++ lisp/bookmark.el	2012-10-01 03:32:18 +0000
  @@ -99,12 +99,14 @@
   
   (defcustom bookmark-version-control 'nospecial
     "Whether or not to make numbered backups of the bookmark file.
  -It can have four values: t, nil, `never', and `nospecial'.
  +It can have four values: t, nil, `never', or `nospecial'.
   The first three have the same meaning that they do for the
  -variable `version-control', and the final value `nospecial' means just
  -use the value of `version-control'."
  -  :type '(choice (const nil) (const never) (const nospecial)
  -		 (other t))
  +variable `version-control'; the value `nospecial' (the default) means
  +just use the value of `version-control'."
  +  :type '(choice (const :tag "If existing" nil)
  +                 (const :tag "Never" never)
  +                 (const :tag "Use the value of `version-control'" nospecial)
  +                 (const :tag "Always" t))
     :group 'bookmark)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Mon, 01 Oct 2012 06:54:03 GMT) Full text and rfc822 format available.

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

From: Karl Fogel <kfogel <at> openitp.org>
To: 12309 <at> debbugs.gnu.org
Subject: Improved wording.
Date: Sun, 30 Sep 2012 23:17:10 -0500
Drew, thanks for your comment [1].  I tweaked the variable to use your
somewhat better choices.

­Karl

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12507#102 because I
    misfired my original control mail and put it in 12507 instead of
    here in 12309.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Mon, 01 Oct 2012 06:54:03 GMT) Full text and rfc822 format available.

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

From: Karl Fogel <kfogel <at> openitp.org>
To: 12309-done <at> debbugs.gnu.org
Subject: Re: Option `(bookmark-)version-control': Use :tag so doc string
	matches menu
Date: Sun, 30 Sep 2012 22:47:13 -0500
Fixed (see below), but please review.  

I don't fully understand the whole customization system because I never
use it myself (I just read doc strings and set variables directly in
Elisp), so I don't quite get what `other' mean if used instead of
`const', and I didn't fully understand the last paragraph of the
original bug report.  I looked in the Info pages, but they didn't
clarify much about this.

-Karl

Revision info:

  revno: 110305
  revision-id: kfogel <at> red-bean.com-20121001033206-5eja4ztyhs1sjm7q
  parent: cyd <at> gnu.org-20121001031702-2mei04wuzv2pk1e7
  committer: Karl Fogel <kfogel <at> red-bean.com>
  branch nick: trunk
  timestamp: Sun 2012-09-30 22:32:06 -0500
  message:
    * lisp/bookmark.el (bookmark-version-control): Give tags in the
      :type choices (Bug#12309), and improve doc string.

Diff:

  === modified file 'lisp/ChangeLog'
  --- lisp/ChangeLog	2012-10-01 02:07:14 +0000
  +++ lisp/ChangeLog	2012-10-01 03:31:41 +0000
  @@ -1,3 +1,8 @@
  +2012-10-01  Karl Fogel  <kfogel <at> red-bean.com>
  +
  +	* bookmark.el (bookmark-version-control): Give tags in the
  +	:type choices (Bug#12309), and improve doc string.
  +
   2012-10-01  Paul Eggert  <eggert <at> cs.ucla.edu>
   
   	Revert the FOLLOW-SYMLINKS change for file-attributes.
  
  === modified file 'lisp/bookmark.el'
  --- lisp/bookmark.el	2012-09-25 04:13:02 +0000
  +++ lisp/bookmark.el	2012-10-01 03:32:18 +0000
  @@ -99,12 +99,14 @@
   
   (defcustom bookmark-version-control 'nospecial
     "Whether or not to make numbered backups of the bookmark file.
  -It can have four values: t, nil, `never', and `nospecial'.
  +It can have four values: t, nil, `never', or `nospecial'.
   The first three have the same meaning that they do for the
  -variable `version-control', and the final value `nospecial' means just
  -use the value of `version-control'."
  -  :type '(choice (const nil) (const never) (const nospecial)
  -		 (other t))
  +variable `version-control'; the value `nospecial' (the default) means
  +just use the value of `version-control'."
  +  :type '(choice (const :tag "If existing" nil)
  +                 (const :tag "Never" never)
  +                 (const :tag "Use the value of `version-control'" nospecial)
  +                 (const :tag "Always" t))
     :group 'bookmark)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Mon, 01 Oct 2012 09:43:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Karl Fogel <kfogel <at> openitp.org>
Cc: 12309-done <at> debbugs.gnu.org
Subject: Re: bug#12309: Option `(bookmark-)version-control': Use :tag so doc
	string matches menu
Date: Mon, 01 Oct 2012 11:41:50 +0200
Karl Fogel <kfogel <at> openitp.org> writes:

> I don't fully understand the whole customization system because I never
> use it myself (I just read doc strings and set variables directly in
> Elisp), so I don't quite get what `other' mean if used instead of
> `const', and I didn't fully understand the last paragraph of the
> original bug report.  I looked in the Info pages, but they didn't
> clarify much about this.

const only matches the specified value, other matches any value, but
uses the specified value when setting.  Thus setting the variable
manually to 'foo won't get a mismatch.  You can see the documentation of
each widget with widget-browse.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12309; Package emacs. (Mon, 01 Oct 2012 21:27:02 GMT) Full text and rfc822 format available.

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

From: Karl Fogel <kfogel <at> red-bean.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 12309-done <at> debbugs.gnu.org
Subject: Re: bug#12309: Option `(bookmark-)version-control': Use :tag so doc
	string matches menu
Date: Mon, 01 Oct 2012 16:25:31 -0500
Andreas Schwab <schwab <at> linux-m68k.org> writes:
>const only matches the specified value, other matches any value, but
>uses the specified value when setting.  Thus setting the variable
>manually to 'foo won't get a mismatch.  You can see the documentation of
>each widget with widget-browse.

Thanks, Andreas.  Looks like having `other' on `t' is the right thing,
then.

-K




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 30 Oct 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 232 days ago.

Previous Next


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