From: Tassilo Horn <tsdh@gnu.org>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Cc: Heime <heimeborgia@protonmail.com>
Subject: Re: Difference between company-dabbrev and company-dabbrev-code
Date: Sat, 07 Dec 2024 09:48:43 +0100 [thread overview]
Message-ID: <87plm3ubdg.fsf@gnu.org> (raw)
In-Reply-To: <fKfSogVMnPPBpBBOdSPpza_5upb5ZTdrxUeaHYhrXg6-PxXqIRgdLyf871EEOQ4-SkH144eICjuDljvnVyFFHG8TBnl4AvBlpv96cFu-Lms=@protonmail.com> (Heime via Users list for the's message of "Fri, 06 Dec 2024 19:37:07 +0000")
Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
> I have a problem understanding the difference between company-dabbrev
> and company-dabbrev-code. They both shom completion candidates inside
> contents of open buffers. How can I see a difference between the two?
I guess the difference is documented in their docstrings. I don't use
them but most probably company-dabbrev uses any text as possible
completion candidates whereas company-dabbrev-code uses only the words
occurring in code, i.e., not comment text.
For example, assume you have
;; This is my nice function.
(defun foo (bar)
(+1 bar))
then company-dabbrev will also complete to This, is, my, nice, and
function whereas company-dabbrev-code will not (unless those words also
occur in code, e.g., as function or variable names).
Bye,
Tassilo
prev parent reply other threads:[~2024-12-07 8:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 19:37 Difference between company-dabbrev and company-dabbrev-code Heime via Users list for the GNU Emacs text editor
2024-12-07 8:48 ` Tassilo Horn [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plm3ubdg.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).