unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: 43774@debbugs.gnu.org
Subject: bug#43774: 27.1; fido-mode completion don't accept empty string nor matching substring
Date: Sat, 03 Oct 2020 09:30:42 +0300	[thread overview]
Message-ID: <87ft6vkei5.fsf@iki.fi> (raw)

[-- 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:

             reply	other threads:[~2020-10-03  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03  6:30 Teemu Likonen [this message]
2020-10-04  7:18 ` bug#43774: 27.1; fido-mode completion don't accept empty string nor matching substring Protesilaos Stavrou
2020-10-04  8:24   ` Teemu Likonen
2021-06-06 11:09     ` Lars Ingebrigtsen
2021-06-06 12:15     ` Dmitry Gutov

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=87ft6vkei5.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=43774@debbugs.gnu.org \
    /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).