all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
@ 2023-04-30 14:36 Hongyi Zhao
  2023-04-30 14:45 ` tomas
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-04-30 14:36 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

Hi here,

When I double-click on a TeX document to open it, Emacs will show the
scratch window instead of the TeX document window, as shown in the
attachment. Any tips will be appreciated.

Regards,
Zhao
-- 
Assoc. Prof. Hongsheng Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 111003 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-04-30 14:36 Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it Hongyi Zhao
@ 2023-04-30 14:45 ` tomas
  2023-04-30 23:31   ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: tomas @ 2023-04-30 14:45 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 599 bytes --]

On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> Hi here,
> 
> When I double-click on a TeX document to open it, Emacs will show the
> scratch window instead of the TeX document window, as shown in the
> attachment. Any tips will be appreciated.

I think this depends more on your operating system/desktop environment
than on Emacs itself. The desktop environment is the one responsible
of translating your double click into the invocation of Emacs.

It seems that some parameter in this invocation got lost.

What OS/desktop environment are you using?

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-04-30 14:45 ` tomas
@ 2023-04-30 23:31   ` Hongyi Zhao
  2023-05-01  2:03     ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-04-30 23:31 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Sun, Apr 30, 2023 at 10:46 PM <tomas@tuxteam.de> wrote:
>
> On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> > Hi here,
> >
> > When I double-click on a TeX document to open it, Emacs will show the
> > scratch window instead of the TeX document window, as shown in the
> > attachment. Any tips will be appreciated.
>
> I think this depends more on your operating system/desktop environment
> than on Emacs itself. The desktop environment is the one responsible
> of translating your double click into the invocation of Emacs.
>
> It seems that some parameter in this invocation got lost.
>
> What OS/desktop environment are you using?

$ inxi -S
System:
  Host: X10DAi Kernel: 5.19.0-21-generic x86_64 bits: 64 Desktop: GNOME 43.0
    Distro: Ubuntu 22.10 (Kinetic Kudu)

