From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: defcustom :type (file :must-match t) Date: Tue, 20 Dec 2005 15:21:16 -0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135121047 11517 80.91.229.2 (20 Dec 2005 23:24:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 20 Dec 2005 23:24:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 21 00:23:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eoqnj-0001bD-Ad for ged-emacs-devel@m.gmane.org; Wed, 21 Dec 2005 00:21:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eoqoe-0003JY-6g for ged-emacs-devel@m.gmane.org; Tue, 20 Dec 2005 18:22:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EoqoJ-0003ID-6c for emacs-devel@gnu.org; Tue, 20 Dec 2005 18:22:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EoqoF-0003EE-At for emacs-devel@gnu.org; Tue, 20 Dec 2005 18:22:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EoqoF-0003Di-2n for emacs-devel@gnu.org; Tue, 20 Dec 2005 18:22:19 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EoqrP-0003f0-Nm for emacs-devel@gnu.org; Tue, 20 Dec 2005 18:25:37 -0500 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.186.50]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBKNLI91030699 for ; Tue, 20 Dec 2005 17:21:18 -0600 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id jBKNLH3q002155 for ; Tue, 20 Dec 2005 16:21:17 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id jBKNLHiu002149 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Tue, 20 Dec 2005 16:21:17 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48118 Archived-At: I don't understand the customization type `(file :must-match t)'. The Elisp manual says only this: "The value must be a file name for an existing file, and you can do completion with `M-'." I don't see where/when/how this existence criterion is enforced. At what point is it checked and an error raised if you try to use a name that corresponds to no file? I am able to create a defcustom with a file name (with complete path) that does not correspond to an existing file. I am able to customize the file name in Customize, providing a name that doesn't correspond to an existing file. I am able to set for the current session and even save such a nonsense value. So, in what sense _must_ the file-name value be the name of an existing file? What am I missing? The last phrase is, in any case, unclear: "and you can do completion with `M-'"? When/where can you do this? Does this mean in Customize, when "you" are typing a new file name? With `set-variable' also? When "you" are typing the defcustom? The Elisp manual is for programmers, and this section of the manual tells "you" how to define a file-name :type, so I would guess that the "you" here is not an end user of Customize but a programmer writing a defcustom. But trial and error shows that "you" is the Customize end user, and only Customize is meant, not also `set-variable'. This should be cleared up. If the only "must" check for existence is that provided by file-name completion (e.g. REQUIRE-MATCH arg to `completing-read'), then this whole entry should be rewritten to say that. Currently, it gives the impression that `:type (file :must-match t)' will somehow, somewhere, somewhen, force users to use file names that correspond to existing files.