[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sun, 12 Sep 2004 18:08:14 +0200
As far as I can tell, you introduced the new emacs variable
choose-completion-string-functions in order to use it for ido.el.
I thought this variable comes handy for bibtex.el, however there's
a problem with it:
bibtex.el uses choose-completion-string-functions as a buffer-local
variable in BibTeX mode. (The idea in bibtex.el is to set its value
depending on the particular situation when completion is requested.)
Of course, this requires that the bibtex buffer is active when
- I always tested bibtex.el by mouse-clicking the completions in the
completion buffer (both buffers in the same frame). Then there is
no problem because the BibTeX buffers remains the active buffer.
- However, when the completion buffer is the active buffer, it is
deleted before choose-completion-string-functions is evaluated. So
the active buffer is just the next buffer in the buffer list,
whatever buffer this is. Of course, the value of
choose-completion-string-functions in that buffer is usually nil.
(Stefan Monnier helped me to figure this out.)
Wouldn't it make sense to reverse the order of the following two
statements in choose-completion-string?
choice buffer mini-p base-size)
;; Insert the completion into the buffer where it was requested.
Then it is possible to use a local value of
choose-completion-string-functions in completion-reference-buffer.
I hope this does not break any other code. But right now it can
anyway be unpredictable what happens when
choose-completion-string-functions is used.
Roland Winkler <=