unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* completion of text using company-mode
@ 2021-06-08 19:11 martin-kemp
  2021-06-08 19:17 ` Dmitry Gutov
  0 siblings, 1 reply; 3+ messages in thread
From: martin-kemp @ 2021-06-08 19:11 UTC (permalink / raw)
  To: help-gnu-emacs

Have tried using "company-dabbrev-code" to try to complete words from opened buffurs.



(setq company-backends '(company-dabbrev-code))



For instance, in texinfo-mode I have the following code



Report for research project entitled: "Ambient Geotomography within the Central
Mediterranean Sea.".



Then I try to complete the word "Mediterranean" by starting to type "Medi" but the completion

does not activate.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: completion of text using company-mode
  2021-06-08 19:11 completion of text using company-mode martin-kemp
@ 2021-06-08 19:17 ` Dmitry Gutov
  2021-06-08 19:32   ` martin-kemp
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Gutov @ 2021-06-08 19:17 UTC (permalink / raw)
  To: martin-kemp, help-gnu-emacs

On 08.06.2021 22:11, martin-kemp@brusseler.com wrote:
> (setq company-backends '(company-dabbrev-code))

Try this instead:

(setq company-backends '(company-dabbrev-code company-dabbrev))

This will use the "code" backend for "code" buffers, and the other for 
the rest.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* completion of text using company-mode
  2021-06-08 19:17 ` Dmitry Gutov
@ 2021-06-08 19:32   ` martin-kemp
  0 siblings, 0 replies; 3+ messages in thread
From: martin-kemp @ 2021-06-08 19:32 UTC (permalink / raw)
  To: Dmitry Gutov, help-gnu-emacs

It works well, thank you.  Is it possible to make "company" complete words that exist in

comments.



As example, consider emacs-lisp



;;; * Heading Inhibit Emacs Startup Windows

(defvar startup-windows 0)

(defvar detail "Startup windows provide information about
copyleft and basic emacs usage.")





I start writing "Sta", but because "Startup" is in a comment, the word is not expanded.




From: Dmitry Gutov <dgutov@yandex.ru>
To: martin-kemp@brusseler.com;
   help-gnu-emacs@gnu.org
Subject: Re: completion of text using company-mode
Date: 08/06/2021 21:17:18 Europe/Paris

On 08.06.2021 22:11, martin-kemp@brusseler.com wrote:
> (setq company-backends '(company-dabbrev-code))

Try this instead:

(setq company-backends '(company-dabbrev-code company-dabbrev))

This will use the "code" backend for "code" buffers, and the other for 
the rest.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-08 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-08 19:11 completion of text using company-mode martin-kemp
2021-06-08 19:17 ` Dmitry Gutov
2021-06-08 19:32   ` martin-kemp

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).