unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43774: 27.1; fido-mode completion don't accept empty string nor matching substring
@ 2020-10-03  6:30 Teemu Likonen
  2020-10-04  7:18 ` Protesilaos Stavrou
  0 siblings, 1 reply; 5+ messages in thread
From: Teemu Likonen @ 2020-10-03  6:30 UTC (permalink / raw)
  To: 43774

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

Emacs fido-mode (which is part of icomplete-mode) implements minibuffer
completion system which offers quick and easy way to choose one of the
available options. However, sometimes user needs to enter a different
substring which is not any of the available options. Sometimes even
empty string is needed. This seems to be impossible in fido-mode. The
following example demonstrates the empty string problem.

 1. Save the attached (inline) file "test.org".

 2. Start Emacs and open the file:

    emacs -Q test.org

 3. Ensure that the major mode is org-mode and turn on fido-mode:

    M-x org-mode
    M-x fido-mode

 4. Press "C-c C-c" (org-ctrl-c-ctrl-c) on any of the Org heading lines.
    The command will start editing tags for the current heading line.
    The available tags in the buffer are :one:, :two:, :three:.

 5. Try to clear the prompt from any tags. This works but it seems to be
    impossible to actually enter empty string because one of the
    buffer's present tags are always chosen when user finishes the
    prompt with RET key.

A work-around in org-mode's tag completion prompt is to enter one colon
(:) in the prompt but this is not general solution to the empty string
problem.

Another difficulty comes with entering just a substring of available
matches. The following example demonstrates this.

 1. Start Emacs with "emacs -Q".

 2. Turn fido-mode on.

    M-x fido-mode

 3. Press "C-x b" (switch-to-buffer) and try to create buffer named
    "scr" which is a substring of "*scratch*" buffer. This seems to be
    impossible or there is no documented way to do this.


-- 
/// Teemu Likonen - .-.. http://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test.org --]
[-- Type: text/x-org, Size: 234 bytes --]

* first                                                                 :one:
* second                                                                :two:
* third                                                               :three:

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

end of thread, other threads:[~2021-06-06 12:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03  6:30 bug#43774: 27.1; fido-mode completion don't accept empty string nor matching substring Teemu Likonen
2020-10-04  7:18 ` Protesilaos Stavrou
2020-10-04  8:24   ` Teemu Likonen
2021-06-06 11:09     ` Lars Ingebrigtsen
2021-06-06 12:15     ` Dmitry Gutov

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