all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'John Paul Wallington'" <jpw@pobox.com>, <emacs-devel@gnu.org>
Subject: doc strings for read-*-completion-ignore-case [was: add `read-buffer-completion-ignore-case' ?]
Date: Sun, 8 Jun 2008 15:51:47 -0700	[thread overview]
Message-ID: <000501c8c9ba$3b86a900$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <m13anny5tt.fsf@pobox.com>

> It adds a customizable variable, `read-buffer-completion-ignore-case',
> that specifies the case-sensitivity of completion for `read-buffer'.
> Its default value is nil, meaning that `read-buffer' is case-sensitive
> when completing buffer names.

Actually, the doc strings for both variables (file and buffer) seem incomplete
(and even not quite correct) to me: "Non-nil means when reading a buffer name
completion ignores case."

I would like to see a little more, saying explicitly that this means only when
using `read-buffer' or an `interactive' spec with spec "B..." or "b...".
Similarly for file names and `read-file-name'.

The reason:

1. It's not obvious that if you read a file name using, say, `completing-read'
with file-name candidates as the TABLE arg, this variable has no effect. You
must use `read-file-name'. Similarly for reading a buffer name using
`completing-read' with a list of buffer names as TABLE arg - the variable has no
effect.

2. It's not obvious that (interactive "B...") uses `read-buffer', and so on.

At least the latter was not obvious to me. I had to study the C code just now to
see how it is that a change to `read-buffer' also affects (interactive "B...").

Both #1 and #2 are important to know for those programming in Emacs Lisp. #1 is
presumably the reason for the name `read-buffer-...' instead of
`read-buffer-name-...'.

And #1 is presumably the reason for both names instead of, say, just
`file-name-completion-ignore-case' and `buffer-name-completion-ignore-case'.
These variables do not, _in general_, affect completion when reading a buffer
name or a file name - they are limited to `read-buffer' and `read-file-name'
(and `interactive'). 

The doc strings should help dispel the idea that this is about completion of
buffer/file names - it is about `read-buffer' and `read-file-name',
specifically.

---

Also, the doc strings are not great grammatically. It would be clearer to say:
"Non-nil means that file-name completion ignores case." 

Or, if you really want to keep the current order (which is less clear, IMO),
then: "Non-nil means that, when reading a file name, completion ignores case."
The "that" here helps understanding, especially for those whose mother tongue is
not English.






  parent reply	other threads:[~2008-06-08 22:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-08 21:28 add `read-buffer-completion-ignore-case' ? John Paul Wallington
2008-06-08 22:46 ` Drew Adams
2008-06-08 22:51 ` Drew Adams [this message]
2008-06-09  1:53 ` Stefan Monnier
2008-06-09  2:59   ` Miles Bader
2008-06-09  6:45     ` Drew Adams
2008-06-09  8:45     ` Eli Zaretskii
2008-06-09  9:09       ` David Kastrup
2008-06-09  9:10       ` Juanma Barranquero
2008-06-10  1:15     ` Stefan Monnier
2008-06-10  1:26       ` Miles Bader
2008-06-10  2:41         ` Stefan Monnier
2008-06-09 12:10 ` John Paul Wallington

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

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

  git send-email \
    --in-reply-to='000501c8c9ba$3b86a900$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=jpw@pobox.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.