> Cheers
> --
> t

Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-04-30 23:31   ` Hongyi Zhao
@ 2023-05-01  2:03     ` Hongyi Zhao
  2023-05-01  6:11       ` tomas
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01  2:03 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

On Mon, May 1, 2023 at 7:31 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Sun, Apr 30, 2023 at 10:46 PM <tomas@tuxteam.de> wrote:
> >
> > On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> > > Hi here,
> > >
> > > When I double-click on a TeX document to open it, Emacs will show the
> > > scratch window instead of the TeX document window, as shown in the
> > > attachment. Any tips will be appreciated.
> >
> > I think this depends more on your operating system/desktop environment
> > than on Emacs itself. The desktop environment is the one responsible
> > of translating your double click into the invocation of Emacs.
> >
> > It seems that some parameter in this invocation got lost.
> >
> > What OS/desktop environment are you using?
>
> $ inxi -S
> System:
>   Host: X10DAi Kernel: 5.19.0-21-generic x86_64 bits: 64 Desktop: GNOME 43.0
>     Distro: Ubuntu 22.10 (Kinetic Kudu)

A very strange thing is that if I double-click on a very simple tex
file, this issue does not occur, as shown in the attached screenshot:

\documentclass{iucr}
\usepackage[unicode=true,
  bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
  breaklinks=false,pdfborder={0 0
0},pdfborderstyle={},backref=false,colorlinks=true]
  {hyperref}
\begin{document}

\end{document}

Regards,
Zhao

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 165654 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01  2:03     ` Hongyi Zhao
@ 2023-05-01  6:11       ` tomas
  2023-05-01  6:51         ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: tomas @ 2023-05-01  6:11 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

On Mon, May 01, 2023 at 10:03:30AM +0800, Hongyi Zhao wrote:
> On Mon, May 1, 2023 at 7:31 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> >
> > On Sun, Apr 30, 2023 at 10:46 PM <tomas@tuxteam.de> wrote:
> > >
> > > On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> > > > Hi here,
> > > >
> > > > When I double-click on a TeX document to open it, Emacs will show the
> > > > scratch window instead of the TeX document window [...]

> > > What OS/desktop environment are you using?
> >
> > $ inxi -S
> > System:
> >   Host: X10DAi Kernel: 5.19.0-21-generic x86_64 bits: 64 Desktop: GNOME 43.0
> >     Distro: Ubuntu 22.10 (Kinetic Kudu)

So it's GNOME, I see. Sorry to say that I lost track of GNOME years
ago, so I'm not that much of an expert...

> A very strange thing is that if I double-click on a very simple tex
> file, this issue does not occur, as shown in the attached screenshot:

This is strange indeed. I guess that there is a context menu
(perhaps right-clicking on the file) which offers you "open
with..." or similar. What happens then?

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01  6:11       ` tomas
@ 2023-05-01  6:51         ` Hongyi Zhao
  2023-05-01  7:04           ` Hongyi Zhao
  2023-05-01 11:33           ` tomas
  0 siblings, 2 replies; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01  6:51 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1397 bytes --]

On Mon, May 1, 2023 at 2:11 PM <tomas@tuxteam.de> wrote:
>
> On Mon, May 01, 2023 at 10:03:30AM +0800, Hongyi Zhao wrote:
> > On Mon, May 1, 2023 at 7:31 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> > >
> > > On Sun, Apr 30, 2023 at 10:46 PM <tomas@tuxteam.de> wrote:
> > > >
> > > > On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> > > > > Hi here,
> > > > >
> > > > > When I double-click on a TeX document to open it, Emacs will show the
> > > > > scratch window instead of the TeX document window [...]
>
> > > > What OS/desktop environment are you using?
> > >
> > > $ inxi -S
> > > System:
> > >   Host: X10DAi Kernel: 5.19.0-21-generic x86_64 bits: 64 Desktop: GNOME 43.0
> > >     Distro: Ubuntu 22.10 (Kinetic Kudu)
>
> So it's GNOME, I see. Sorry to say that I lost track of GNOME years
> ago, so I'm not that much of an expert...

So, what is your favorite desktop environment? What are you currently using?

> > A very strange thing is that if I double-click on a very simple tex
> > file, this issue does not occur, as shown in the attached screenshot:
>
> This is strange indeed. I guess that there is a context menu
> (perhaps right-clicking on the file) which offers you "open
> with..." or similar. What happens then?

The default application has been set to Emacs, as shown in the attachment.

> Cheers
> --
> t

Zhao

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 83096 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01  6:51         ` Hongyi Zhao
@ 2023-05-01  7:04           ` Hongyi Zhao
  2023-05-01 11:38             ` tomas
  2023-05-01 11:33           ` tomas
  1 sibling, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01  7:04 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Mon, May 1, 2023 at 2:51 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Mon, May 1, 2023 at 2:11 PM <tomas@tuxteam.de> wrote:
> >
> > On Mon, May 01, 2023 at 10:03:30AM +0800, Hongyi Zhao wrote:
> > > On Mon, May 1, 2023 at 7:31 AM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
> > > >
> > > > On Sun, Apr 30, 2023 at 10:46 PM <tomas@tuxteam.de> wrote:
> > > > >
> > > > > On Sun, Apr 30, 2023 at 10:36:17PM +0800, Hongyi Zhao wrote:
> > > > > > Hi here,
> > > > > >
> > > > > > When I double-click on a TeX document to open it, Emacs will show the
> > > > > > scratch window instead of the TeX document window [...]
> >
> > > > > What OS/desktop environment are you using?
> > > >
> > > > $ inxi -S
> > > > System:
> > > >   Host: X10DAi Kernel: 5.19.0-21-generic x86_64 bits: 64 Desktop: GNOME 43.0
> > > >     Distro: Ubuntu 22.10 (Kinetic Kudu)
> >
> > So it's GNOME, I see. Sorry to say that I lost track of GNOME years
> > ago, so I'm not that much of an expert...
>
> So, what is your favorite desktop environment? What are you currently using?
>
> > > A very strange thing is that if I double-click on a very simple tex
> > > file, this issue does not occur, as shown in the attached screenshot:
> >
> > This is strange indeed. I guess that there is a context menu
> > (perhaps right-clicking on the file) which offers you "open
> > with..." or similar. What happens then?
>
> The default application has been set to Emacs, as shown in the attachment.

Another important clue, when the problem occurs, I noticed the
following in the *Messages* buffer:

     font-lock-compile-keywords: Font-lock trying to use keywords
before setting them up

On the other hand, the correct open TeX file didn't trigger the above message.

Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01  6:51         ` Hongyi Zhao
  2023-05-01  7:04           ` Hongyi Zhao
@ 2023-05-01 11:33           ` tomas
  2023-05-01 13:01             ` Hongyi Zhao
  1 sibling, 1 reply; 16+ messages in thread
From: tomas @ 2023-05-01 11:33 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

On Mon, May 01, 2023 at 02:51:43PM +0800, Hongyi Zhao wrote:
> On Mon, May 1, 2023 at 2:11 PM <tomas@tuxteam.de> wrote:

[...]

> > So it's GNOME, I see. Sorry to say that I lost track of GNOME years
> > ago, so I'm not that much of an expert...
> 
> So, what is your favorite desktop environment? What are you currently using?

I'm a bit exotic. No desktop environment, just a window manager
(fvwm2). I was actually quite a fan of GNOME in the early 2000s,
but by about 2008 or so it started becoming too complex for my
taste. After a short dabbling in XFCE I decided a desktop environment
is too limiting for me and I went back to a simple WM; first it
was Awesome, then (full circle) fvwm2.

I have to do more things myself, but then I can do more things
myself, and I appreciate that :-)

> > > A very strange thing is that if I double-click on a very simple tex
> > > file, this issue does not occur, as shown in the attached screenshot:
> >
> > This is strange indeed. I guess that there is a context menu
> > (perhaps right-clicking on the file) which offers you "open
> > with..." or similar. What happens then?
> 
> The default application has been set to Emacs, as shown in the attachment.

Hmmm. I see. Any chance finding out how Emacs is really invoked
by your desktop environment?

What happens if you open a terminal and just enter

  emacs <your-file-here>

(substituting <your-file-here> by the real file path of your
problematic file, of course)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01  7:04           ` Hongyi Zhao
@ 2023-05-01 11:38             ` tomas
  2023-05-01 13:03               ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: tomas @ 2023-05-01 11:38 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

On Mon, May 01, 2023 at 03:04:36PM +0800, Hongyi Zhao wrote:

[...]

> Another important clue, when the problem occurs, I noticed the
> following in the *Messages* buffer:
> 
>      font-lock-compile-keywords: Font-lock trying to use keywords
> before setting them up
> 
> On the other hand, the correct open TeX file didn't trigger the above message.

I don't even know what that message means: hopefully someone more
expert in Emacs things can tell us. On the other hand, I can't
imagine that this thing causes the file not being loaded.

What happens when you click on the complex TeX file and then list
the buffers in your Emacs (C-x b)? Does the buffer appear on the
list?

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.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 11:33           ` tomas
@ 2023-05-01 13:01             ` Hongyi Zhao
  2023-05-01 13:38               ` tomas
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01 13:01 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Mon, May 1, 2023 at 7:33 PM <tomas@tuxteam.de> wrote:
>
> On Mon, May 01, 2023 at 02:51:43PM +0800, Hongyi Zhao wrote:
> > On Mon, May 1, 2023 at 2:11 PM <tomas@tuxteam.de> wrote:
>
> [...]
>
> > > So it's GNOME, I see. Sorry to say that I lost track of GNOME years
> > > ago, so I'm not that much of an expert...
> >
> > So, what is your favorite desktop environment? What are you currently using?
>
> I'm a bit exotic. No desktop environment, just a window manager
> (fvwm2). I was actually quite a fan of GNOME in the early 2000s,
> but by about 2008 or so it started becoming too complex for my
> taste. After a short dabbling in XFCE I decided a desktop environment
> is too limiting for me and I went back to a simple WM; first it
> was Awesome, then (full circle) fvwm2.
>
> I have to do more things myself, but then I can do more things
> myself, and I appreciate that :-)
>
> > > > A very strange thing is that if I double-click on a very simple tex
> > > > file, this issue does not occur, as shown in the attached screenshot:
> > >
> > > This is strange indeed. I guess that there is a context menu
> > > (perhaps right-clicking on the file) which offers you "open
> > > with..." or similar. What happens then?
> >
> > The default application has been set to Emacs, as shown in the attachment.
>
> Hmmm. I see. Any chance finding out how Emacs is really invoked
> by your desktop environment?
>
> What happens if you open a terminal and just enter
>
>   emacs <your-file-here>
>
> (substituting <your-file-here> by the real file path of your
> problematic file, of course)

