GNU bug report logs -
#70968
29.2.50; choose-completion on an emacs22-style completion deletes text after point
Previous Next
Full log
Message #41 received at 70968 <at> debbugs.gnu.org (full text, mbox):
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, juri <at> linkov.net, 70968 <at> debbugs.gnu.org,
> Dmitry Gutov <dmitry <at> gutov.dev>
> Date: Tue, 10 Sep 2024 12:54:05 -0400
>
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> >> Ping! How should we proceed with this bug report?
> >
> > I don't quite understand the question.
> >
> > After:
> >
> > Eli wrote:
> >> Stefan wrote:
> >> > I'm not sure it's terribly important to preserve this detail of the
> >> > behavior of `Emacs-22`. The `emacs22` style does not aim to provide the
> >> > illusion you're running an old Emacs. I named it that way because
> >> > I couldn't come up with a good descriptive name for it. If it
> >> > misbehaves, I don't see a need to be bug-compatible, especially since
> >> > this doesn't affect ELisp code but users.
> >>
> >> I think it does, sorry. Suchj old behavior is a de-facto standard.
> >> If we change that, we should at least have a knob to get back the old
> >> behavior.
> >
> > I thought you had decided that the current behavior is not a bug.
> > I'm fine with this choice and we can close it as such.
> > Tho maybe we'd want to deprecate that `emacs22` style because of
> > those odd cases.
>
> I definitely don't want to just close this bug. I often get user
> complaints about this behavior. In my experience, for novice users,
> it's a fairly significant inconsistency in the default Emacs completion
> experience.
>
> I see a few good ways to fix this in a backwards-compatible way:
>
> A. Fix it in emacs22 with a defcustom to get back the old behavior.
>
> B. Deprecate the emacs22 style and replace it with a new style called
> `ignore-suffix` which has this bug fixed, and which replaces emacs22
> in the default value of completion-styles.
>
> C. Follow this idea I suggested earlier:
>
> Currently emacs22 is the only style that ignores the text after point
> when completing. But, this is often useful behavior, and I'd like to
> support it in other completion styles. Specifically, I think it
> would be nice if completion always:
>
> 1. First, run the completion styles on the literal text in the
> completion region or minibuffer.
>
> 2. If that returned nil, run the completion styles again, but without
> the text after point in the region or minibuffer.
>
> Step 2 when run with the basic style is equivalent to the emacs22
> style. So, emacs22 could be removed from the default
> completion-styles, since a completion-styles of '(basic) would be
> equivalent to '(basic emacs22).
>
> I think this would make it straightforward to then fix
> choose-completion to behave correctly when the completion was
> generated through step 2.
>
> I personally like the option C best, because I already want to do this
> generalization, so that the ignore-suffix behavior also works for other
> completion styles (e.g. partial-completion or substring).
>
> But I would like to get some feedback on this idea from others first.
Option C is from my POV the least desirable one: it adds some
complicated logic, which will almost certainly produce unintended
results, as everything in this completion-related mess we have.
I'm okay with adding a new style, per B, but why do we need to
deprecate emacs22 at the same time? Let users who want this new
behavior customize their completion styles to use this new style
instead of emacs22. That'd be fully backward compatible, and will
solve the problem for those who don't like the current behavior.
This bug report was last modified 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.