unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* completion problem with read-file-name
@ 2007-07-09 20:32 Drew Adams
  2007-07-11 23:03 ` Johan Bockgård
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2007-07-09 20:32 UTC (permalink / raw)
  To: Bug-Gnu-Emacs

emacs -Q

Create files qqq.el and qq-xxx-q.el in the same directory. Visit Dired
there.

C-x C-f qqq.el TAB, then C-b C-b C-b C-b, then type -xxx TAB.

The minibuffer input is completed to qq-xxx-q.elq.el (with the cursor
on the last `q').

In previous versions of Emacs, completion used the entire minibuffer
input, not just the part before the cursor.  I don't know if this
change is considered a feature, but it seems like a bug to me.  To me,
the old behavior makes sense: all of your input is tested by
completion, not just the part before point.


In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
 of 2007-06-02 on RELEASE
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/gnuwin32/include'

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: completion problem with read-file-name
  2007-07-09 20:32 completion problem with read-file-name Drew Adams
@ 2007-07-11 23:03 ` Johan Bockgård
  2007-07-12  1:05   ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Bockgård @ 2007-07-11 23:03 UTC (permalink / raw)
  To: bug-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

> In previous versions of Emacs, completion used the entire minibuffer
> input, not just the part before the cursor.  I don't know if this
> change is considered a feature

etc/NEWS:

    ** The completion commands TAB, SPC and ? in the minibuffer apply
    only to the text before point.  If there is text in the buffer
    after point, it remains unchanged.

-- 
Johan Bockgård

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: completion problem with read-file-name
  2007-07-11 23:03 ` Johan Bockgård
@ 2007-07-12  1:05   ` Drew Adams
  2007-07-12  3:22     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2007-07-12  1:05 UTC (permalink / raw)
  To: Johan "Bockgård", bug-gnu-emacs

> > In previous versions of Emacs, completion used the entire minibuffer
> > input, not just the part before the cursor.  I don't know if this
> > change is considered a feature
> 
> etc/NEWS:
> 
>     ** The completion commands TAB, SPC and ? in the minibuffer apply
>     only to the text before point.  If there is text in the buffer
>     after point, it remains unchanged.

Thanks for the info. Still seems like retrogression to me.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: completion problem with read-file-name
  2007-07-12  1:05   ` Drew Adams
@ 2007-07-12  3:22     ` Eli Zaretskii
  2007-07-12 15:47       ` Drew Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2007-07-12  3:22 UTC (permalink / raw)
  To: Drew Adams; +Cc: bug-gnu-emacs, bojohan+news

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Wed, 11 Jul 2007 18:05:13 -0700
> Cc: 
> 
> > etc/NEWS:
> > 
> >     ** The completion commands TAB, SPC and ? in the minibuffer apply
> >     only to the text before point.  If there is text in the buffer
> >     after point, it remains unchanged.
> 
> Thanks for the info. Still seems like retrogression to me.

You never explained why you thought it was a retrogression.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: completion problem with read-file-name
  2007-07-12  3:22     ` Eli Zaretskii
@ 2007-07-12 15:47       ` Drew Adams
  2007-07-12 17:39         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Drew Adams @ 2007-07-12 15:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bug-gnu-emacs, bojohan+news

> > >     ** The completion commands TAB, SPC and ? in the minibuffer apply
> > >     only to the text before point.  If there is text in the buffer
> > >     after point, it remains unchanged.
> >
> > Thanks for the info. Still seems like retrogression to me.
>
> You never explained why you thought it was a retrogression.

Sure I did:

> In previous versions of Emacs, completion used the entire minibuffer
> input, not just the part before the cursor.  I don't know if this
> change is considered a feature, but it seems like a bug to me.  To me,
> the old behavior makes sense: all of your input is tested by
> completion, not just the part before point.

This is just my opinion, of course, but I think the behavior in all previous
Emacs releases is preferable. Just as hitting `RET' takes the entire
minibuffer input into account, no matter the cursor position, so has this
always been true for `TAB' as well. To me, that makes sense. I don't find it
helpful for Emacs to complete qqq.el to qq-xxx-q.elq.el if the cursor is on
the third q. Such a completion is useless, and requires me to hit C-k.

I'm not claiming that everyone (or even anyone) else will agree with me, but
I find the previous behavior better.

I'm not that concerned by this change, personally, as I always use Icicles,
whose prefix completion is like the previous Emacs behavior, and which also
allows regexp/substring completion. I nevertheless consider this change to
be in the wrong direction for Emacs.

Here, again, is the part of the bug report to reproduce what I consider to
be bad behavior:

> emacs -Q
>
> Create files qqq.el and qq-xxx-q.el in the same directory. Visit Dired
> there.
>
> C-x C-f qqq.el TAB, then C-b C-b C-b C-b, then type -xxx TAB.
>
> The minibuffer input is completed to qq-xxx-q.elq.el (with the cursor
> on the last `q').

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: completion problem with read-file-name
  2007-07-12 15:47       ` Drew Adams
@ 2007-07-12 17:39         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2007-07-12 17:39 UTC (permalink / raw)
  To: Drew Adams; +Cc: bug-gnu-emacs, bojohan+news

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <bojohan+news@dd.chalmers.se>, <bug-gnu-emacs@gnu.org>
> Date: Thu, 12 Jul 2007 08:47:22 -0700
> 
> I don't find it
> helpful for Emacs to complete qqq.el to qq-xxx-q.elq.el if the cursor is on
> the third q. Such a completion is useless, and requires me to hit C-k.

IMO, the previous behavior (of saying [No match]) was useless as well.

In defence of the current behavior I can say that it is identical to
how Bash does completion at the shell prompt.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-07-12 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09 20:32 completion problem with read-file-name Drew Adams
2007-07-11 23:03 ` Johan Bockgård
2007-07-12  1:05   ` Drew Adams
2007-07-12  3:22     ` Eli Zaretskii
2007-07-12 15:47       ` Drew Adams
2007-07-12 17:39         ` Eli Zaretskii

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).