The same problem occurs.

> Cheers
> --
> t

Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 11:38             ` tomas
@ 2023-05-01 13:03               ` Hongyi Zhao
  2023-05-01 13:41                 ` tomas
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01 13:03 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Mon, May 1, 2023 at 7:38 PM <tomas@tuxteam.de> wrote:
>
> On Mon, May 01, 2023 at 03:04:36PM +0800, Hongyi Zhao wrote:
>
> [...]
>
> > Another important clue, when the problem occurs, I noticed the
> > following in the *Messages* buffer:
> >
> >      font-lock-compile-keywords: Font-lock trying to use keywords
> > before setting them up
> >
> > On the other hand, the correct open TeX file didn't trigger the above message.
>
> I don't even know what that message means: hopefully someone more
> expert in Emacs things can tell us. On the other hand, I can't
> imagine that this thing causes the file not being loaded.
>
> What happens when you click on the complex TeX file and then list
> the buffers in your Emacs (C-x b)? Does the buffer appear on the
> list?
>
> 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
Cleaning up the recentf list...done (0 removed)
Using default formatter emacs-lisp
For information about GNU Emacs and the GNU system, type C-h C-a.
Wrote /home/werner/.emacs.d/var/recentf-save.el
File mode specification error: (void-function company--backends)
Applying style hooks...
Loading /home/werner/Desktop/iucr/latex/.auctex-auto/my-icur.el (source)...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/fontenc.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/xspace.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/graphicx.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/mathtools.elc...
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amsmath.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/mathtools.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amstext.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amsbsy.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amsopn.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amssymb.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/amsfonts.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/algorithm.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/algpseudocode.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/color.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/array.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/bm.elc...done
Loading /home/werner/.emacs.d/straight/repos/auctex/style/multirow.elc...done
font-lock-compile-keywords: Font-lock trying to use keywords before
setting them up
Package cl is deprecated
Beginning of buffer [4 times]


> Cheers
> --
> t

Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 13:01             ` Hongyi Zhao
@ 2023-05-01 13:38               ` tomas
  0 siblings, 0 replies; 16+ messages in thread
From: tomas @ 2023-05-01 13:38 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

On Mon, May 01, 2023 at 09:01:55PM +0800, Hongyi Zhao wrote:
> On Mon, May 1, 2023 at 7:33 PM <tomas@tuxteam.de> wrote:

[...]

> > What happens if you open a terminal and just enter
> >
> >   emacs <your-file-here>
> >
> > (substituting <your-file-here> by the real file path of your
> > problematic file, of course)
> 
> The same problem occurs.

Aha. Seems there is some problem with your Emacs setup, then.

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 13:03               ` Hongyi Zhao
@ 2023-05-01 13:41                 ` tomas
  2023-05-01 13:55                   ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: tomas @ 2023-05-01 13:41 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

On Mon, May 01, 2023 at 09:03:27PM +0800, Hongyi Zhao wrote:
> On Mon, May 1, 2023 at 7:38 PM <tomas@tuxteam.de> 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.

Does your problem change if you invoke Emacs with -Q option?

That is:

  $ emacs -Q my-icur.tex

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 13:41                 ` tomas
@ 2023-05-01 13:55                   ` Hongyi Zhao
  2023-05-01 14:08                     ` Hongyi Zhao
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01 13:55 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Mon, May 1, 2023 at 9:41 PM <tomas@tuxteam.de> wrote:
>
> On Mon, May 01, 2023 at 09:03:27PM +0800, Hongyi Zhao wrote:
> > On Mon, May 1, 2023 at 7:38 PM <tomas@tuxteam.de> 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-latex
                             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.

