From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Roland Winkler" <Roland.Winkler@physik.uni-erlangen.de>
Cc: emacs-devel@gnu.org
Subject: Re: BibTeX completion via completion-in-region
Date: Sat, 05 Dec 2009 13:44:25 -0500 [thread overview]
Message-ID: <jwv638lp8lh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <19226.39988.288763.3156@regnitz.physics.niu.edu> (Roland Winkler's message of "Sat, 5 Dec 2009 11:45:24 -0600")
> The old BibTeX code achieved this goal in two steps, by hooking into
> choose-completion-string-functions plus using the return value of
> bibtex-complete-internal. (Unfortunately, I cannot recall all
> details anymore under which circumstances one or the other step was
> needed.) Now bibtex-complete-internal does not return the completion
> anymore (because of completion-in-region) so that this step doesn't
> work anymore in the old way. Is this step really not needed anymore
> (and should be removed from the code)? Is it sufficient now that the
> post-completion procesing is done inside choose-completion-string-functions?
Check bibtex-complete-internal again, it ends with:
(when (completion-in-region beg end completions)
(buffer-substring beg (point)))))
it's not perfect, but should work for now.
Bibtex-mode's completion (as well as a few others) show the need for
some kind of "completion-hook" that gets run when a completion is
performed (e.g. via TAB or via choosing something in the *Completions*
buffer), so this should/will be added at some point in the future.
Currently, I'm mostly going through all the packages and making them use
completion-in-region to try and see what needs to be added (like this
completion-hook).
Stefan
next prev parent reply other threads:[~2009-12-05 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-05 4:56 BibTeX completion via completion-in-region Roland Winkler
2009-12-05 16:08 ` Stefan Monnier
2009-12-05 17:45 ` Roland Winkler
2009-12-05 18:44 ` Stefan Monnier [this message]
2009-12-05 19:23 ` Roland Winkler
2009-12-05 23:49 ` bug#5130: 23.1.50; " Roland Winkler
2020-08-26 15:18 ` Stefan Kangas
2020-08-26 15:39 ` Stefan Kangas
2009-12-06 0:14 ` Roland Winkler
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv638lp8lh.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Roland.Winkler@physik.uni-erlangen.de \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.