2

I made this simple example to help explain my problem:

* entry
  :PROPERTIES:
  :author1:  me
  :author2:  my self
  :END:

Now when I do a property search with C-c a m searching author1="me" I find entry as expected.

When I try to search author2="my self" as soon as I hit space to type in the whitespace character between my and self it just says [No match] in the minibuffer and the whitespace character is not inserted. I can find entry by searching author2={self} for example or type the whitespace outside the minibuffer and copy-paste it in, but that can't be the solution... I can type in whitespace normally in other minibuffers, e.g. in the keyword search under C-c a s.

I tried typing in a search like that launching emacs -q, so without any emacs customization but got the same result. I have emacs 26.3.

What am I missing here?

1
  • 1
    You have to quote the space as you are typing it in with C-q: author2="myC-q self"RET
    – NickD
    Mar 17, 2020 at 17:19

1 Answer 1

2

I finally figured out (thanks to C-h k) that space is bound to some autocomplete function in that instance of the minibuffer by default.

So the easy solution was to add

(define-key minibuffer-local-completion-map (kbd "SPC") 'self-insert-command)

to the init file to have space act as space in the tag search.

@NickD: thanks for the comment, it helped me understand that space must just be bound to some weird function in the minibuffer and remember that I know how to figure out which function it is ;)

4
  • BTW, you can accept your own answer (assuming it works for you :-) ).
    – NickD
    Mar 17, 2020 at 21:56
  • @NickD Apparently, I'm allowed to do so only by tomorrow, but I'll do it then. Thanks again
    – iuvenis
    Mar 18, 2020 at 7:53
  • Thanks, I've had the same problem. And now it works.
    – rl1
    Feb 23, 2021 at 17:19
  • Thanks -- I was having the same problem. HOWEVER, I've settled on @NickD's suggestion of preceding the space with C-q. That's because I found that I had been relying on the default binding to 'minibuffer-complete-word a lot more than I'd realized (e.g. for completion of function names in the minibuffer), and so switching it to 'self-insert-command tripped me up a lot. Did you stick with the new binding as-is, or did you by any chance find a way to have that particular binding be in some way context sensitive -- i.e. so that it only operated in the context of org-tags-view (i.e. C-c a m)?
    – tkp
    Feb 25 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.