From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#4817: unclear value type of select-safe-coding-system-accept-default-p Date: Fri, 30 Oct 2009 22:24:41 -0400 Message-ID: References: <4AE77C63.3020004@informatik.uni-muenchen.de> Reply-To: Glenn Morris , 4817@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256957281 9278 80.91.229.12 (31 Oct 2009 02:48:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2009 02:48:01 +0000 (UTC) Cc: 4817@emacsbugs.donarmstrong.com To: eisinger@informatik.uni-muenchen.de Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 03:47:53 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 1N440O-0007bU-4g for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2009 03:47:52 +0100 Original-Received: from localhost ([127.0.0.1]:36129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N440N-0004KE-MH for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Oct 2009 22:47:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N43zv-00043Y-4Y for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2009 22:47:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N43zq-00042Z-KN for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2009 22:47:22 -0400 Original-Received: from [199.232.76.173] (port=49402 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N43zq-00042W-E2 for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2009 22:47:18 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:60220) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N43zp-0002Mo-Ku for bug-gnu-emacs@gnu.org; Fri, 30 Oct 2009 22:47:18 -0400 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 n9V2lEMH002042; Fri, 30 Oct 2009 19:47:15 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n9V2U7sm031979; Fri, 30 Oct 2009 19:30:07 -0700 Resent-Date: Fri, 30 Oct 2009 19:30:07 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Glenn Morris Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sat, 31 Oct 2009 02:30:07 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4817 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4817-submit@emacsbugs.donarmstrong.com id=B4817.125695588331132 (code B ref 4817); Sat, 31 Oct 2009 02:30:07 +0000 Original-Received: (at 4817) by emacsbugs.donarmstrong.com; 31 Oct 2009 02:24:43 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n9V2OgKQ031119 for <4817@emacsbugs.donarmstrong.com>; Fri, 30 Oct 2009 19:24:43 -0700 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N43dx-0001GI-4A; Fri, 30 Oct 2009 22:24:41 -0400 X-Spook: kilderkin Mafia number key AIEWS ANC Ceridian Delta Force X-Ran: ,^iw{;CF`P&[IG|bWM"b$iy'Y`3V;}AB$;6#ya{O?4M.g"m$3u 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:32298 Archived-At: Norbert Eisinger wrote: > 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) No. C-h v select-safe-coding-system-accept-default-p makes it pretty clear to me: If non-nil, a function to control the behavior of coding system selection. The meaning is the same as the argument ACCEPT-DEFAULT-P of the function `select-safe-coding-system' (which see). This variable overrides that argument. > 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. Almost. It should be either nil or a one-argument function that returns nil only if the coding system silently selected by select-safe-coding-system is to be rejected. Any non-nil return value means "accept the coding system automatically selected". > (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)))) > ) Therefore this makes no sense. > (custom-set-variables > ;; ... > '(select-safe-coding-system-accept-default-p > (function (lambda (coding-system) nil))) > ) This would make sense, meaning "always reject the automatically selected coding system", and prompt the user instead. > 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 The example that makes sense works for me. If you still have a problem, please provide more details on exactly what you are doing.