unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 25678@debbugs.gnu.org
Subject: bug#25678: 25.1; defcustom type `(file :must-match t)' seems not to work
Date: Fri, 10 Feb 2017 10:32:23 -0800 (PST)	[thread overview]
Message-ID: <77a3abe9-258c-4863-a87d-2f236babafe4@default> (raw)

(defcustom foo-file ""
  ""
  :type '(file :must-match t) :group 'convenience)

M-x customize-option foo-file

I don't see anything that prevents you from using a file name that
corresponds to no existing file.  I don't see that completion (`M-TAB') 
enforces it to name an existing file.  And I don't see that simply 
inserting a bad file name is prevented, nor is setting the option to a
bad file name or saving it prevented.

What effect does (file :must-match t) actually have, if any?

If this is just confusion on my part, please consider clarifying the
description of the behavior in the doc: (elisp) `Simple Types'.

(I see the same behavior if `(file :must-match t)' is used within a
complex type, e.g. as the :value-type of an alist entry.)


In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-11-15
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --without-compress-install 'CFLAGS=-O2
 -static -g3''





             reply	other threads:[~2017-02-10 18:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-10 18:32 Drew Adams [this message]
2017-02-17 23:57 ` bug#25678: 25.1; defcustom type `(file :must-match t)' seems not to work npostavs
2018-01-14 23:07   ` Tim Landscheidt
2020-03-21 17:36     ` H. Dieter Wilhelm
2020-08-29 15:33 ` Mauro Aranda
2020-08-30 13:56   ` Lars Ingebrigtsen
2020-08-30 15:22     ` Mauro Aranda
2020-09-09 17:21     ` Mauro Aranda
2020-09-10 13:13       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77a3abe9-258c-4863-a87d-2f236babafe4@default \
    --to=drew.adams@oracle.com \
    --cc=25678@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).