GNU bug report logs - #34517
tmm menubar menu items have no effect on Android

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 17 Feb 2019 21:10:03 UTC

Severity: normal

Found in version 26.1

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 34517 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Juri Linkov <juri <at> linkov.net>
Cc: 34517 <at> debbugs.gnu.org
Subject: Re: bug#34517: tmm menubar menu items have no effect on Android
Date: Wed, 27 Feb 2019 17:10:23 -0500
> Stefan, please advise shouldn't selecting a completion from the
> *Completions* buffer clear the minibuffer's content before
> inserting the selected completion?

No, for example when you complete file name "C-x C-f ~/.e TAB"  the
*Completions* buffer will only show ".emacs" so we should clear the
minibuffer before inserting ".emacs" because that would lose the leading
"~/".  There are other circumstances where trailing text needs to
be preserved.

The completion code handles this with `completion-base-position` which
holds the beginning and end of the text that should be replaced when you
choose an item in *Completions*.

>> 0. emacs -Q
>> 1. ‘C-h f TAB’ displays a list of completions
>> 2. type a nonexistent function name, i.e. some random text
>>    in the minibuffer, e.g. “blabla”

The *Completions* content is now "out of date" compared to the minibuffer.

>> 3. click on an existing valid completion in the *Completions* buffer,
>>    e.g. on “append”

completion-base-position was set at step (1) to cover the empty text
after the prompt, so this empty text (which is now right in front of
"blabla") is replaced with "append" resulting in "appendblabla".

Obviously, the result is not what we want.
Now sure how to change which part, tho.  Maybe instead of
completion-base-position we should store the prefix and suffix strings,
so when you select an entry from *Completions* we just clear the
minibuffer and replace it with (concat prefix selection suffix)?


        Stefan




This bug report was last modified 5 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.