GNU bug report logs - #4817
unclear value type of select-safe-coding-system-accept-default-p

Previous Next

Package: emacs;

Reported by: eisinger <at> informatik.uni-muenchen.de

Date: Tue, 27 Oct 2009 23:10:07 UTC

Severity: normal

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

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: Glenn Morris <rgm <at> gnu.org>
Subject: bug#4817: marked as done (unclear value type of select-safe-coding-system-accept-default-p)
Date: Sat, 31 Oct 2009 19:50:08 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 31 Oct 2009 15:44:36 -0400
with message-id <8zmy37cpqz.fsf <at> fencepost.gnu.org>
and subject line Re: bug#4817: unclear value type of select-safe-coding-system-accept-default-p
has caused the Emacs bug report #4817,
regarding unclear value type of select-safe-coding-system-accept-default-p
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact help-debbugs <at> gnu.org
immediately.)


-- 
4817: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4817
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Norbert Eisinger <eisinger <at> informatik.uni-muenchen.de>
To: bug-gnu-emacs <at> gnu.org
Subject: unclear value type of select-safe-coding-system-accept-default-p
Date: Wed, 28 Oct 2009 00:04:03 +0100
GNU Emacs Lisp Reference Manual
33.9.4 User-Chosen Coding Systems
Function: select-safe-coding-system from to &optional default-coding-system accept-default-p file

Quotation 1:
> The optional argument accept-default-p, if non-nil, should be a
> function to determine whether a coding system selected without user
> interaction is acceptable. select-safe-coding-system calls this
> function with one argument, the base coding system of the selected
> coding system. If accept-default-p returns nil,
> select-safe-coding-system rejects the silently selected coding system,
> and asks the user to select a coding system from a list of possible
> candidates.

Quotation 2:
> If the variable select-safe-coding-system-accept-default-p is non-nil,
> its value overrides the value of accept-default-p.


I cannot quite decide which of the following two alternatives is the problem:

=========================================================================
Alternative 1:
The value of select-safe-coding-system-accept-default-p can be either nil
or a symbol naming a coding system (e.g., mule-utf-8-unix)

In this case the sentence in quotation 2 might need some rephrasing, such as
"..., its value overrides the value returned by the function that is
the actual argument for accept-default-p"

=========================================================================
Alternative 2:
The value of select-safe-coding-system-accept-default-p can be either nil
or a one-argument function that returns either nil or a symbol naming a
coding system.

If this is what quotation 2 means (and I understood it to mean this),
one of the following entries in the init file would seem to make sense:

(custom-set-variables
 ;; ...
 '(select-safe-coding-system-accept-default-p
    (function (lambda (coding-system)
      (read-coding-system (format "Coding system [%s]: " coding-system)
                          coding-system))))
)

or

(custom-set-variables
 ;; ...
 '(select-safe-coding-system-accept-default-p
    (function (lambda (coding-system) nil)))
)

However, when I cause a situation where this code is evaluated, I get

select-safe-coding-system: Wrong type argument: listp, mule-utf-8-unix
=========================================================================

Norbert Eisinger



[Message part 3 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 4817-done <at> debbugs.gnu.org
Subject: Re: bug#4817: unclear value type of select-safe-coding-system-accept-default-p
Date: Sat, 31 Oct 2009 15:44:36 -0400
Thanks, I tweaked the manual a bit.

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

Previous Next


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