From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thibaut Verron Newsgroups: gmane.emacs.help Subject: Re: global-company-mode and company-mode Date: Tue, 2 Aug 2022 13:41:39 +0200 Message-ID: <2dc0d3f7-2c99-85f6-322c-0aff98bbc1ac@gmail.com> References: <48e6e2a9-7cb2-1899-47f7-188c49125f1b@gmail.com> <2438dd9d-6982-4b31-630f-f9a904e1e63b@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8927"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: help-gnu-emacs@gnu.org To: Dmitry Gutov , wilnerthomas@tutanota.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 13:44:39 2022 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 1oIqKE-0002Aj-Rz for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 13:44:38 +0200 Original-Received: from localhost ([::1]:41956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIqKD-0000Kk-CG for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 07:44:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIqHV-0008Ol-Bd for help-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:41:52 -0400 Original-Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:41753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIqHQ-0005dJ-Fh for help-gnu-emacs@gnu.org; Tue, 02 Aug 2022 07:41:49 -0400 Original-Received: by mail-wm1-x32d.google.com with SMTP id m41-20020a05600c3b2900b003a4e094256eso862345wms.0 for ; Tue, 02 Aug 2022 04:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=5AWQSySN2ph8RiUCNmtRpf2wBOTnBcHfLpL2fetRieU=; b=BbGa3y3pBWOCsE4Es5w/+qEAVBzdxID5Gg2QVUhSYfUCD0klReBVnHAETaZswJoc+Z E8c3gO9yz/vlAN73EBzqltiKq5qvAPkGXy3KdTxEsqhpkZ1dQ/wUuixJacB3DWM2yeBR /maiwN8sTfDRlHO9H7IsBp4+l8YtisEVb/UsUQBk9vxc8h3D0S60pTwaz1DN51dkAI4i LZcSqBGuB0KViOu3UX5h1cPNX3K5I3r4GOT5+q962IS64489z62oQgzUfAAHvOaEJGwx xvTyHmwxCgQOKguRhOCGoajTemYkOCOITecbySrah7JPF4ZBK5U9j4BiEANawUdV40OI cflQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5AWQSySN2ph8RiUCNmtRpf2wBOTnBcHfLpL2fetRieU=; b=DzanklJI8kHMPYU0phNR+JtmjT9Tea+FPPcMujsKnld/SfIDaQJFKgrqArkOGqADM8 hF7hT/ooTmam8C5bsrvBdpx+AZphZIwbqxCiI06KFygmXP9MFDU8iABUCkLJ6IxgW39T N7gxcrln11s7j5fNKR4okLaaQn1q6HjgDyIcfHutfh7ngJ2s7ejSLzCQsZ4R4bAdFfg8 Rk76g1mrZlAIO+KBztFQkzO271DunVDN+6jBU56ojAqtUyB0WGgC5SIJncK9f/PYgRdc c1F1WVn/hWTCAa1/ID/A+RaTWru4ap8dXhZqNifxGADZRwrDiuVqkgD/XKA4GHVcQL4A IDwA== X-Gm-Message-State: AJIora+z69I4I56Co014Ps17d+TqDKTWKNEtGASJv7KMRwyFqIdOTdVF hYr3WHJYDrQVubOEqGxjc02RtlRUV1BQIA== X-Google-Smtp-Source: AGRyM1uObAmk1npTjQ6sQ36f49XixkJ68vuFPSNTFqrNeTIzN1BLDGaTJKsC1dGZXfyMxnRsFLsHTQ== X-Received: by 2002:a7b:c003:0:b0:39c:5642:e415 with SMTP id c3-20020a7bc003000000b0039c5642e415mr13801028wmb.111.1659440500916; Tue, 02 Aug 2022 04:41:40 -0700 (PDT) Original-Received: from ?IPV6:2001:628:2010:4094:f6e0:2bdf:6059:a656? ([2001:628:2010:4094:f6e0:2bdf:6059:a656]) by smtp.gmail.com with ESMTPSA id d7-20020a1c7307000000b003a3211112f8sm17938092wmb.46.2022.08.02.04.41.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Aug 2022 04:41:40 -0700 (PDT) Content-Language: en-US In-Reply-To: <2438dd9d-6982-4b31-630f-f9a904e1e63b@yandex.ru> Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=thibaut.verron@gmail.com; helo=mail-wm1-x32d.google.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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:138743 Archived-At: On 02/08/2022 13:23, Dmitry Gutov wrote: > On 02.08.2022 14:15, wilnerthomas--- via Users list for the GNU Emacs > text editor wrote: >> Right.  Is there the command (global-company-mode -1) available?  >> What if I want to enable global-company-mode, would I use the hook? > > Just 'M-x global-company-mode' in both cases. It toggles. Or evaluate (global-company-mode 1), or customize the value of the variable global-company-mode (with M-x customize-group). Really, the after-init-hook should only run when starting emacs, so changing it will only have an effect when restarting emacs (provided that the changes are saved between sessions), or using run-hook manually (but this might have undesirable side-effects with whatever else is done in the hook). It is really not meant to make changes to the status of a running emacs. Best wishes, Thibaut