From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it. Date: Mon, 1 May 2023 22:08:44 +0800 Message-ID: References: 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="17177"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 16:09:26 2023 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 1ptUDW-0004Ib-Rx for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 16:09:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptUD8-0004PX-8v; Mon, 01 May 2023 10:09:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptUD6-0004Ox-KW for help-gnu-emacs@gnu.org; Mon, 01 May 2023 10:09:00 -0400 Original-Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptUD4-00081l-FZ for help-gnu-emacs@gnu.org; Mon, 01 May 2023 10:09:00 -0400 Original-Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9505214c47fso521896166b.1 for ; Mon, 01 May 2023 07:08:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682950137; x=1685542137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kwNEzaZgteepqf1kR5S3jr052JsdG0PIESdEa2hZZj4=; b=i4ona0NQRk2jx9V4+/Y68GEMwReO3TGxbW2BUr+3ut0gJgN+MYIi0qDD2PzY2RJ585 8VOWzU3Lqi+JnhKqfm0NgxNUKSXuhrUjrP94KfhxWwcKd5qke1RcHnlh7pMa6y8yTq7w kFFaYR0oBH0PAlV/f/QS2YNr6Cx2uSaKtYv01Pyz+qDSbniaTkkujZNxz0YDbYgnA0bw JxcphqUh5Jkud4vUiPtxDuwUhbGyIJeRHL2NnMntaASbmhJJzXdnIO2YfFxqWQWiQlfM q6sSLYbB920aI8bPSUCztYcmPqBDdDW+dri+fwgF9/satz0UgfxX8Bx8DrWoLadIturW aBsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682950137; x=1685542137; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kwNEzaZgteepqf1kR5S3jr052JsdG0PIESdEa2hZZj4=; b=SfMjySvhZwgF0GLW64XlCghlK6fG+poyHajeSM/LwKTDU+XDVMW5+pvEMX9LSxI1yH av3o+0Pf2d044TP+0cNFm67BXCxR9ghA1/by8DLPN7CZSW+fcn1EDzuSm/N0iDMOPPlq /q0pk7bdcCK+byxmP54/CtwpZfYhDM8S4Ly8OrILj+t1kjolZ/MrfAEZpvgjp8Br3zn1 CfV714iYi24YwGwNff/QzqlGkuwrZNEOXtsDH6z1VbYCQtHj5hXuq2I1ErI3YExLsc5a s3YDizQdz/JQDiXlnIVbLDe7xfvd71IKxqaXIo7nh63ngRpOyHStwHOOvAv5SZSZuC1O 0aPg== X-Gm-Message-State: AC+VfDwX9yPTTIuFNpO3X6PGIxDu4qyAccjFolj7SI7B4cRg4ubAPE/7 6B0boSEtO3mwSFA7MWxRxq26gw3cPYCd5Cmck8g= X-Google-Smtp-Source: ACHHUZ7qhJT14i3EIFr/s2OYw2NVrWP1tTl4rn540uBH0lXvnpFTl95VYq1qq4N5LJxOU3DYjyvxIZ7GSPA7mRiNMkM= X-Received: by 2002:a17:907:6d19:b0:957:1789:c38c with SMTP id sa25-20020a1709076d1900b009571789c38cmr15180456ejc.38.1682950136683; Mon, 01 May 2023 07:08:56 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=hongyi.zhao@gmail.com; helo=mail-ej1-x62a.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, 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143492 Archived-At: On Mon, May 1, 2023 at 9:55=E2=80=AFPM Hongyi Zhao = wrote: > > On Mon, May 1, 2023 at 9:41=E2=80=AFPM wrote: > > > > On Mon, May 01, 2023 at 09:03:27PM +0800, Hongyi Zhao wrote: > > > On Mon, May 1, 2023 at 7:38=E2=80=AFPM wrote: > > > > [...] > > > > > > That would mean that the file is loaded, but Emacs still shows you > > > > the *scratch* buffer. Otherwise, the file doesn't get loaded at > > > > all. > > > > > > > > This might give hints to find the problem. > > > > > > See the testing below: > > > > > > $ emacs my-icur.tex > > > > > > `C-x b RET` gives the following info: > > > > > > > > > Loading server...done > > > Iedit default key binding is C-; > > > Loading /home/werner/.emacs.d/var/recentf-save.el (source)...done > > [...] > > > > Now I'm confused. What we see here is a *Messages* buffer, not a buffer > > list (what I'd expect C-x b to give us). But there are some messages > > in there hinting at errors during initialization. > > 1. Sorry for my misunderstanding your meaning. > > You let me do the `C-x b TAB` > But I do the `C-x b RET` > > I confirm the file is listed in the buffer list. > > 2. I confirm that the culprit is the following configuration in the init = file: > > (use-package company-math > :hook > (LaTeX-mode . (lambda () > (setq-local company-backends (append '(company-math-symbols-lat= ex > company-latex-commands) > (company--backends) > )))) > > :config > (add-to-list 'company-backends 'company-math-symbols-unicode) > ;; https://github.com/company-mode/company-mode/discussions/1253 > ;; (set-company-backend 'LaTeX-mode > ;; 'company-math-symbols-latex 'company-latex-commands > 'company-math-symbols-unicode) > ) > > Commented out the above configuration fixed this problem. But it > should mean that there is something wrong in my above configuration > which I still cannot figure out. I changed to the following setting and the problem discussed here has been fixed: (use-package company-math :hook ;; This will enable the company-math backend for LaTeX mode (LaTeX-mode . (lambda () (setq-local company-backends (append '((company-math-symbols-latex company-latex-comma= nds)) company-backends)))) ) Zhao