-
Notifications
You must be signed in to change notification settings - Fork 339
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
Use emacs --batch
mode in agda-mode
setup
#5901
Comments
The relevant code snippet is this: Lines 163 to 177 in 257a324
Documentation of emacs --batch here: https://www.emacswiki.org/emacs/BatchMode
|
@catern, how does this work? $ emacs --batch --eval "(expand-file-name user-init-file)"
Wrong type argument: stringp, nil Maybe emacs in batch mode does not know about $ emacs --batch --eval="(print user-init-file)"
nil So, I suppose this does not work... Closing... |
Ah, that's true. If you pass
prints |
On my system, this prints extra garbage:
However, what currently is done in
|
Hm, that's weird, but it's definitely something that it's important to be tolerant of - a user's init file could do anything, including printing random stuff to standard-output. So I guess sticking with the temp-file is best. It's still good to switch to |
I switch to Please test! |
The new code triggers a warning for me:
My current An alternative might be to ensure that Emacs is run inside a terminal, but I don't know how to do that in a platform-independent way. |
@nad reports errors with --no-site-file for agda-mode setup.
Well, I think it did: https://github.com/agda/agda/pull/5908/files#r881547737 But we can of course load the site file. Please test again: |
I manually ran code similar to what is in your pull request, and that seems to have worked. |
@nad reports errors with --no-site-file for agda-mode setup.
…acs leg. WIP [ Makefile ] goal continue-cubical-test; update cubical submodule Fix typo in CHANGELOG (agda#5905) [ workflows ] fix stack/Win (ICU again) (agda#5909) Stack was updated to MSYS2 2022-05-03 upstream. This solved the keyring problem, but we need to reset the cache. Provenance of where modules in Internal syntax. Qualify some prelude functions in .ghci Running stack repl failed due to these functions not being in scope [ debug ] bump some verbosity levels Fix agda#5901: use --batch when installing agda-mode for emacs [ doc ] User-manual: installation: add agda to apt-get install Replaces PR agda#5896 by @RosieBaish, thanks for the contribution. User-manual: small improvements to section on `postulate` (agda#5916) * [ doc ] User-manual: trick how to postulate sth in an expression * [ doc ] remove silly `let open POSTULATE` trick again [ cubical ] cosmetics: generalize iApplyVars [ cosmetics ] turn absV (local def) into global def [ cosmetics ] rewrite some TelView functions Fixed agda#5920. Re agda#5924: add LANGUAGE TypeOperators to pacify GHC 9.4 Re agda#5901: setup agda-mode: don't --no-site-file with --user @nad reports errors with --no-site-file for agda-mode setup. [ user-manual ] +example repeat for Streams, link copatterns->coinduction Finish @RemcoSchrijver's PR agda#5918 [ re agda#5923 ] Don't apply rewrite rule instead of generating dummy terms when variables are not bound after matching whitespacefix wip wip wip
emacs --batch
mode in agda-mode
setup
agda-mode setup should just run "emacs --batch" and have Emacs write the results of the query to stdout, instead of using a temporary file. Besides greatly simplifying the current askEmacs function, it would also work properly when running "agda-mode setup" without a terminal, which currently doesn't work.
(I would just make this patch myself but I can't figure out how to get agda building inside a Nix development shell)
The text was updated successfully, but these errors were encountered: