{"id":13338367,"url":"https://github.com/MooersLab/emacs30ubuntu22","last_synced_at":"2025-03-11T09:30:56.669Z","repository":{"id":65742345,"uuid":"598681780","full_name":"MooersLab/emacs30ubuntu22","owner":"MooersLab","description":"Protocol to install emacs30 on ubuntu 22.04 LTS with tree-sitter support.","archived":false,"fork":false,"pushed_at":"2025-01-04T13:29:36.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T06:11:34.736Z","etag":null,"topics":["combobulate","compile","emacs","profile","tree-sitter","ubuntu"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MooersLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2023-02-07T15:51:33.000Z","updated_at":"2025-01-04T13:29:39.000Z","dependencies_parsed_at":"2024-10-23T19:29:13.740Z","dependency_job_id":"8131f351-7935-4ae8-b8ca-9cfd640382cc","html_url":"https://github.com/MooersLab/emacs30ubuntu22","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Femacs30ubuntu22","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Femacs30ubuntu22/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Femacs30ubuntu22/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MooersLab%2Femacs30ubuntu22/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MooersLab","download_url":"https://codeload.github.com/MooersLab/emacs30ubuntu22/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243007029,"owners_count":20220761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["combobulate","compile","emacs","profile","tree-sitter","ubuntu"],"created_at":"2024-07-29T19:16:18.226Z","updated_at":"2025-03-11T09:30:56.659Z","avatar_url":"https://github.com/MooersLab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![Version](https://img.shields.io/static/v1?label=emacs30ubuntu22\u0026message=0.2\u0026color=brightcolor)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n\n# Compiling Emacs 30.0.5 on Ubuntu 22.04 LTS with tree-sitter support\n\n## Quick start with emacs 29.4 in two lines of commands\n\nIf you want treesitter installed in emacs29.4, I recommend the following procedure if you have snap enabled on Ubuntu.\nYou will obtain a binary of Emacs that has treesitter plus many other C programs included.\n\n```bash\nsudo snap install emacs --classic\n# This installs emacs 29.4 from Alex Murray.\n# ~/e29fewpackages is where I install my init.el file.\nemacs --init-directory ~/e29fewpackages --debug-init\n```\nThis worked in Ubuntu 24.04 on January 3rd, 2025.\n\n\n## Original post\nBy building Emacs29 and greater with tree-sitter, you can use the package combobulate to use the concrete syntax tree to perform vastly more efficient edits of code.\nYou will need this capability to fix all of the wrong code returned by ChatGPT.\n\nTree-sitter is a C-library that must be installed before compiling Emacs from source code.\nPlease note that as of early February 2023, emacs-plus@29 in home brew does not ship with support for tree-sitter, nor does the latest version downloaded from Emacs on Mac OSX.\n\nI was trying to install Emacs 29.0.5, but as of Monday, February 6, 2023, the emacs29 branch of the git repo was loaded with Emacs 30.0.5. This error should be fixed soon, but the user should be aware.\n\nI did this installation in a fresh virtual machine using VirtualBox VM.\nI tried to install from the iso file on an external harddrive, but my account failed to land in the sudouser list.\nI was unable to use `sudo` to install software.\nTo fix this problem, I repeated the virtual machine creation with the iso file on a USB flash drive.\n\nI followed the instructions [here](https://www.techrepublic.com/article/how-to-enable-copy-and-paste-in-virtualbox/) to enable the copying and pasting of commands between the host and guest operating systems.\n\n```bash\nsudo apt update\nsudo apt upgrade\nsudo apt-get install build-essential\nsudo apt-get install libgtk-3-dev libtiff5-dev libgif-dev libjpeg-dev libpng-dev libxpm-dev libncurses-dev libtiff-dev\nsudo apt-get install texinfo gnutls-dev imagemagick\nsudo apt-get -y install libtree-sitter-dev\nsudo apt install git\nsudo apt install sqlite3\nsudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev\nsudo apt install libc6-dev libjpeg62-dev libpng-dev xaw3dg-dev zlib1g-dev libice-dev libsm-dev libx11-dev libxext-dev\nsudo apt install libxi-dev libxmu-dev libxmuu-dev libxrandr-dev libxt-dev libxtst-dev libxv-dev\nsudo apt install libattr1-dev\nsudo apt install autoconf\nmkdir software\ncd software\ngit clone git://git.sv.gnu.org/emacs emacs30\ncd emacs30\ngit checkout -b emacs29\n./autogen.sh\nmkdir build\ncd build\n../configure --with-gnutls=ifavailable --with-cairo --with-tree-sitter --program-suffix=30\nmake -j 4\nsudo make -j 4 install\n```\n\n## Check for support for tree-sitter\n\nNow enter `emacs30` to fire up the GUI and enter `C-h v`, and then enter the variable `system-configuration-features.`\nYou should have the following returned. Note TREE_SITTER before X11:\n\n```bash\n\"CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB\"\n```\n\n## Install texlive\nI then installed `texlive` to support using latex and org-mode in Emacs.\n\n```bash\nsudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-recommended-doc texlive-science texlive-science-doc \nsudo apt install texlive-fonts-recommended texlive-fonts-recommended-doc texlive-luatex texlive-xetex\n```\n\n## Make alias to emacs30\n\nNow, make a profile for emacs30 by storing it in the directory \"~/latex-emacs30\".\nI am taking advantage of the `--init-directory` flag available since version 29.\n\n```bash\ncd\nmkdir latex-emacs30\ntouch .bashAliases\nemacs30 .bashAliases # add the following line\nalias e30ld='/usr/local/bin/emacs30 --init-directory ~/latex-emacs30 --debug-init' \nC-x C-s\nC-x C-c\nemacs30 .bashrc # add the following line\nsource ~/.bashAliases\nC-x C-s\nC-x C-c\nsource .bashrc # now enter the alias to fire Emacs\ne30ld\n```\n\n## Notes\n\n- I tried to compile with \"--with-imagemagick\" but the required libraries were not found.\n\n|Version       |Changes                                                                                               |Date                  |\n|:-------------|:-----------------------------------------------------------------------------------------------------|:--------------------:|\n| Version 0.2  | Added note about Emacs 29.4 from Alex Murray                      | 2024 January 3    |\n\n\n\n## Sources of funding\n\n- NIH: R01 CA242845\n- NIH: R01 AI088011\n- NIH: P30 CA225520 (PI: R. Mannel)\n- NIH: P20 GM103640 and P30 GM145423 (PI: A. West)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMooersLab%2Femacs30ubuntu22","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMooersLab%2Femacs30ubuntu22","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMooersLab%2Femacs30ubuntu22/lists"}