{"id":17032456,"url":"https://github.com/gagbo/xile","last_synced_at":"2026-01-27T20:40:43.925Z","repository":{"id":53796069,"uuid":"241222672","full_name":"gagbo/xile","owner":"gagbo","description":"A toy front-end to xi-editor written in Guile Scheme","archived":false,"fork":false,"pushed_at":"2022-10-04T17:37:16.000Z","size":498,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T19:38:06.552Z","etag":null,"topics":["front-end","guile","ncurses","xi-editor"],"latest_commit_sha":null,"homepage":"","language":"Scheme","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/gagbo.png","metadata":{"files":{"readme":"README.org","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}},"created_at":"2020-02-17T22:39:08.000Z","updated_at":"2024-04-23T07:43:04.000Z","dependencies_parsed_at":"2023-01-19T03:16:22.831Z","dependency_job_id":null,"html_url":"https://github.com/gagbo/xile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gagbo/xile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagbo%2Fxile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagbo%2Fxile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagbo%2Fxile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagbo%2Fxile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gagbo","download_url":"https://codeload.github.com/gagbo/xile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagbo%2Fxile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28821753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:44:20.126Z","status":"ssl_error","status_checked_at":"2026-01-27T18:44:09.161Z","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":["front-end","guile","ncurses","xi-editor"],"created_at":"2024-10-14T08:28:34.922Z","updated_at":"2026-01-27T20:40:43.909Z","avatar_url":"https://github.com/gagbo.png","language":"Scheme","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+TITLE: [WIP] Xile : Xi + Guile\n\nLet's find out if Guile goes with everything ; and make a front-end for Xi\nEditor using GNU Guile and libraries.\n\n* Table of Contents :TOC_3:noexport:\n- [[#quickstart][Quickstart]]\n  - [[#compile-xi-editor][Compile Xi editor]]\n  - [[#start][Start]]\n    - [[#sdl2][SDL2]]\n    - [[#curses][Curses]]\n  - [[#test-script][Test script]]\n  - [[#logs][Logs]]\n  - [[#stop][Stop]]\n- [[#dependencies][Dependencies]]\n- [[#roadmap][Roadmap]]\n- [[#objectives][Objectives]]\n\n* Quickstart\n\n** Compile Xi editor\nUpdate the submodule and =cargo build --release= the bundled [[https://github.com/xi-editor/xi-editor][Xi editor]]\n\n** Start\nBy default it will load a user config located in this repo in =config/xile.scm=.\nIt's hardcoded for now but hopefully will be configurable later.\n\n*** Dependencies\n\nAll dependencies are managed with guix shell, you can setup direnv to work properly with\n```bash\neval $(guix shell -Df guix.scm --search-paths)\npath_add GUILE_LOAD_PATH src\n```\n\n*** SDL2\n#+BEGIN_SRC bash\n./examples/sdl.scm\n#+END_SRC\n\n*** Curses\n#+BEGIN_SRC bash\n./examples/curses.scm\n#+END_SRC\n\n** Test script\nFor the time being we are just opening this README file to see how it's\ndisplayed.\n\nYou can :\n- switch to insert state using =i=\n- Insert letters at this point\n- use =[ESC]= to switch back to normal state\n\nThere is no visual indicator for the current state, and it's possible not all\nletters are supported in insert state. The list can be found looking at how many\nkeys are bound to some sort of =self-insert-*= function in [[./xile/editor-states.scm][Editor States]] module\n(in the =insert-state-keymap= variable probably).\n\n** Logs\nAll the logs are located in the [[./logs][logs]] folder after the run :\n- xi-core.log :: hold the logs from Xi editor process\n- xile-listen-{out,err}.log :: hold the logs from xile functions regarding\n  callbacks and Xi message parsing\n- xile-{out,err}.log :: hold the logs from xile functions outside message\n  callbacks\n\n** Stop\nHit =q= _in normal state_ to stop Xile (it may error out, but you're still out,\nright ?). In SDL you can also send a quit-event.\n\n\n\n* Roadmap\n- [X] Display buffer ::\n- [X] Scroll window ::\n- [X] Move cursor ::\n- [X] User config as scheme ::\n- [X] Xile state (buffer local and session-global variables) ::\n- [X] Implement the [[https://xi-editor.io/docs/frontend-protocol.html][complete protocol]] :: That is\n  1) front -\u003e back serializing, and\n  2) back -\u003e front parsing + callbacks\nCurrently only the ={find,replace}_status= notifications and the =show_hover=\nresponse message are missing. For the notifications, we will see when we want to\nsupport it. For the Show Hover message, this needs to be implemented at the\nbuffer level ; since the buffer will attach the correct id at runtime and\nregister the correct callback.\n- [X] Keymaps :: holding keymaps to ease the event-loop code is also necessary\n  to have multiple editor states\n- [ ] Editor states (normal and insert at least) ::\n  \"Normal\" state has been 'done' (it exists, and is the default). Now 1 more\n  state is needed :\n   1) Insert state where every letter is bound to some =self-insert= method in\n      the buffer\n- [ ] Proper header/footer :: I want to decouple buffer from its curses window, and\n  have the curses-window module actually handle all of header, footer, and main\n  window together\n  - Decoupling is done, so now each \"xile {sdl,curses} window\" can implement\n    their own methods and callback handling to draw headers/footers as they want\n  - Management of header/footer is now missing in SDL application\n- [ ] Scheme evaluator :: on =:= in a vim-like manner, I want to wrap evaluating\n  a user-input string. This probably means a new mode to handle this, using the\n  =eval-string= method of Guile or something.\n  *The Footer handling is a\n  prerequisite*, as the input should be checkable by the user.\n- [ ] Edit file ::\n  Set the pristing flag correctly and be able to insert characters. *The insert\n  state is a prerequisite*, since, well, insert bindings are only going to live\n  there\n- [ ] Syntax Highlighting :: (using xi-core bundled syntect)\n\n* Objectives\n\n- Learn about using a lisp in a complex project\n- Play with ncurses interfaces\n- Play with SDL2 a little bit (Postponed until I can get a proper ncurses interface)\n- See how difficult it is to build software with a json interface to a provider\n  (here we are using [[https://github.com/xi-editor/xi-editor][Xi Editor]] as the core text editor).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagbo%2Fxile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgagbo%2Fxile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagbo%2Fxile/lists"}