unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@IRO.UMontreal.CA>
Cc: 1085@emacsbugs.donarmstrong.com, emacs-pretest-bug@gnu.org
Subject: bug#1085: 23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1
Date: Tue, 7 Oct 2008 16:10:34 -0700	[thread overview]
Message-ID: <006d01c928d1$e7709200$0200a8c0@us.oracle.com> (raw)
In-Reply-To: <jwv1vys6sa7.fsf-monnier+emacsbugreports@gnu.org>

> No you completely misunderstand, there's no relationship
> between the "prefix" stuff and the directory info that
> used to be fudged into PREDICATE.
> 
> That directory info that used to be passed in PREDICATE is
> now passed via buffer-local variables instead.

Right. I did misunderstand that. You use the boundaries thing to pass along the
context "(" for Info file name "(em", but you don't use it to pass the directory
for file-name completion - and I do see (and did, but forgot) how you pass the
directory in the latter case. My bad about that part.

I was following my analogy and thought that you did the same thing for both,
using the directory part as a boundary/contextual "prefix" of the relative file
name.

But IIUC, there is no invalidation of the invariants for file-name completion.
The directory used for completion is separate and kept separate from the input,
the completion candidates, and the completion result, which are all relative
names. The result of hitting RET for `read-file-name' is an absolute file name,
but the result of the completion itself - e.g. the result of
`read-file-name-internal', is just the relative name.

If you agree about that, then let's come back to "(em", which is a case, we
agree, where the invariants are currently invalidated. IIUC, you say it is a
case where the invariants *must* be invalidated. My question is why. Why
couldn't we treat this completion the same way we treat file-name completion?

I'm not saying that we must fix this for Info for Emacs 23.1 - I agreed that
such generalized Info completion is for the wishlist now. I'm only asking why it
shouldn't be the policy that the invariants are respected. Is there any case
where they logically *cannot* be respected?

I think that's what I'm missing: an example where there is no way to avoid a
mismatch between a completion per `try-completion' and a completion per
`all-completions'.

It seems to me that the invalidation for "(em" was introduced by treating "(" as
a prefix (using the boundaries mechanism) and not treating "(emacs)" the same
way we treat directories for file-name completion. That might be all we want to
do for now, but is Info completion a case where there is no choice but to
invalidate the invariants?

IIUC, completion of "(em" in Info now treats the "(" part as contextual boundary
info to be temporarily ignored while completing against a list of Info file
names. For that treatment, you use `boundaries'. 

And it is that treatment that introduces a difference between the completions of
`all-completions', which are Info file names such as "emacs-mime", and the
completions of `try-completions', which are names such as "(emacs-mime)". (In
Emacs 22, before `boundaries', a different treatment was used here, which also
invalidated the invariants.) Is this description of the situation correct?

Please think of what I'm writing not as disputing but as trying to understand. I
believe you that you know what you're talking about here. ;-) I just want to
understand it better.








  reply	other threads:[~2008-10-07 23:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87vdkolnzb.fsf@cyd.mit.edu>
2008-10-04 22:58 ` bug#1085: 23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1 Drew Adams
2008-10-04 23:18   ` Drew Adams
2008-10-05 22:53     ` Drew Adams
2008-10-05 23:36   ` Stefan Monnier
2008-10-06  4:29     ` Drew Adams
2008-10-06 14:37       ` Stefan Monnier
2008-10-06 16:47         ` Drew Adams
2008-10-07  2:06           ` Stefan Monnier
2008-10-07  4:42             ` Drew Adams
2008-10-07 14:52               ` Stefan Monnier
2008-10-07 16:47                 ` Drew Adams
2008-10-07 21:07                   ` Stefan Monnier
2008-10-07 23:10                     ` Drew Adams [this message]
2008-10-08  2:31                       ` Stefan Monnier
2008-10-08  6:25                         ` Drew Adams
2008-10-08 16:10                           ` Stefan Monnier
2008-10-08 16:24                             ` Drew Adams
2009-08-15 22:25   ` bug#1085: marked as done (23.0.60; all-completions, try-completion inconsistent: Info-read-node-name-1) Emacs bug Tracking System

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='006d01c928d1$e7709200$0200a8c0@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=1085@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@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 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).