> Does your problem change if you invoke Emacs with -Q option?
>
> That is:
>
>   $ emacs -Q my-icur.tex
>
> Cheers
> --
> t

Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 13:55                   ` Hongyi Zhao
@ 2023-05-01 14:08                     ` Hongyi Zhao
  2023-05-01 15:10                       ` tomas
  0 siblings, 1 reply; 16+ messages in thread
From: Hongyi Zhao @ 2023-05-01 14:08 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

On Mon, May 1, 2023 at 9:55 PM Hongyi Zhao <hongyi.zhao@gmail.com> wrote:
>
> On Mon, May 1, 2023 at 9:41 PM <tomas@tuxteam.de> wrote:
> >
> > On Mon, May 01, 2023 at 09:03:27PM +0800, Hongyi Zhao wrote:
> > > On Mon, May 1, 2023 at 7:38 PM <tomas@tuxteam.de> 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-latex
>                              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-commands))
                      company-backends))))
  )


Zhao



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

* Re: Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it.
  2023-05-01 14:08                     ` Hongyi Zhao
@ 2023-05-01 15:10                       ` tomas
  0 siblings, 0 replies; 16+ messages in thread
From: tomas @ 2023-05-01 15:10 UTC (permalink / raw)
  To: Hongyi Zhao; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

On Mon, May 01, 2023 at 10:08:44PM +0800, Hongyi Zhao wrote:

[...]

> 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-commands))
>                       company-backends))))
>   )

Glad you found it :)

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

end of thread, other threads:[~2023-05-01 15:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-30 14:36 Emacs will show the scratch window instead of the tex document window when I double click on a tex document to open it Hongyi Zhao
2023-04-30 14:45 ` tomas
2023-04-30 23:31   ` Hongyi Zhao
2023-05-01  2:03     ` Hongyi Zhao
2023-05-01  6:11       ` tomas
2023-05-01  6:51         ` Hongyi Zhao
2023-05-01  7:04           ` Hongyi Zhao
2023-05-01 11:38             ` tomas
2023-05-01 13:03               ` Hongyi Zhao
2023-05-01 13:41                 ` tomas
2023-05-01 13:55                   ` Hongyi Zhao
2023-05-01 14:08                     ` Hongyi Zhao
2023-05-01 15:10                       ` tomas
2023-05-01 11:33           ` tomas
2023-05-01 13:01             ` Hongyi Zhao
2023-05-01 13:38               ` tomas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.