-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Hook minemacs-first-file-hook
doesn't seem to run
#142
Comments
Weird, in my config, Can you try to run Emacs in debug mode:
Can you test if this is valid for the first opened file or for all files? |
Here is it Loading /home/hmanhng/.minemacs.d/early-config.el (source)...done
Loading /nix/store/9mms3z06anpjpvwzd49n8gzrcayzpm2p-emacs-pgtk-29.1/share/emacs/site-lisp/site-start...done
Loading /home/hmanhng/.emacs.d/core/me-loaddefs.el (source)...done
Loading /home/hmanhng/.emacs.d/local/system-env.el (source)...done
[MinEmacs:Log] Setting up hook ‘minemacs-first-org-file-hook’ -- function ‘+first-file--org-h’ -- feature ‘minemacs-first-org-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-elisp-file-hook’ -- function ‘+first-file--elisp-h’ -- feature ‘minemacs-first-elisp-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-file-hook’ -- function ‘+first-file--h’ -- feature ‘minemacs-first-file’.
Loading /home/hmanhng/.emacs.d/core/me-modules.el (source)...done
Loading /home/hmanhng/.minemacs.d/modules.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-splash.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-bootstrap.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...
Configuring package emacs...done
Configuring package tab-bar...done
Configuring package electric...done
Power AC, battery Not charging (97.9% load, remaining time N/A)
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-gc.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-fonts.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-keybindings.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-evil.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-core-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-completion.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-editor.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...
Loading package undo-fu-session...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-vc.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-project.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-prog.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-checkers.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-emacs-lisp.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-data.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-org.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tools.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tty.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-window.el (source)...done
Loading /home/hmanhng/.minemacs.d/config.el (source)...done
[MinEmacs:Log] Loaded init.el
[MinEmacs:Log] =============== Loaded Emacs ===============
[MinEmacs:Info] Loaded Emacs in 1.510869 seconds.
[MinEmacs:Log] Applying ‘minemacs-fonts’.
[MinEmacs:Log] Loading user theme: catppuccin
[MinEmacs:Log] Running 27 ‘minemacs-after-startup-hook’ hooks.
Configuring package which-key...done
Loading package general...
Configuring package general...done
Loading package general...done
Configuring package evil...done
Configuring package anzu...done
Configuring package nerd-icons...done
Configuring package doom-modeline...done
Configuring package solaire-mode...done
Configuring package corfu...done
Loading package nerd-icons-corfu...
Configuring package nerd-icons-corfu...done
Loading package nerd-icons-corfu...done
Configuring package corfu-history...done
Loading package vertico-directory...done
Configuring package pulsar...done
Configuring package treesit-auto...done
[MinEmacs:Log] Providing ‘minemacs-loaded’.
Loading package project...done
Loading package recentf...
Configuring package recentf...
Loading /home/hmanhng/.emacs.d/local/recentf-save.el (source)...done
Cleaning up the recentf list...done (0 removed)
Configuring package recentf...done
Loading package recentf...done
Loading package pixel-scroll...
Configuring package pixel-scroll...done
Loading package pixel-scroll...done
Loading package windmove...
Configuring package windmove...done
Loading package windmove...done
Loading package evil-collection...
Configuring package evil-collection...done
Loading package evil-collection...done
Loading package cape...
Configuring package cape...done
Loading package cape...done
Loading package orderless...done
Loading package elisp-demos...done
Loading package eros...
Configuring package eros...done
Loading package eros...done
[MinEmacs:Log] Loading the default persistent scratch buffer.
[MinEmacs:Log] Reading persistent scratch from /home/hmanhng/.emacs.d/local/pscratch/__default.el
[MinEmacs:Log] Settinng face ‘default’ to ‘(:family IBM Plex Mono :height 170)’
[MinEmacs:Log] Settinng face ‘fixed-pitch’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘fixed-pitch-serif’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘variable-pitch’ to ‘(:family Roboto)’
[MinEmacs:Log] Settinng script ‘emoji’ to ‘(:family Noto Color Emoji)’
[MinEmacs:Log] Running task 1, calling function ‘(closure (t) nil (require 'minemacs-laz…’
[MinEmacs:Log] Loading 1 lazy packages incrementally.
[MinEmacs:Log] Providing ‘minemacs-lazy’.
[MinEmacs:Log] Running task 4, calling function ‘(closure (t) nil (if (featurep 'native-…’
[MinEmacs:Info] Trying to clean outdated native compile cache
Cache cleared
[MinEmacs:Info] Trying to clean outdated straight build cache
[MinEmacs:Info] Trying to clean MinEmacs’ root directory
[MinEmacs:Log] Running task 3, calling function ‘(closure (t) nil (if (server-running-p)…’
[MinEmacs:Log] Running task 2, calling function ‘gcmh-mode’
Configuring package consult...done |
Thanks @hmanhng Can you redo it again but open a file after Emacs gets loaded! Otherwise I can't see if the hook is executed or not. Please, can you try also if only the first opened file which doesn't restore its position or if it is valid for all opened files? |
oh it seems it only errors with the first file I open, with other files it works Loading /home/hmanhng/.minemacs.d/early-config.el (source)...done
Loading /nix/store/9mms3z06anpjpvwzd49n8gzrcayzpm2p-emacs-pgtk-29.1/share/emacs/site-lisp/site-start...done
Loading /home/hmanhng/.emacs.d/core/me-loaddefs.el (source)...done
Loading /home/hmanhng/.emacs.d/local/system-env.el (source)...done
[MinEmacs:Log] Setting up hook ‘minemacs-first-org-file-hook’ -- function ‘+first-file--org-h’ -- feature ‘minemacs-first-org-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-elisp-file-hook’ -- function ‘+first-file--elisp-h’ -- feature ‘minemacs-first-elisp-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-file-hook’ -- function ‘+first-file--h’ -- feature ‘minemacs-first-file’.
Loading /home/hmanhng/.emacs.d/core/me-modules.el (source)...done
Loading /home/hmanhng/.minemacs.d/modules.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-splash.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-bootstrap.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...
Configuring package emacs...done
Configuring package tab-bar...done
Configuring package electric...done
Power AC, battery Not charging (97.9% load, remaining time N/A)
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-gc.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-fonts.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-keybindings.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-evil.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-core-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-completion.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-editor.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...
Loading package undo-fu-session...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-vc.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-project.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-prog.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-checkers.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-emacs-lisp.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-data.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-org.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tools.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tty.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-window.el (source)...done
Loading /home/hmanhng/.minemacs.d/config.el (source)...done
[MinEmacs:Log] Loaded init.el
[MinEmacs:Log] =============== Loaded Emacs ===============
[MinEmacs:Info] Loaded Emacs in 1.684089 seconds.
[MinEmacs:Log] Applying ‘minemacs-fonts’.
[MinEmacs:Log] Loading user theme: catppuccin
[MinEmacs:Log] Running 27 ‘minemacs-after-startup-hook’ hooks.
Configuring package which-key...done
Loading package general...
Configuring package general...done
Loading package general...done
Configuring package evil...done
Configuring package anzu...done
Configuring package nerd-icons...done
Configuring package doom-modeline...done
Configuring package solaire-mode...done
Configuring package corfu...done
Loading package nerd-icons-corfu...
Configuring package nerd-icons-corfu...done
Loading package nerd-icons-corfu...done
Configuring package corfu-history...done
Loading package vertico-directory...done
Configuring package pulsar...done
Configuring package treesit-auto...done
[MinEmacs:Log] Providing ‘minemacs-loaded’.
Loading package project...done
Loading package recentf...
Configuring package recentf...
Loading /home/hmanhng/.emacs.d/local/recentf-save.el (source)...done
Cleaning up the recentf list...done (0 removed)
Configuring package recentf...done
Loading package recentf...done
Loading package pixel-scroll...
Configuring package pixel-scroll...done
Loading package pixel-scroll...done
Loading package windmove...
Configuring package windmove...done
Loading package windmove...done
Loading package evil-collection...
Configuring package evil-collection...done
Loading package evil-collection...done
Loading package cape...
Configuring package cape...done
Loading package cape...done
Loading package orderless...done
Loading package elisp-demos...done
Loading package eros...
Configuring package eros...done
Loading package eros...done
[MinEmacs:Log] Loading the default persistent scratch buffer.
[MinEmacs:Log] Reading persistent scratch from /home/hmanhng/.emacs.d/local/pscratch/__default.el
[MinEmacs:Log] Settinng face ‘default’ to ‘(:family IBM Plex Mono :height 180)’
[MinEmacs:Log] Settinng face ‘fixed-pitch’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘fixed-pitch-serif’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘variable-pitch’ to ‘(:family Roboto)’
[MinEmacs:Log] Settinng script ‘emoji’ to ‘(:family Noto Color Emoji)’
Quit
[MinEmacs:Log] Running 5 ‘minemacs-first-file-hook’ hooks.
Loading package epa-file...
Configuring package epa-file...
‘epa-file’ already enabled
Configuring package epa-file...done
Loading package epa-file...done (0.120s)
Configuring package super-save...done
[MinEmacs:Log] Running 0 ‘minemacs-first-org-file-hook’ hooks.
Loading package oc-csl...
Configuring package bibtex...done
Loading package oc-csl...done (0.132s)
Loading package oc-natbib...done
Loading package oc-biblatex...done
Loading package ob-mermaid...
Configuring package ob-mermaid...done
Loading package ob-mermaid...done
Loading package ob-d2...
Configuring package ob-d2...done
Loading package ob-d2...done
Configuring package org...done (0.543s)
Loading package org-indent...done
Loading package oc...
Configuring package oc...done
Loading package oc...done
Loading package me-org-extras...
Configuring package me-org-extras...
LaTeX numbering enabled.
Configuring package me-org-extras...done
Loading package me-org-extras...done
Loading package org-contrib...done
Configuring package tempel...done
Loading package tempel-collection...done
Loading package evil-org-agenda...
Configuring package evil-org-agenda...done
Loading package evil-org-agenda...done
Configuring package org-appear...done
Configuring package ssh-deploy...done
Configuring package hl-todo...done
Configuring package highlight-numbers...done
Configuring package compile...done
Configuring package flymake...done
Configuring package parinfer-rust-mode...done
[MinEmacs:Log] Running task 1, calling function ‘(closure (t) nil (require 'minemacs-laz…’
[MinEmacs:Log] Loading 1 lazy packages incrementally.
[MinEmacs:Log] Providing ‘minemacs-lazy’.
[MinEmacs:Log] Running task 4, calling function ‘(closure (t) nil (if (featurep 'native-…’
[MinEmacs:Info] Trying to clean outdated native compile cache
Cache cleared
[MinEmacs:Info] Trying to clean outdated straight build cache
[MinEmacs:Info] Trying to clean MinEmacs’ root directory
[MinEmacs:Log] Running task 3, calling function ‘(closure (t) nil (if (server-running-p)…’
[MinEmacs:Info] Started Emacs daemon in background.
[MinEmacs:Log] Running task 2, calling function ‘gcmh-mode’
Configuring package consult...done
Error in post-command-hook (selection-highlight-mode-post-command-hook): (args-out-of-range #<buffer *Messages*> 1 7208)
|
Thank you for your responsiveness. Well, as I see, the hooks are running correctly after opening the first file:
I will push a small fix so it enables |
Can you try it now please ? @hmanhng |
That's after I opened up emacs and Loading /home/hmanhng/.minemacs.d/early-config.el (source)...done
Loading /nix/store/9mms3z06anpjpvwzd49n8gzrcayzpm2p-emacs-pgtk-29.1/share/emacs/site-lisp/site-start...done
Loading /home/hmanhng/.emacs.d/core/me-loaddefs.el (source)...done
Loading /home/hmanhng/.emacs.d/local/system-env.el (source)...done
[MinEmacs:Log] Setting up hook ‘minemacs-first-org-file-hook’ -- function ‘+first-file--org-h’ -- feature ‘minemacs-first-org-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-elisp-file-hook’ -- function ‘+first-file--elisp-h’ -- feature ‘minemacs-first-elisp-file’.
[MinEmacs:Log] Setting up hook ‘minemacs-first-file-hook’ -- function ‘+first-file--h’ -- feature ‘minemacs-first-file’.
Loading /home/hmanhng/.emacs.d/core/me-modules.el (source)...done
Loading /home/hmanhng/.minemacs.d/modules.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-splash.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-bootstrap.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...
Configuring package emacs...done
Configuring package tab-bar...done
Configuring package electric...done
Power AC, battery Not charging (97.9% load, remaining time N/A)
Loading /home/hmanhng/.emacs.d/core/me-builtin.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-gc.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-fonts.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-keybindings.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-evil.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-core-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/core/me-completion.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-ui.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-editor.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...
Loading package undo-fu-session...done
Loading /home/hmanhng/.emacs.d/modules/me-undo.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-vc.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-project.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-prog.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-checkers.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-emacs-lisp.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-data.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-org.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tools.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-tty.el (source)...done
Loading /home/hmanhng/.emacs.d/modules/me-window.el (source)...done
Loading /home/hmanhng/.minemacs.d/config.el (source)...done
[MinEmacs:Log] Loaded init.el
Loading package oc-csl...
Configuring package bibtex...done
Loading package oc-csl...done (0.129s)
Loading package oc-natbib...done
Loading package oc-biblatex...done
Configuring package org...done (0.881s)
Loading package org-indent...done
Loading package oc...
Configuring package oc...done
Loading package oc...done
Loading package me-org-extras...
Configuring package me-org-extras...
LaTeX numbering enabled.
Configuring package me-org-extras...done
Loading package me-org-extras...done
Loading package org-contrib...done
Configuring package tempel...done
Loading package tempel-collection...done
Loading package general...
Configuring package general...done
Loading package general...done
Configuring package evil...done
Loading package evil-org-agenda...
Configuring package evil-org-agenda...done
Loading package evil-org-agenda...done
Configuring package org-appear...done
Configuring package ssh-deploy...done
[MinEmacs:Log] =============== Loaded Emacs ===============
[MinEmacs:Info] Loaded Emacs in 2.253214 seconds.
[MinEmacs:Log] Applying ‘minemacs-fonts’.
[MinEmacs:Log] Loading user theme: catppuccin
[MinEmacs:Log] Running 27 ‘minemacs-after-startup-hook’ hooks.
Configuring package which-key...done
Configuring package anzu...done
Configuring package nerd-icons...done
Configuring package doom-modeline...done
Configuring package solaire-mode...done
Configuring package corfu...done
Loading package nerd-icons-corfu...
Configuring package nerd-icons-corfu...done
Loading package nerd-icons-corfu...done
Configuring package corfu-history...done
Loading package vertico-directory...done
Configuring package pulsar...done
Configuring package treesit-auto...done
[MinEmacs:Log] Providing ‘minemacs-loaded’.
Loading package project...done
Loading package recentf...
Configuring package recentf...
Loading /home/hmanhng/.emacs.d/local/recentf-save.el (source)...done
Cleaning up the recentf list...done (0 removed)
Configuring package recentf...done
Loading package recentf...done
Loading package pixel-scroll...
Configuring package pixel-scroll...done
Loading package pixel-scroll...done
Loading package windmove...
Configuring package windmove...done
Loading package windmove...done
Loading package evil-collection...
Configuring package evil-collection...done (0.131s)
Loading package evil-collection...done (0.170s)
Loading package cape...
Configuring package cape...done
Loading package cape...done
Loading package orderless...done
Loading package elisp-demos...done
Loading package eros...
Configuring package eros...done
Loading package eros...done
[MinEmacs:Log] Loading the default persistent scratch buffer.
[MinEmacs:Log] Reading persistent scratch from /home/hmanhng/.emacs.d/local/pscratch/__default.el
[MinEmacs:Log] Settinng face ‘default’ to ‘(:family IBM Plex Mono :height 180)’
[MinEmacs:Log] Settinng face ‘fixed-pitch’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘fixed-pitch-serif’ to ‘(:inherit default)’
[MinEmacs:Log] Settinng face ‘variable-pitch’ to ‘(:family Roboto)’
[MinEmacs:Log] Settinng script ‘emoji’ to ‘(:family Noto Color Emoji)’
Configuring package hl-todo...done
Configuring package highlight-numbers...done
Configuring package compile...done
Configuring package flymake...done
Configuring package parinfer-rust-mode...done
Configuring package consult...done
[MinEmacs:Log] Running task 1, calling function ‘(closure (t) nil (require 'minemacs-laz…’
[MinEmacs:Log] Loading 1 lazy packages incrementally.
[MinEmacs:Log] Providing ‘minemacs-lazy’.
[MinEmacs:Log] Running task 4, calling function ‘(closure (t) nil (if (featurep 'native-…’
[MinEmacs:Info] Trying to clean outdated native compile cache
Cache cleared
[MinEmacs:Info] Trying to clean outdated straight build cache
[MinEmacs:Info] Trying to clean MinEmacs’ root directory
[MinEmacs:Log] Running task 3, calling function ‘(closure (t) nil (if (server-running-p)…’
[MinEmacs:Info] Started Emacs daemon in background.
[MinEmacs:Log] Running task 2, calling function ‘gcmh-mode’
Mark saved where search started [2 times]
or: Beginning of buffer [2 times]
or: Beginning of buffer |
i will try now |
Looks like it's not working yet. |
Yep, the current implementation doesn't run the hook on the first file if passed as an argument. I will try to fix it later, but for the moment, this doesn't bother me that much. |
I think that can fix with Also |
Yep, you're right, @hmanhng. In my workflow, I never open a file with Emacs from GUI ("double-clicking" a file or "open with Emacs", ...), so I didn't notice these issues. I will push a fix for this later. Thank you for bringing it to my attention. |
I created a pull request for |
I've pushed fixes for both of them. There is no need to enable |
hmm, |
Yep, you're right, I've just tested it. I've pushed a fix for it, thanks again! |
@abougouffa I think this issue is still not fixed, |
Additionally, I got an issue similar to the following: Steps to reproduce the behavior:
(+deferred!
(+eglot-register '(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
(+eglot-auto-enable)
;; Auto enable eglot
(with-eval-after-load 'eglot
;; You can use this to fill `+eglot-auto-enable-modes' with all supported
;; modes from `eglot-server-programs'
(+eglot-use-on-all-supported-modes eglot-server-programs)))
If I replace the following it works (add-hook 'java-mode-hook #'eglot-ensure)
(+deferred!
(+eglot-register '(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
;; (+eglot-auto-enable)
;; Auto enable eglot
(with-eval-after-load 'eglot
;; You can use this to fill `+eglot-auto-enable-modes' with all supported
;; modes from `eglot-server-programs'
(+eglot-use-on-all-supported-modes eglot-server-programs))) |
If I add (+deferred!
(+eglot-register '(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
(add-hook 'java-mode-hook #'eglot-ensure)
;; (+eglot-auto-enable)
;; Auto enable eglot
(with-eval-after-load 'eglot
(+eglot-use-on-all-supported-modes eglot-server-programs))) Both |
Thank you for the feedback @hmanhng I'm reopening the issue and I will take a look at it later. Thanks again! |
The Eglot issue isn't related to The documentation for the
So you need to add Documentation for
I've pushed a fix for better invocation of |
It seems that |
Now |
Even if I added the following (+deferred!
(+eglot-register '(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
(add-to-list '+eglot-auto-enable-modes 'java-mode)
(+eglot-auto-enable)) or (+deferred!
(+eglot-register '(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
(add-to-list '+eglot-auto-enable-modes 'java-mode))
(+eglot-auto-enable)
not only with |
Thank you again @hmanhng , I really appreciate your help! I will take a look at Eglot auto enable (I'm not using it in my config, hence, I didn't notice that it is not working). |
@abougouffa I tried again 1 time with (add-to-list '+eglot-auto-enable-modes 'java-mode)
(+eglot-auto-enable)
(+deferred!
(+eglot-register
'(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))) If you include Is the problem that |
Also I checked
test with: (with-eval-after-load 'eglot
(+eglot-register
'(java-mode java-ts-mode) `("jdt-language-server" "-data" ,(expand-file-name "java-workspace" minemacs-cache-dir)))
(+eglot-use-on-all-supported-modes eglot-server-programs))
(nconc +eglot-auto-enable-modes '(java-mode java-ts-mode))
(+eglot-auto-enable) |
It seems like just running emacs with the client will fix everything |
In order for this to work, you would need to call I admit, this is too technical and needs to know the internal implementation details of these functions. I will try to implement this in a more convenient manner. |
Thank you very much for your help, I did I've always been looking for an Anyway thank you very much for your help. I don't have the time or good enough knowledge to learn |
@hmanhng Thank you for the feedback. |
I usually open the terminal and open a file with emacs from here Also if necessary I will report back the issue I get when using Thank you for your assistance. |
Yes, please, I'll really appreciate that. |
Describe the bug
save-place-mode is enabled but inactive
Emacs version
GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0)
To Reproduce
Steps to reproduce the behavior:
Screenshots
![image](https://private-user-images.githubusercontent.com/64454245/291573501-ae5e6e44-aff4-41e1-876e-7e05b266addc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE2NzM3NTEsIm5iZiI6MTcyMTY3MzQ1MSwicGF0aCI6Ii82NDQ1NDI0NS8yOTE1NzM1MDEtYWU1ZTZlNDQtYWZmNC00MWUxLTg3NmUtN2UwNWIyNjZhZGRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIyVDE4MzczMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUzZjgwMzQzZjY3ZjFjODVmZjk4ZTQ1NDQ4ODBmNTNiMWUzMmE5ZGQyNTlhZjg0MmQ1NDg3NmRkZjM0NGFhODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.nYdgGM9AqBl7zV0xanQE7hhv5-_aMfu8zfbyNc3nXBE)
Additional context
minemacs-first-file-hook
don't run when opening any fileI tried running the hook
(run-hooks 'minemacs-first-file-hook)
in config.el and it worked.The text was updated successfully, but these errors were encountered: