Skip to content
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

Emacs run batch using run-hooks 'emacs-startup-hook dies #13179

Open
braun-steven opened this issue Jan 12, 2020 · 6 comments
Open

Emacs run batch using run-hooks 'emacs-startup-hook dies #13179

braun-steven opened this issue Jan 12, 2020 · 6 comments

Comments

@braun-steven
Copy link

braun-steven commented Jan 12, 2020

Description :octocat:

I'm trying to export my agenda-views via org-batch-store-agenda-views from the commandline. For this I'm running:

emacs -batch -l ~/.emacs.d/init.el --eval "(run-hooks 'emacs-startup-hook)" --eval '(org-batch-store-agenda-views)'

Which outputs

...
Skipping check for new version (reason: dotfile)
Wrong type argument: hash-table-p, nil
Warning (emacs): recentf mode: Wrong type argument: hash-table-p, nil
Error in kill-emacs-hook (ido-kill-emacs-hook): (wrong-type-argument hash-table-p nil)

and exits.

Running org-store-agenda-views (non-batch version) from within emacs GUI works without any issue.

Reproduction guide 🪲

Run

emacs -batch -l ~/.emacs.d/init.el --eval "(run-hooks 'emacs-startup-hook)" --eval '(org-batch-store-agenda-views)'

Observed behaviour: 👀 💔
Output:

...
Warning (emacs): recentf mode: Wrong type argument: hash-table-p, nil
Error in kill-emacs-hook (ido-kill-emacs-hook): (wrong-type-argument hash-table-p nil)

Expected behaviour: ❤️ 😄

  • Emacs shouldn't error out and produce the agenda export file

System Info 💻

  • OS: gnu/linux
  • Emacs: 28.0.50
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. d4a27ba)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(javascript vimscript html csv helm
            (auto-completion :variables spacemacs-default-company-backends
                             '(company-files company-capf)
                             auto-completion-enable-snippets-in-popup t auto-completion-enable-help-tooltip t auto-completion-enable-sort-by-usage t)
            emacs-lisp git markdown org
            (shell :variables shell-default-term-shell "/bin/zsh" multi-term-program "/bin/zsh" shell-default-height 30 shell-default-position 'bottom shell-scripts-backend 'lsp)
            (spell-checking :variables enable-flyspell-auto-completion nil spell-checking-enable-auto-dictionary t spell-checking-enable-by-default nil)
            syntax-checking
            (version-control :variables version-control-diff-tool 'diff-hl version-control-global-margin t)
            themes-megapack
            (python :variables python-backend 'lsp python-lsp-server 'mspyls)
            (gtags :variables gtags-enable-by-default t)
            (latex :variables latex-enable-auto-fill t)
            pdf
            (c-c++ :variables =c-c++-backend= 'lsp-clangd)
            gpu prolog deft)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP

Backtrace 🐾


@smile13241324 smile13241324 self-assigned this Mar 28, 2020
@smile13241324
Copy link
Collaborator

Hmm using spacemacs as a batch is something I haven't seen in a looooonnnnnggggg time.
I will have a look.

@smile13241324
Copy link
Collaborator

Sorry to say but I have no clue why this is not working maybe someone from the community is more familiar with the emacs batch use-case and can help here.

@smile13241324 smile13241324 removed their assignment Jul 3, 2020
@JAremko
Copy link
Collaborator

JAremko commented Jul 3, 2020

You can try cleaning up the kill-emacs-hook variable.

@JAremko
Copy link
Collaborator

JAremko commented Jul 3, 2020

The problem, most likely, is that the ido-kill-emacs-hook thingy tries to interact with a user and fails in a strange way 🤔

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Aug 24, 2021
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Aug 24, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Sep 10, 2022
@lebensterben lebensterben removed the stale marked as a stale issue/pr (usually by a bot) label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants