* Difference between company-dabbrev and company-dabbrev-code
@ 2024-12-06 19:37 Heime via Users list for the GNU Emacs text editor
2024-12-07 8:48 ` Tassilo Horn
0 siblings, 1 reply; 2+ messages in thread
From: Heime via Users list for the GNU Emacs text editor @ 2024-12-06 19:37 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Difference between company-dabbrev and company-dabbrev-code
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
0 siblings, 0 replies; 2+ messages in thread
From: Tassilo Horn @ 2024-12-07 8:48 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor; +Cc: Heime
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-07 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).