Carlos Pita <carlosjosepi...@gmail.com> writes: > Hi Igor, > > I believe the problem is in: > > (defun pcomplete/org-mode/searchhead () > ... > ;; When completing a bracketed link, i.e., "[[*", argument > ;; starts at the star, so remove this character. > (substring pcomplete-stub 1)))) <-- trailing ]] not removed! > > Changing the last line to (substring pcomplete-stub 1 -2) fixes it in my > example. I don't know if one is supposed to do [[*prefix<c-a-p>]] or > [[*prefix<c-a-p> as is implied by the code, but better to support both, > specially considering electric pairs, don't you think?
I agree that the error is thrown there. However, there is nothing wrong in the pcomplete/org-mode/searchhead. It is pcomplete that is passing something strange to our completion backend. Maybe you can try to send it as Emacs bug? Best, Ihor