From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin-kemp@brusseler.com Newsgroups: gmane.emacs.help Subject: completion of text using company-mode Date: Tue, 8 Jun 2021 21:32:31 +0200 (CEST) Message-ID: References: <9d48acf5-0dcf-67ab-a95f-25750dd62eb6@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27490"; mail-complaints-to="usenet@ciao.gmane.io" To: "Dmitry Gutov" , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 21:33:36 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqhTg-0006nZ-7Y for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 21:33:32 +0200 Original-Received: from localhost ([::1]:50940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqhTf-0002UA-9A for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 15:33:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqhSp-0002Q1-4A for help-gnu-emacs@gnu.org; Tue, 08 Jun 2021 15:32:39 -0400 Original-Received: from msg-1.mailo.com ([213.182.54.11]:52110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqhSm-00007b-JD for help-gnu-emacs@gnu.org; Tue, 08 Jun 2021 15:32:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=brusseler.com; s=mailo; t=1623180751; bh=We0doaaxU1EDkAo9AeLTCSvDwbyJF/VUxFPDCrm6MUQ=; h=X-EA-Auth:From:To:Date:Subject:MIME-Version:X-Mailer:Message-ID: In-Reply-To:Content-Type; b=nUhRiUBbfmBtTbGSypZXRAYjknX3ogpEXE2NvHk/zdYU9A4AYfvMFLXkeOzV+ddeD 36SEwaq1QfeBzRKz9ZTVeDVErMV8d9zy0E3b0WdOuHH/f8jY1x0R6QYVAre9wvHkMw f+QDH9UXla77SPLrc7rjfZE57ATL/6jjYx3krulM= Original-Received: by www-8.mailo.com with http webmail; Tue, 8 Jun 2021 21:32:31 +0200 (CEST) X-EA-Auth: 5GGdcVwWnA6kEC6oPCWe0l7VzPK2xtf40Pew+KAtXR9WPPSv1wvS2Gil/BVL8NIKZbsCvdfJaaW0Y3zt4mrqYwLJKIB8p8F9 X-Priority: 3 X-Mailer: COMS/EA21.01/r20210415 In-Reply-To: <9d48acf5-0dcf-67ab-a95f-25750dd62eb6@yandex.ru> Received-SPF: pass client-ip=213.182.54.11; envelope-from=martin-kemp@brusseler.com; helo=msg-1.mailo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130642 Archived-At: It works well, thank you.=C2=A0 Is it possible to make "company" complete w= ords 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 To: martin-kemp@brusseler.com; =C2=A0=C2=A0=C2=A0help-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=20 the rest.