1

Consider the following code:

(fido-mode 1)

(let ((answer (completing-read "Please enter nothing: " '("Something"))))
  (if (string= answer "")
      (message "You successfully entered nothing!")
    (message "You failed :(")))

How can I ensure that answer is the empty string ("")?

Both RET and C-j return "Something".

aadcg
  • 1,203
  • 6
  • 13
Zeta
  • 1,045
  • 9
  • 18

1 Answers1

3

You have to use icomplete-fido-exit. It's by default bound to M-j.

(icomplete-fido-exit FORCE)

Attempt to exit minibuffer immediately with current input.
Zeta
  • 1,045
  • 9
  • 18