From: David Kastrup <dak@gnu.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 'Stefan Monnier' <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: should read-file-name not respect text properties in its input string?
Date: Sun, 22 Jun 2008 09:17:23 +0200 [thread overview]
Message-ID: <85tzfm7xbw.fsf@lola.goethe.zz> (raw)
In-Reply-To: <005801c8d415$577953f0$0200a8c0@us.oracle.com> (Drew Adams's message of "Sat, 21 Jun 2008 20:09:10 -0700")
"Drew Adams" <drew.adams@oracle.com> writes:
>> So, if you can come up with
>> actual scenarios where those properties could be
>> useful/important, maybe
>> we can make sure not only that they're returned but that they are
>> returned reliably. If you can't come up with such a scenario, that
>> casts doubts on the usefulness of the requested change.
>
> I've no desire to belabor this. I'm not selling anything. If you don't want to
> do it, please don't.
>
> The general argument is that `completing-read' should be lossless; it
> should be only about choosing, not losing info. Why? Why not? There is
> no reason that it should lose info.
>
> You agree that it should accept a set of rich structures, display
> them, and let you choose from them.
Uh, _I_ don't agree. At best, this may be argued for completing-read
with neither nil or confirm-only as REQUIRE-MATCH. Other than that,
user input can be passed into it that need not match anything in the
completion list. Then it does not make sense that sometimes information
will be picked from the completions, sometimes not.
So what if there text properties in it, and the user input contains
different text properties? Is that supposed to be a non-match? Are the
user input text properties to be thrown away? Why would you want to
throw the user input information rather than the completion information
away?
> So far so good. Why should what you get back be only a stripped down
> string instead of the whole structure you chose, including properties
> that might not be visible? It's not only about rich display (color
> etc.); it's also about choosing possibly complex objects. It's not
> only visible properties that are useful.
So why would you throw the properties in the user entry away when they
did not come about by completion, but the user input matches a
completion candidate?
> Using properties lets an application pass along additional information
> about a candidate choice, in addition to the string text - not just to
> *Completions* but to the `completing-read' caller as the return
> value. The info can group/classify candidates, order them, or do
> anything else you want.
Why would it do that if the information was not entered by completion,
but merely matches a completion candidate by chance?
> Are there other ways to associate additional info with string
> candidates, besides using text properties? Sure, and I use some of
> them too. But why not provide this capability?
Because no consistent behavior has been proposed so far?
> If the general rationale (don't lose info) doesn't convince you, and
> the suggestions of uses don't inspire you, fuggedabowdit.
So why lose the info from the keyboard entry and replace it with the
info of a completion candidate in case there is one?
If the completion candidates are not even consulted (like when
REQUIRE-MATCH is nil and TAB never is hit), why would I paste over the
user's text properties?
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2008-06-22 7:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 22:30 should read-file-name not respect text properties in its input string? Drew Adams
2008-06-21 2:06 ` Stefan Monnier
2008-06-21 4:59 ` Drew Adams
2008-06-21 18:13 ` Stefan Monnier
2008-06-21 19:46 ` Drew Adams
2008-06-21 20:34 ` should read-file-name not respect text properties in its inputstring? Drew Adams
2008-06-21 20:44 ` should read-file-name not respect text properties in its input string? Stefan Monnier
2008-06-21 23:02 ` Drew Adams
2008-06-22 1:41 ` Stefan Monnier
2008-06-22 3:09 ` Drew Adams
2008-06-22 7:17 ` David Kastrup [this message]
2008-06-22 8:30 ` Drew Adams
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=85tzfm7xbw.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.