{"id":13861638,"url":"https://github.com/tpapp/julia-repl","last_synced_at":"2026-01-27T11:02:45.507Z","repository":{"id":12367990,"uuid":"71717582","full_name":"tpapp/julia-repl","owner":"tpapp","description":"Run an inferior Julia REPL in a terminal inside Emacs","archived":false,"fork":false,"pushed_at":"2025-07-19T14:49:23.000Z","size":437,"stargazers_count":184,"open_issues_count":26,"forks_count":35,"subscribers_count":7,"default_branch":"master","last_synced_at":"2026-01-20T20:04:57.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-10-23T17:15:11.000Z","updated_at":"2026-01-07T22:24:24.000Z","dependencies_parsed_at":"2023-01-16T20:46:53.203Z","dependency_job_id":"1a0bfab6-7e77-467b-9acd-06bf796de692","html_url":"https://github.com/tpapp/julia-repl","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tpapp/julia-repl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpapp%2Fjulia-repl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpapp%2Fjulia-repl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpapp%2Fjulia-repl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpapp%2Fjulia-repl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpapp","download_url":"https://codeload.github.com/tpapp/julia-repl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpapp%2Fjulia-repl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T06:01:26.861Z","updated_at":"2026-01-27T11:02:45.487Z","avatar_url":"https://github.com/tpapp.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# julia-repl: run an inferior Julia REPL in Emacs\n\n[![MELPA](https://melpa.org/packages/julia-repl-badge.svg)](https://melpa.org/#/julia-repl)\n[![build](https://github.com/tpapp/julia-repl/workflows/check/badge.svg)](https://github.com/tpapp/julia-repl/actions?query=workflow%3Acheck)\n\nThis is a minor mode for interacting with a Julia REPL running inside Emacs. The `julia` process is started in an ANSI terminal (`term`), which allows text formatting and colors, and interaction with the help system and the debugger.\n\nIt is recommended that you use this minor mode with [julia-mode](https://github.com/JuliaEditorSupport/julia-emacs).\n\n\u003cimg src=\"./screenshot.png\" width=\"70%\" alt=\"screenshot\"\u003e\n\n## Installation and loading\n\n**Please make sure you have at least Emacs 27.1**, as the package does not support earlier versions.\n\nPlace this in your **Emacs initialization files** (eg `.emacs`):\n```emacs-lisp\n(add-to-list 'load-path path-to-julia-repl)\n(require 'julia-repl)\n(add-hook 'julia-mode-hook 'julia-repl-mode) ;; always use minor mode\n```\nIf you want to use a Julia executable other than `julia` in your path, see [below](#julia-executables).\n\nIf you are experiencing problems with [Unicode characters](https://docs.julialang.org/en/v1/manual/unicode-input/) in the Julia REPL, try setting the relevant coding/language environment, eg\n```emacs-lisp\n(set-language-environment \"UTF-8\")\n```\n\n## Usage\n\n`M-x julia-repl`, or `C-c C-z` from a buffer in which the `julia-repl` minor mode is active starts a new inferior Julia process. The keys below can be used to interact with this process.\n\n| key           | action                                                      |\n|---------------|-------------------------------------------------------------|\n| `C-c C-a`     | activate if there is a `Project.toml` in parent directories |\n| `C-u C-c C-a` | activate home project                                       |\n| `C-c C-b`     | send whole buffer to REPL (using include)                   |\n| `C-u C-c C-b` | send whole buffer to REPL (directly)                        |\n| `C-c C-c`     | send region (when applicable) or line to REPL               |\n| `C-c C-d`     | invoke `@doc` on symbol                                     |\n| `C-c C-e`     | invoke `@edit` on region (when applicable) or line          |\n| `C-c C-l`     | list methods of a function                                  |\n| `C-c C-m`     | expand macro                                                |\n| `C-c C-p`     | change directory to that of the buffer                      |\n| `C-c C-s`     | prompt for buffer name suffix                               |\n| `C-c C-t`     | send whole buffer to REPL (using Revise.includet)           |\n| `C-c C-v`     | prompt for Julia executable                                 |\n| `C-c C-z`     | raise the REPL or create a new one (or switch back from REPL – only in `vterm` backend) |\n| `C-RET`       | send line to REPL (without bracketed paste)                 |\n\nAll actions that send something to the REPL terminate with a **newline**, triggering evaluation. If you want to avoid sending a newline (eg maybe because you want to edit an expression), use prefix arguments (`C--` or `C-u`, currently both have the same effect). This of course does not apply to `C-c C-b`.\n\nAll commands send code using [bracketed paste](https://cirw.in/blog/bracketed-paste). When Julia is waiting for input, control characters like `^[[200~` may show up in your buffer, this is innocuous. If you input takes a long time to evaluate, you can step through it line-by-line with `C-RET`.\n\nOptions for this package are exposed via the customize interface (`M-x customize-group julia`).\n\n## Environment variables\n\nYou can set environment variables directly from your `init.el` in Emacs, eg\n\n```emacs-lisp\n(setenv \"JULIA_NUM_THREADS\" \"4\")\n```\n\n## Buffer-local inferior REPL and Julia executable\n\nThe minor mode allows the user to select a particular Julia executable and optionally a different inferior buffer for each source code buffer. This allows running two versions (eg stable and master) of Julia simultaneously, and/or running multiple inferior REPLs of the same Julia version. A typical use case is trying out something quickly, without changing the state of the current process.\n\n### Julia executables\n\nSet `julia-repl-executable-records` to a list of keys and executables. For example,\n```elisp\n(setq julia-repl-executable-records\n      '((default \"julia\")                  ; in the executable path\n        (master \"~/src/julia-git/julia\"))) ; compiled from the repository\n```\nprovides two executables. The first entry is always the default (it can have any other key).\n\nUse `C-c C-v` to select one of these (`julia-repl-prompt-executable`). You can also set the value of `julia-repl-executable-key` directly to a key in the `julia-repl-executable-records`, eg using [file variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html), but make sure you select a correct value.\n\nThe name of the inferior buffer will reflect your choice: the default is `*julia*` (indicator omitted), while the `master` executable would map to `*julia-master*`, and so on.\n\n### Executable suffix\n\nYou can also set a *suffix* for the inferior buffer, if you want multiple ones in parallel. This can be a number, which will show up as `\u003cnumber\u003e`, or a symbol, which appears as `-symbol`.\n\nIt is recommended that you use `C-c C-s` (`julia-repl-prompt-inferior-buffer-name-suffix`), which prompts for a string by default. Prefix arguments modify it like this:\n\n- numerical prefixes select that integer: eg `C-3 C-c C-s` set the suffix to `3`.\n\n- the negative prefix picks the next unused integer: eg `C- C-c C-s` sets the suffix to `4` if `1`, `2`, `3` are in use.\n\n### Switches\n\nSwitches to the `julia` process can be provided in the global variable `julia-repl-switches`, for example\n\n```elisp\n(setq julia-repl-switches \"-p 4\")\n```\nThe function `julia-repl-prompt-switches` will prompt for new switches, you  can bind it to a key.\n\n### File local variables\n\nIf you are using the same settings for a specific file, consider using [file variables](https://www.gnu.org/software/emacs/manual/html_node/emacs/Specifying-File-Variables.html). For example, if you use `add-file-local-variable` to create a block at the end of the Julia source file similar to\n\n```julia\n# Local Variables:\n# julia-repl-executable-key: master\n# julia-repl-inferior-buffer-name-suffix: tests\n# julia-repl-switches: \"-p 4\"\n# End:\n```\n\nthen the next time you open a REPL, it will have the name `*julia-master-tests*`, and 4 worker processes.\n\n## Terminal backends\n\n`julia-repl` can use the terminal in different ways.\n\nThe default is `ansi-term`, which is included in Emacs, but it is recommended that you use [`vterm` via `emacs-libvterm`](https://github.com/akermu/emacs-libvterm) (it is not the default since you need to install an extra package and the binary).\n\nYou can also use [`eat`](https://codeberg.org/akib/emacs-eat/) as a backend.\n\n**Note to Windows users**: you may not be able to use `eat` and/or `vterm` directly from native Windows Emacs, but there have been reports of people using them successfully from WSL (Windows Subsistem for Linux) 2. Please understand that supporting those terminal emulators is outside the scope of this package; `julia-repl` merely provides bindings for them conditional on availability on your system.\n\n### Some hints on interacting with `term`\n\nNote some keybindings for `term`:\n\n1. `C-x C-j` switches to *line mode*, where you can kill/yank, move around the buffer, use standard Emacs keybindings,\n2. `C-c C-k` switches back to *char mode*,\n3. for scrolling, use `S-\u003cprior\u003e` and `S-\u003cnext\u003e`.\n\nSee the help of `term` for more.\n\n### Using `vterm`\n\n`vterm` is now the recommended backend, but for now you have to enable it explicitly because dependencies need to be available. In the long run it is hoped that it will replace `ansi-term` as the default backend for this package, fixing many outstanding issues.\n\n1. Install [`emacs-libvterm`](https://github.com/akermu/emacs-libvterm) and make sure you have a working installation (eg `M-x vterm`) should start a terminal\n\n2. Evaluate `(julia-repl-set-terminal-backend 'vterm)` in your config file *after* you load `julia-repl`, but *before* you use it (and of course `vterm` should be loaded at some point). Switching terminal backends with already running Julia processes is not supported.\n\n3. You may want to `(setq vterm-kill-buffer-on-exit nil)` to prevent the buffers associated with terminated Julia processes being killed automatically. This allows you to retain output and see error messages if the process does not start.\n\n4. You can also install [EmacsVterm.jl](https://github.com/wentasah/EmacsVterm.jl) package, which improves integration between Julia REPL and Emacs.\n\n#### Using `eat`\n\nInstall [`eat`](https://codeberg.org/akib/emacs-eat/) and use `(julia-repl-set-terminal-backend 'eat)` in your config file.\n\n## Using the @edit macro\n\nThe `@edit` macro can be called with `C-c C-e` when the `julia-repl-mode` minor mode is enabled. The behavior depends on the value of the `JULIA_EDITOR` envoronment variable in the Julia session. The command `julia-repl-set-julia-editor` is provided to conveniently control this from emacs.\n\nTo use \"emacsclient\" as a default in each Julia REPL you open in emacs, add the following code to your `~/.julia/config/startup.jl`:\n\n```julia\nif haskey(ENV, \"INSIDE_EMACS\")\n    ENV[\"JULIA_EDITOR\"] = \"emacsclient\"\nend\n```\n\nIf you cannot edit your `startup.jl`, you can configure the editor in each repl after starting it with:\n\n```elisp\n(add-hook 'julia-repl-hook #'julia-repl-use-emacsclient)\n```\n\n## More colors\n\nJulia uses more colors than the ones supported by `term` by default. To get the full range of colors, use [eterm-256color](https://github.com/dieggsy/eterm-256color), available from MELPA.\n\n## Note for Windows users\n\n`ansi-term` is **not supported** on some (most?) Windows versions of Emacs. It has been confirmed to work with Emacs running in Cygwin. You can test whether your version works with `M-x ansi-term`; if this errors then this package will **not** work for you.\n\nCygwin may require some rewriting of paths for `include` to work. After loading this package, customize the rewrite rules as\n```emacs-lisp\n(setq julia-repl-path-rewrite-rules julia-repl-cygwin-path-rewrite-rules)\n```\nas a reasonable default, or write custom rules for `julia-repl-path-rewrites`.\n\n## Clickable error locations\n\nError locations in the inferior buffer should be clickable, implemented with `compilation-shell-minor-mode`.\n\nThe error printing syntax changed over time, and legacy forms are not included, they are not needed if you are using Julia 1.6 or later. To get them back, use\n```emacs-lisp\n(setq julia-repl-compilation-location-legacy t)\n```\nIf you find that a Julia error (warning, info, etc) message location is not clickable in Emacs, please open an issue.\n\n## Limitations\n\nSee the [issues](https://github.com/tpapp/julia-repl/issues).\n\n## Comparison to ESS\n\nA well-known alternative is [ESS](https://ess.r-project.org/), which also supports Julia. ESS is however based on `comint`, which does not allow a fully functioning terminal and therefore does not support the Julia REPL modes (shell, Pkg, debuggers...) and features. `julia-repl` is instead based on `term`, and so gets all the features from Julia's native REPL for free.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpapp%2Fjulia-repl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpapp%2Fjulia-repl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpapp%2Fjulia-repl/lists"}