34 ms·
Ask HN: If you were rewriting Emacs from scratch, what would you do differently?
Don't get me wrong, I'm not planning on creating an Emacs killer, nor suggest anyone do that. But, hypothetically, what are some fundamental pitfalls of this foundational application?
- nickd2001 2y agoAdd in a shortcut of : then q to quit ? ;)
- iLemming 2y agoEvil does that already and more. There are ex-commands that don't exists in Vim and you can even extend and add your own.
- intellectronica 2y agoScheme instead of ELISP. Concurrency (Async IO would do).
- sva_ 2y agoNot using Lisp would be helpful
- volemo 2y agoActually, I love Emacs for its Lisp! Yes, Emacs Lisp is not the best Lisp out there, however, IMHO, it's miles ahead of VimScript. If I were really to rewrite Emacs, I'd use some modern Scheme.
- samatman 2y agoFennel is a better Lisp than elisp. Neovim is extensible, and to a large degree written in, Lua, which the target language of Fennel. Most developers do not like writing Lisp. That's just a fact, slamming the downvote button won't change it. I am not among those developers, I like writing Lisp, but most, flatly put, do not. So by choosing Scheme you are competing with a remarkable number of little-used editors which can be extended in Scheme or Common Lisp, as well as Emacs, far and away the top dog in the extensible-in-Lisp-editor niche. Neovim has achieved the best of both worlds, because it can be extended in a rather nice Lisp, and also in Lua, which, while some find the quirks of the language annoying, is at least Algolic in structure, matching the mode of thinking and writing used by the vast majority of devs.
- iLemming 2y ago> Neovim has achieved the best of both worlds No it has not. Fennel doesn't have the same level of integration into Neovim, like Elisp has in Emacs. Emacs is essentially a Lisp interpreter with a text editor built on top of it. This tight coupling allows Elisp to interact with and modify every aspect of Emacs, providing a level of customization and extensibility that is difficult to replicate with external languages. While Neovim's approach with Lua and Fennel is commendable, it is unlikely that these languages will achieve the same level of seamless integration as Elisp within Emacs.
- iLemming 2y agoThen it wouldn't be Emacs. You're thinking of whatever, it could be a real nice picture in you head, whatever that you're thinking of, is not Emacs. Something like Emacs is not possible without Lisp.
- nabla9 2y ago- Use Common Lisp instead of Emacs Lisp. - Design a more modular architecture to make it easier to extend and maintain different components. - Design a more robust plugin system for development and distribution of extensions. - Implement better sandboxing and security measures for extensions. - Better APIs for extension developers. - better multi-threading support baked into the editor.
- shprd 2y ago> Use Common Lisp instead of Emacs Lisp. Interesting, why not a scheme? Is it because the popularity in the industry? I don't know much about Emacs or lisps and looking to understand better
- nabla9 2y agoScheme is smaller, has more static and less interactive philosophy. CL has most things you need straight out of the box. It's more like operating system than programming language. Exactly what Emacs wants to be.
- aidenn0 2y agoelisp is more like CL than it is like Scheme; RMS was aware of CL when he was working on emacs, but was suspicious of some of its new features (like lexical binding).
- anthk 2y agoEmacs' Elisp it's pretty close to Common Lisp, any CL user can learn Elisp in days (and the opposite it's true too). There's even a port of PAIP exercises into Elisp: https://github.com/yfuna/paip-el https://github.com/yfuna/paip-el
- az09mugen 2y agoFor the Common Lisp part, someone created lem [0], but for the other points I can't tell. I know there is an extension manager being developped, but am not able to judge the robustness. Also that there isn't org-mode. [0] : https://github.com/lem-project/lem https://github.com/lem-project/lem
- hollerith 2y agoSupport prettier typography (if the user is not interacting with Emacs through a terminal, in which case of course the typography is up to the terminal-emulation app). If text in Emacs looked as pretty as text on the web does, it would be less of a struggle for me to stay focused on the Emacs text. (Text on the web was already much above average in pleasantness to look at and to read in the 1990s.) Get rid of any keybinding or UI convention that is there because that is the way they did it the AI Lab in 1967. Make the UI as familiar to the average computer user as possible (but keep the general design of a large rectangle of text) by using mainstream conventions (which come mainly from the Mac and Windows) for how to respond to this or that keypress or to clicking or dragging with this or that mouse button. Inside Emacs is a cross-platform toolkit (where the platforms are MacOS, other Unix derivatives, Windows and the terminal) I would split Emacs into 2 projects: a toolkit and an app that uses the toolkit. That way, if someone wants to create an "standalone" org-mode app, Magit app or Gemini browser designed to appeal to people who do not want to spend any time learning to use Emacs the app or "Emacs the generalized interface to information", they have a straightforward way to do so. (These "standalone" apps that are as easy to learn as any other GUI app will I hope help popularize the Emacs ecosystem.) One thing I definitely would not change is I would not make Emacs dependent on or closely integrated with a browser engine.
- tazjin 2y ago> If text in Emacs looked as pretty as text on the web does Do you have an example of this? I can't tell any difference for the fonts that I use (with emacs-pgtk). I believe Emacs uses Harfbuzz (same as Chrom{e|ium}).
- abdullahkhalids 2y agoI have never figured out how to get a good font and rendering going for text in Urdu/arabic script.
- hollerith 2y agoIs vscode better at Urdu/arabic?
- bitwize 2y agoBuild it on top of Guile.
- susam 2y agoInstead of using ctrl and meta modifiers, use a leader key like escape or semicolon or comma or some such thing as the prefix key for key bindings. In fact, this desire for leader-key-based, non-modal text editing led me to write devil-mode for Emacs: <https://susam.github.io/devil/ https://susam.github.io/devil/>.
- smokel 2y agoMake CapsLock an additional Ctrl. On many old keyboards that is where the Ctrl key was positioned [1]. [1] https://en.m.wikipedia.org/wiki/Caps_Lock#Placement https://en.m.wikipedia.org/wiki/Caps_Lock#Placement
- deleted 2y ago[deleted]
- susam 2y agoI know many people like to remap Caps Lock to function as Ctrl. However that setup does not quite work for me. There is only one Caps Lock key on the left side of the keyboard. I need Ctrl on both sides of the keyboard, so that I can use the left Ctrl key while typing Ctrl+P but the right one while typing Ctrl+A. There are other options as well, like remapping the Enter key to act as Ctrl when chorded or using sticky modifiers. I think using an ergonomic keyboard with two large Ctrl keys on both sides of the keyboard is probably the best solution. I've discussed some of these alternatives in more detail <https://susam.github.io/devil/#why https://susam.github.io/devil/#why>. By the way, there are some vendors that still make Unix layout keyboards with the Ctrl key positioned where Caps Lock key usually is: <https://deskthority.net/wiki/Category:Keyboards_with_Unix_layout https://deskthority.net/wiki/Category:Keyboards_with_Unix_la...>.
- tom_ 2y agoI just leave Ctrl where it is and press it with the knuckle of my little finger. I do it just like the guy in the pic on this page, pressing the control key with his little finger: http://xahlee.info/kbd/how_to_press_control_key.html http://xahlee.info/kbd/how_to_press_control_key.html - because that pic is of my hand. (Xah might not recommend doing this all the time, but I've been doing this for nearly 20 years now and I've had no problems.)
- otabdeveloper4 2y agoEmacs is fine, but buggy as hell. Their version of Lisp is clearly not suited for any large-scale development. (This trickles down hard into user experience, i.e., lack of parallelism or multithreading.)
- JadeNB 2y ago> Emacs is fine, but buggy as hell. Is this so obvious as to go without examples? I'm no Emacs power user, nor even really an Emacs user, but it certainly conflicts with my understanding of core Emacs.
- otabdeveloper4 2y agoI don't really know what a "core Emacs" is. It's all elisp scripts all the way down, and elisp is as brittle as bash for writing programs.
- keyle 2y agoEmacs is fine, but buggy as hell. That kind of took 180 turn on that one. Ship is fine, but leaks as hell.
- buescher 2y agoAs long as I can keep this ship, I will keep bailing.
- otabdeveloper4 2y agoBugs aren't that big a deal for users usually though. Also all ships leak, that's not a big deal either.
- peter-m80 2y agoNot using lisp
- m463 2y agowhy the downvotes? This is a reasonable point of view. I sometimes think using lisp for a language is a little like trying to implement comments within json data.
- iLemming 2y agoThe downvotes are because "this reasonable point of view" is also an ignorant one. Emacs just cannot be Emacs without Lisp. Emacs is a Lisp machine; it is tightly integrated with Lisp and needs Lisp to operate. Lisp is at its core principal model. There are a number of different types of applications that are significantly more difficult to achieve with a non-homoiconic language; check out Hyperfiddle/Electric, there are some videos with demos. Why do you think there were so many attempts to re-create something like Org-mode, yet none of them were hugely successful? For starters - the Lisp REPL has some significant differences; it just doesn't work the same way as a REPL in, e.g., Python. In Lisp, you can send any piece of code without any prelude or ceremony directly to the REPL. That REPL instance can even be on some remote computer, like a spacecraft millions of miles away (I'm not making up this shit, NASA did it at some point) Anyway, Emacs is Emacs because of Lisp, not because someone on a whim decided to use Lisp instead of, I dunno, Pascal. Trying to build Emacs on top of some non-Lispy language is futile. It won't be Emacs. Sure, it might be to a certain degree even better, but it won't be even "like Emacs".
- vincent-manis 2y agoIf I were rewriting Emacs, I would not replace its language with Python, Lua, or Cobol. I don't like those languages, and I have just as much right to say that as the people who don't like Lisp.
- iLemming 2y ago- Can you not put any veggies in the salad? - What? Okay, so fruits, berries? - No, no, no fruits either. - Hmm... what about croutons, nuts, maybe sunflower seeds? - No, just use meat. I like meat. Just make it with a bunch of meat pieces, alright? - Well, that is not a salad... > Not using lisp Don't you folks realize the imbecility of such statements? Emacs is a Lisp machine that allows writing and loading custom extensions based on Lisp! This level of extensibility and programmability is so deeply ingrained into Emacs, specifically because it revolves around Lisp. Emacs wouldn't be possible without Lisp.
- wwarner 2y agocreate an efficient async api for plugins. it’s kind of a kernel+apps situation. an extensible editor has to have a scripted plugin system, and they should be hosted by a core that is fast, can preempt plugins, and provides “ipc” btw plugins for advanced functionality.
- eointierney 2y agoThe core should be in rust, verfied in lean, and the runtime should be in guile. Literate programming in org-mode should be a hard requirement. Package management should require patch algebra. Macros should be submitted to a leaderboard in a blockchain and yield flair in EUDC. M-x measure-beard-length should require 10000 hours of logged usage and unlock the major mode infinity-categorization. Tongue-no-longer-in-cheek: I reckon the C core of Emacs is some of the most battle-hardened code out there. Verification, a-la SEL4, is probably irrelevant but still nice. Guile is modern and performant but Elisp is still its own little joy. Literate programming is always nice until it gets in the way. Straight is good enough for me now. Macros are always cool and a leaderboard would be fun, but patch algebra is really nice, see jujutsu nowadays. And beard length is gendered and so only partially admissable. Infinity categories are way out there and always good for a reference.
- denotational 2y agoOk, you had me for the first three sentences.
- neilv 2y agoImplemented mostly in Guile, with just some native primitives/kernel bits in Rust, makes a lot of sense, for a programmer's application platform in the spirit of Emacs.
- fsckboy 2y ago>beard length is gendered you insensitive clod https://www.gocomics.com/calvinandhobbes/1986/02/14 https://www.gocomics.com/calvinandhobbes/1986/02/14
- eointierney 2y agoYes
- sshine 2y ago> The core should be in rust, verfied in lean, and the runtime should be in guile. Literate programming in org-mode should be a hard requirement. Package management should require patch algebra. Since I agreed with all of these, I’ll add some more non-ironic, idealistic wishes: Plugins must be written in sandboxed WebAssembly so you can know what a plugin is capable of without reading the source code. The runtime must be portable so it can run in wasm32-wasi.
- sno129 2y agoWrite Vim instead. /s
- iLemming 2y agoEmacs can perfectly emulate Vim already and even do more than Neovim ever could.
- deleted 2y ago[deleted]
- dmitrygr 2y ago> If you were rewriting Emacs from scratch, what would you do differently? UI: Electron, of course. Json to represent the edit buffer in RAM. Each utf8 code point base64 encoded, in a json array, it itself, as a blob, base64 encoded. Now, before you complain that that is gonna blow up the data too much, don’t forget that 1. “Ram is cheap” and 2. “gzipped base64 is about the same size as binary”. So, of course, we’ll gzip the data in RAM. Plugins should be JavaScript, as should be self-evident. And you’ll need a few installations of python (both 2 and 3) and node.js (each in its own docker container, obviously) to glue it all together and provide reproduceability. With some care and work, it’ll run even on a modest machine taking up merely 60GB of disk, 32GB of RAM, a 4090ti GPU, and 8 CPU cores. Every key press should be passed through an LLM, to add some intelligence to the editor. The user will, of course, supply a ChatGPT api key when they register for their mandatory myNewEmacs.ai account that they’ll need to subscribe to the editor for only the cost of a few lattes a month. It is 2024, after all. One must use modern tools and technologies.
- aardvark179 2y agoThanks, I hate it.
- maxk42 2y agoPrefer Tauri to Electron. It is 2024, after all.
- iLemming 2y agoHeh... The obvious choice of course is Unreal Engine. It's almost 2025, after all.
- Crosseye_Jack 2y agoLGTM: Ship it!
- iLemming 2y agoAre you sarcastically describing VSCode, I don't get it?
- stormking 2y agoA modern display engine.
- federicotdn 2y agoI would change the development platform. Doing everything by mail makes things more difficult for people that are not used to the older mail+patch workflow. Having something like GitLab or sourcehut would be nice, as it would also bring a more modern bug tracker. Personally I find following email conversations much harder than just a single conversation thread like in a GitHub issue, for example.
- b112 2y agoAll sensible email clients have a 'thread view' for just this purpose, which effectively makes it a 'single conversation thread'.
- federicotdn 2y agoYes, the Gmail web client does this. However my (personal) problem comes more from reading the emacs-devel archives, where the thread view takes the shape of something more like a tree (maybe I'm not configuring something correctly). I was subscribed to emacs-devel at some point (which made reading easier) but it started filling up my account storage so I un-subscribed.
- iLemming 2y agoUse https://yhetil.org/emacs-devel https://yhetil.org/emacs-devel to browse the threads. If you use mu4e or notmuch and often delete some older emails locally, but still want to read the whole thread, you can write some elisp helpers that would find the thread on point (based on email-id) or even download the whole thread.
- mdaniel 2y agoI recently learned FSF does have a GL instance but it seems to be locked down to just "approved" emails and also only used for its CI capabilities: https://emba.gnu.org/emacs/emacs/-/pipelines https://emba.gnu.org/emacs/emacs/-/pipelines
- iLemming 2y agoI agree, and I've been observing this for years. It's now becoming a generational problem - younger programmers know and understand PR model, they don't want to deal with mailing threads and patches. These days, young people are like: "You sent me what? an email? Are you joking?" People shouldn't be catering for the comfort of the maintainers, no matter how arguably mailing threads are techologically more superior, it should be the opposite.
- dvh 2y agoDon't use lisp. Normal people don't like it, it looks weird. I wonder how many projects failed because they were lisp. Normal people: Visits a project page. Sees it's a lisp. Closes page.
- neilv 2y agoParentheses scare away anyone who shouts "bro!" and fist-bumps each other, before they can insist "the first thing Emacs needs is a package manager, to hide code as much as possible from casual users" (missing half the point of Emacs).
- shawn_w 2y agoEmacs has a package manager...
- neilv 2y agoAnd consequently a lot more friction to users becoming extenders.
- iLemming 2y ago"A friction" you say? You can run Emacs, open a scratch buffer and extend it right away. You don't even have to save the damn code, you can try it out immediately. Folks complaining about Emacs being hard without even trying to understand any Lisp, is on the same level of whining about how web-development is so much harder compared to building shit in Squarespace (or something), only because you can't figure out HTML, CSS and Javascript.
- neilv 2y agoCompare to when you'd go to use an add-on, and it would be one text file, right on your screen, and you would think: . o O ( hey, I get some of this, and I can just start tweaking it here... )
- zentr1c 2y ago>Get rid of any keybinding or UI convention that is there because that is the way they did it the AI Lab in 1967. Make the UI as familiar to the average computer user as possible (but keep the general design of a large rectangle of text) by using mainstream conventions (which come mainly from the Mac and Windows) for how to respond to this or that keypress or to clicking or dragging with this or that mouse button. This needs dedicated Prominenz
- varjag 2y agoAllow for user controllable window layout within the frame, objectively the editor's only significant drawback.
- floren 2y agogod yes please. "Will I get a new window? If so, where will it be?" If I could have Emacs with Acme-style window management, that'd be perfect
- signa11 2y agothis is emacs territory so we have infinite customization via the `display-buffer` primitive. see https://www.masteringemacs.org/article/demystifying-emacs-window-manager https://www.masteringemacs.org/article/demystifying-emacs-wi... for more information.
- floren 2y agoThanks for reminding me about this, I really need to dig into it and get some rules in place.
- signa11 2y agounfortunately i cannot edit the previous post anymore. another _excellent_ resource is this article/video from "mr protesilaos stavrou" : https://protesilaos.com/codelog/2024-02-08-emacs-window-rules-display-buffer-alist/ https://protesilaos.com/codelog/2024-02-08-emacs-window-rule... he goes by the moniker 'prot' and has tons of very very good emacs information (both on his website, and youtube). always worthwhile to check them out ! as someone would say, if you like that kind of thing, this the is kind of thing you will like :o)
- skydhash 2y agoAfter years of vim and windows parkour, I started using Emacs, and while the windows management was a bit irritating at first, I made my peace with it and use them in a more focused manner and rely more on the buffer list. I use register if I need a particular configuration. Vim feels like working on a moodboard while Emacs is more a study desk.
- dilap 2y agoBiggest issue w/ emacs is once you start adding packages everything is half-broken. Ideal emacs replacement would preserve the ease of extension and flexibility but have more of a static time verification systems (types and ...?) to prevent bugs (and bonus, make easier to achieve speed too).
- mark_l_watson 2y agoI have been occasionally been hassled by Emacs package management for forty years. A few years ago I very much shortened my .emacs file using the Straight package manager and I have been happier.
- the_clarence 2y agoI would probably just implement vscode but for the terminal. Emacs shortcuts already work by default in vscode for the most part.
- sshine 2y agoWhile Emacs is recognisable for its shortcuts, it is hardly a defining feature. Example: Doom Emacs adds Vim shortcuts, and it is still distinctly Emacs. I think of VSCode as “Emacs, but JavaScript instead of Elisp.” That’s one thing I would not choose, in spite of the good things VSCode brings to the table.
- School-Cotton 2y agoCan I hit one key combination to edit the JavaScript corresponding to any vscode command, debug it and possibly modify it however I want? If not, it’s not really comparable to emacs IMO.
- sshine 2y agoThat's a fair point. What I meant is that the runtime is arbitrarily extensible at runtime. But I don't assume that people actually do what you describe.
- skydhash 2y agoVSCode is notepad with plugins, built upon a web engine. Comparing it to Emacs is a huge disservice to Emacs.
- the_clarence 2y agoYou re kidding right.
- School-Cotton 2y agoNone of the main selling points of emacs have anything to do with its shortcuts or using it in the terminal. Plenty of emacs users (including me) rarely or never use it in the terminal. It’s a GUI editor just like vscode is. I think this misconception comes from the fact that (1) people often compare emacs and vim, and (2) vim is usually used in the terminal. But emacs and vim are really categorically different things so I think the “emacs vs. vim” meme kinda doesn’t make sense.
- azram 2y agoNothing
- I_complete_me 2y agoI too use vim.
- iLemming 2y agoHmm, it's weird you forgot to tell everyone that you're also vegan and always recycle, and meditate daily. Guess what? Nobody cares...
- lysace 2y agoUse python instead of lisp.
- m463 2y agoI agree. Maybe it's just personal preference, since I think it's easier for me to think in python over lisp (which I've known for longer, but I still fumble through) I do think python would make emacs more accessible to a wider audience.
- iLemming 2y ago> I do think python would make emacs more accessible It would not be Emacs anymore. Emacs is specifically tied to Lisp. Emacs is not a text editor that uses Lisp as the configuration language. Emacs is a Lisp machine that has a text editor built into it. An "Emacs-like" editor built on Python might be interesting, but it wouldn't be a "better Emacs" or even "like Emacs", it would be a completely different thing. You may dislike Lisp, you may even hate Lisp, but the fact remains unchanged - there is an emerging class of applications that is significantly more difficult to build around non-homoiconic languages. Emacs is one of them. Stop fetishizing your favorite programming language as the quintessence of Emacs. The best one can do is to build a compiler/transpiler to spit out Lisp code, and people have tried that. Yet somehow, in over forty years nobody has succeeded in dethroning Elisp from ruling Emacs.
- lispm 2y ago> Emacs is specifically tied to Lisp GNU Emacs is tied to Elisp. But Emacs is a much wider family of editors written in a multitude of languages. > Yet somehow, in over forty years nobody has succeeded in dethroning Elisp from ruling Emacs That might have several reason. Maybe few people are interested to reimplement GNU Emacs in a different language. Like nobody has succeeded in dethroning C from the Linux kernel, using Lisp.
- iLemming 2y ago> Emacs is a much wider family of editors written in a multitude of languages. Sure, there's Guile Emacs, there's MicroEmacs - both not Elisp-based, still built on top of Lisp dialects; there's XEmacs, Remacs - both still use Elisp, there's also mg which afaik completely not lisp-based, but I don't know how much of it still 'emacs-like'. In general though, GNU Emacs is what people usually mean when they speak about Emacs, unless they're explicitly talking about others.
- mrob 2y agoI'd make cursors be positioned within the document instead of on the screen. Currently, Emacs does not support off-screen cursors. If you attempt to scroll a cursor off screen, it will move within the document to stay on screen. This behavior is contrary to all modern text editors, and there is no good workaround. I once made a serious effort to start using Emacs, but ultimately stopped because of the annoying cursor behavior. (There were other annoyances, but none so fundamental and unfixable.)
- yoavm 2y agoVim has the same problem: https://github.com/neovim/neovim/issues/989 https://github.com/neovim/neovim/issues/989
- arghnoname 2y agoI'll try to use the more common Windows/MacOS terms for it, but in emacs I often have the same file opened in two different panes within one window or two separate windows. I do this when I want to be looking at one part of a file while editing another. Markers are used to mark a different point in the file and one can pop their location to a previous mark.
- mrob 2y agoPutting cursors within the document does not preclude supporting different cursors for different windows.
- tom_ 2y agoThis still annoys me slightly after nearly 20 years of using Emacs. In response to keypresses, it doesn't bother me too much, as I'm used to the Windows-style behaviour of PgUp/PgDn/etc. moving the caret, much as the Mac behaviour of not doing that is sometimes useful. But for mouse wheel scrolling, which I do a lot - precisely because on Windows this typically does not move the caret! - having point follow along has never felt right.
- entropie 2y ago
- faizshah 2y agoLet us write plugins in whatever programming language we want and provide some simple interface like Unix sockets or something for us to communicate with the editor process. Instead of making the first class installable extensions plugins create a primitive called modes that encapsulate groups of plugins with extra configurations so that instead of having to pick every plugins for our setup we just pick the most popular javascript or ruby etc. mode and then add a couple of our own plugins on top. Add some system that suggests hotkeys based on usage. If I hit l 20 times instead of just hitting f’ to get to the end of the line show a popup. Gamify the key maps and suggest key maps and features even from my plugins. Instead of having a package manager for your editor just use homebrew and integrate it deeply into the editor.
- anthk 2y agoJust use Acme. TCL, Perl, Go, awk... on sockets/files, a la Unix.
- musicale 2y agoI don't care that much about the implementation, but I would like to see an emacs environment with: - instant startup - blazingly fast scrolling - minimal keypress-to-display latency I have written a lot of elisp (and had to deal with with buffer variables, dynamic scope, etc.), but aligning with modern scheme or lisp (if it can be kept compact and efficient) probably makes sense at this point. (Current emacs should provide backward compatibility as needed.) Since so many people use emacs as an IDE, I think having an official emacs co-project/subproject focusing on a standard, extensible IDE framework (perhaps for other apps as well) would make sense. It still seems like a pain to display graphics in emacs in various terminal apps. This should be easy, fast, and standardized. As others have noted, supply chain attacks against open source are rampant, so vetting and sandboxing packages seems to be more important now.
- lysace 2y agoI'm confused. On the modern devices I've recently used emacs on (including very low-powered raspberry pi devices), all of your three criteria are already true. What kind of HW are you running emacs on where this isn't the case?
- arghnoname 2y agoEmacs pauses are almost always due to some operation blocking in the main thread. It's pretty annoying and is mostly a consequence to a lot of things effectively being single-threaded. Stock emacs doesn't do this very often, but third party packages that might do expensive tasks often do
- lysace 2y agoAh. A case of "don't do that, then".
- iLemming 2y agoa) Build it with native-compilation flag b) Use https://github.com/blahgeek/emacs-lsp-booster https://github.com/blahgeek/emacs-lsp-booster c) Tweak GC vars, see: https://emacs-lsp.github.io/lsp-mode/page/performance/ https://emacs-lsp.github.io/lsp-mode/page/performance/ d) Use plists for deserialization (described in the previous link) e) Learn how to use built-in profiler and don't hesitate to launch it, sometimes simply disabling some minor-mode in specific setting is all it takes f) Current state of Tree-sitter in Emacs is a mixed bag - for some modes you get huge improvements, for others it's the opposite. YMMV.
- hbogert 2y agois it me or is emacs just incredibly slow on machines which have endpoint security installed? O/c it's not emacs' fault directly, but all the compiling and loading in of small files really hurts the cold start scenario. So I wish the compilation would just be done once in somebody else's pipeline not in every client.
- pxc 2y agoIt's not just you, and it's especially painful on Windows, where working with lots of small files is already painfully slow under the best circumstances.
- mikewarot 2y agoI'd start with the core TECO editor I've written in Free Pascal[1]. Free Pascal does gigabyte strings you don't even have to allocate. Then I'd read the Emacs manual, and start writing code and tweaking TECO to make it all impedance match better. But I'm old and weird, so maybe not the best way to get there. [1] https://github.com/mikewarot/teco https://github.com/mikewarot/teco
- khazhoux 2y agoEmacs is the shittiest tool I’ve been using since 1992 and will use till I die.
- eointierney 2y agoIt's the finest manure to fertilize thought we can turn over with only a fork
- ironmagma 2y agoIt may be shit, but it's freedom-flavored shit. The best kind.
- buescher 2y agoTake a look at the Mac editor Alpha. It is arguably emacs-in-tcl and did a very nice job of balancing cua-style keybindings with emacs-style. Better, if I remember correctly, than things like cua-mode. It’s been literally decades since I’ve used it though, and it might be impossible to square that circle in a way that’s really frictionless.
- aardvark179 2y agoIt’s interesting the divide we see here between particular implementation choices, and very general design principles. FWIW I think this exposes some of the tensions in Emacs’ design itself. The fact that everything is customisable is both great and the source of many problems, and it depends on which direction you want to go how you want to move that particular needle. I’m not totally sure what I’d do. The semantics of multithreaded or async alteration of buffers are not easy and so, even though they would be great in many ways, might make simple customisation just too painful.
- deleted 2y ago[deleted]
- tiberriver256 2y agoBuild it with emacs
- School-Cotton 2y agoI would use a more mainstream dynamic language like python or lua rather than emacs lisp. It has to be dynamic and maintain the flavor of repl-driven development (the whole point of emacs is that it’s one big X repl where today X is emacs lisp). It doesn’t have to be a lisp though.
- magpi3 2y agoYou could also start at the bytecode level so that the specific language itself is less relevant.
- mdaniel 2y agoemacs-ng cites Deno, which speaks to your "more mainstream" as well as some of the sandboxing concerns offered by others https://github.com/emacs-ng/emacs-ng#denojavascript https://github.com/emacs-ng/emacs-ng#denojavascript
- iLemming 2y agoIt feels to me, people suggesting using anything other than Lisp haven't had sufficient, heartfelt experience with Lisps. Give me a Lisp any day, sure, Elisp might not be a best of Lisps, but it's a Lisp nonetheless, there's simply nothing better for evaluating things on the fly, there's no better language for rapid prototyping, for structural editing, for metaprogramming. One has to experience the flow, the fluidity, the functional constructs of Lisp to truly appreciate its elegance and expressiveness. Lisp's code-as-data philosophy enables seamless metaprogramming, where code can be treated as data and manipulated with the same ease as data structures. This unlocks a level of abstraction and composability that is unmatched by most other languages. The functional nature of Lisp, combined with its homoiconicity, encourages a declarative and modular programming style, promoting code reuse and maintainability. Once one immerses themselves in the Lisp way of thinking, the flow of writing code becomes a harmonious dance, where complex problems are broken down into simple, composable functions that can be effortlessly combined and transformed. It's a paradigm that fosters creativity and empowers developers to build robust and extensible systems with remarkable ease. Sure, Python, Lua, Javascript, etc. They all may seem more familiar, and yet they lack the profound simplicity and expressiveness that lies at the heart of Lisp. While these languages have their own merits and widespread adoption, they are ultimately constrained by their rigid syntax and imperative nature. Lisp, on the other hand, transcends these limitations with its minimal yet powerful syntax, allowing code to be treated as data and data as code seamlessly. It fosters an unparalleled level of metaprogramming capabilities, enabling developers to write code that writes code, unlocking a realm of abstractions and transformations that are challenging or impossible in other languages. Yes, very challenging, see the examples of using Hyperfiddle/Electric, here's one: [SpreadSheesh! talk by Dennis Heihoff - YouTube](https://www.youtube.com/watch?v=nEt06LLQaBY https://www.youtube.com/watch?v=nEt06LLQaBY) When you say "It's one big X REPL... and it doesn't have to be Lisp", it's already conflicting because you need Lisp to have the proper REPL experience. Those non-homoiconic languages that promise a REPL don't actually provide the "real REPL" experience. Their interactive shells are more limited in comparison to the true REPL provided by Lisp dialects, where code and data are seamlessly interchangeable. upd: darn, I guess I didn't scroll too far, all the people complaining about Lisp are at the bottom, downvoted and I guess angry because they don't understand why. It's like someone moving from China to US and complaining why everyone refuses to even try Mandarin, after all it's the most widely spoken language in the world, why wouldn't it make sense to use it instead?
- GregDavidson 2y ago1. I would like higher-level datatypes for key abstractions, such as (1.1) Marks -> StableRegions - reference specified text within a buffer - continue to reference same text despite insertions or deletions (1.2) Strings & characters -> StringBuffers - lightweight immutable buffers (no branches or versions) - able to hold any content a subset of a buffer can hold - could be StableRegions of an Arena Buffer (1.3) AbstractBuffers - immutable buffers + a tree of deltas - some special delta types for, e.g. indentation - AbstractBuffers support transactions and versioning - can support collaborative editing - specific versions can be written to textfiles - all versions can be stored in git or in relational database 2. Use WebAssembly instead of a specific programming language. - This was the vision for Guile. - Scheme one of several languages. - ELisp supported but Emacs port efforts keep failing! - The Racket ecosystem has captured this pretty well - if only it supported ELisp! 3. Prefer languages at least as simple as Scheme, but with monotonic semantics! Non-mutable operations would appear as transactions appearing as branches/versions. An editing session would automatically follow the latest transaction in the current branch. Concurrent edits of the same "file" create different branches as with git, et al. 4. Separate monolithic Emacs process into SessionProcesses, DisplayProcesses and WorkerProcesses. Multiple DisplayProcesses would allow for tightly-coupled collaborative editing. A WorkerProcess would interface buffers with processes, files, git repositories, etc. on a specific account@host giving functionality like Tramp. A user would start with one DisplayProcess connected to a SessionProcess. A SessionProcess would provide the interface between DisplayProcesses, WorkerProcesses and any co-SessionProcesses of collaborators. WorkerProcesses could be scripted without any other overhead.
- celeritascelery 2y agoAre all these “higher-level datatypes for key abstractions” trying to achieve first-class collaborative editing? That sounds a lot like Zed.
- GregDavidson 2y agoI want ALL of what Emacs provides, much more than any other "editor" - actually text-centric programmable productivity platform. And I want more than what Emacs provides, e.g. non-destructive editing and collaboration. So yes, there are other interesting editors out there such as Zed. And no, it's not about adding 1 important feature. I'm greedy!
- wging 2y agoI'd really prefer for emacs' implementation language to have been a lisp-1 rather than a lisp-2. It's annoying to have to do different things to treat a function as a value (put it into a list, assign it to a variable, etc.), as opposed to all other kinds of data. Any benefit you get from allowing name collisions (i.e. function named f, related but distinct variable also named f) seems very small in all elisp code I've seen and promotes confusion more than it enables desirable programming patterns. I'd make lexical scope the default and dynamic scope opt-in on a per-variable basis. This one is probably less controversial. I think the devs are moving in that direction (e.g. by changing emacs core code to use lexical scope and adding warnings for code that doesn't opt into it), but I don't see how they will actually be able to change the default without breaking a whole bunch of user code.
- tmtvl 2y agoMy introduction to Lisp was through SICP and Scheme so I used to be in favour of Lisp-1, but having used Common Lisp for a while now I've changed my mind. Treating a function as a value is easy enough: (mapcar #'list list) It's like how if you want to treat a symbol as data you have to quote it: (let ((x 2)) (list 1 x 'x))
- keyle 2y agoI like emacs for its flexibility and its ability to be a platform for people to build just about any extension. So for this you'd need a solid scripting language. I was never sold on Lisp but it's fine. I'd prefer to see lua; it just makes more sense. The repo-reference stuff works pretty well all things considered. If it were python it would be hell. Crazy side of me would like to see it fully written in a safe(r) language like rust, swift or zig. Basically your config would be a recompiled subsystem, loaded at runtime, or you'd recompile the whole editor. It wouldn't hurt if the config had a bit more structure. Forcing people to set fonts etc. BEFORE loading other things; essentially enforcing an order in which things get loaded. It can get hairy after years of working in emacs. I love that it's keyboard driven and I'd keep that for sure. The config should automatically be a git repository and any change should generate a meaningful commit (thinking out loud). Better key handling and none c-x nonsense. Switching between keyboard combos and straight up shortcut should be a defined choice not overwritten by x. Every 'plugins' should expose their shortcuts override clearly. Have sane defaults that aren't 30 years of cruft. This means you'd have to consider running on mac just as well as windows, and in and out of the terminal makes this extremely tricky. Better plugin system and discovery. Often the best and only way to find how to solve a problem in emacs was by finding some random gray-beard post on some forum by sheer luck.
- inkyoto 2y ago> Crazy side of me would like to see it fully written in a safe(r) language like rust, swift or zig. Emacs Lisp is a very safe language. Even though the Emacs core is written in C, that is immaterial and impalpable to Emacs users as they only interact with Emacs Lisp. What benefits would Rust / Swift / Zig bring to an average Emacs user? > Basically your config would be a recompiled subsystem, loaded at runtime, or you'd recompile the whole editor. elisp -> bytecode compilation in Emacs… predates humanity? https://www.gnu.org/software/emacs/manual/html_node/elisp/Byte-Compilation.html https://www.gnu.org/software/emacs/manual/html_node/elisp/By... The entire stash of Emacs packages compiles into the byte code at the package installation time, anyway. Personally, I even byte-compile-file my ~/.emacs to eke out an imperceptible speed improvement at the startup time, which is slightless less than entirely useless but it warms my heart that I can do it. Recent versions of Emacs can also compile Elisp into the native code: https://www.gnu.org/software/emacs/manual/html_node/elisp/Native-Compilation.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Na... > Better key handling and none c-x nonsense. Perhaps you do not need Emacs then.
- Koshkin 2y agoFirst of all, I would make sure that it would not be swapping constantly when running on eight megabytes!
- mech422 2y agoLOL - Haven't seen that one in ages...
- rbc 2y agoOne thing about Emacs, is it's not really just an editor anymore. Comparing it to other editors kind of misses the mark. It's more like an integrated Lisp development and runtime environment. It reminds me of Smalltalk environments, say Squeak or Pharo, albeit in a very text oriented way. The world could probably make room for an integrated Lisp development environment that makes GUI programming more of a first class citizen. Maybe something like Medley Interlisp?
- anthk 2y agoEmacs runs on terminals too. If you want GUI's, you can choose Common Lisp with Lem and MCCLIM, or that newish web oriented GUI with a similar environment.
- iLemming 2y agoAnd so? Emacs GUI already does tons of things that don't work in terminal: - It can render different fontsets - PDFs - SVG and images - Emojis and file icons - Tooltips - Drag&Drop and better mouse support (scrolling, selection, etc.) I think it would be great to have a better GUI layer and native web-browser integration. Emacs' evolution doesn't have to be constrained by terminal limitations, and so far it doesn't seem that it was.
- nine_k 2y agoWith xterm (Kitty, WezTerm, Alacritty) you can have good mouse support, hence you can have tooltip-like popups (AFAICT eldoc or lsp-ui-doc do it), and likely even drag and drop (never used it). I suspect that with sixel support, and kitty image protocol support, images could be shown, too. At least, Eat, the elisp-based terminal.emulator, manages to show sixel graphics inside Emacs.
- mdaniel 2y agoI think others have hinted at it, but for me any foundational application must be written in a statically typed language, but cannot be C nor C++ /me glares at Chromium The bad news is that I don't currently have enough free energy to help the remacs nor emacs-ng projects, but I am glad they exist
- musha68k 2y agoRendering performance is still my main gripe and the one most mentioned by vim users I unsuccessfully tried to convert through evil mode.
- iLemming 2y agoI bet you're talking about Mac. I hate coming back to Mac after using Emacs in Linux. It feels so sluggish. Even on my Android tablet Emacs works faster than on a M1 Mac.
- chillpenguin 2y agoThere's something about it where it doesn't feel quite right when using the mouse as a GUI app. Compare it to something like Sublime Text. I can't quite describe it exactly. It just feels off. It feels like you are supposed to use the keyboard shortcuts to navigate around, and the mouse is sort of bolted on secondarily or something. So I would try to make it feel more like a modern GUI app, where using the mouse feels right.
- panza 2y agoMany of the non-sarcastic responses here are subjective changes (scripting language, core plugins, alternative control schemes) that will change what Emacs is for other people. But I think we can find a lot of agreement around launch speeds, latency, typography and similar.
- EasyMark 2y agoI’d get rid of the text editor and swap in neovim or hx code as a mode, I’d chuck emacs lisp and use Common Lisp instead, I’d definitely keep org mode and ditch old stuff like mail and news reader as core and let them be add ons written in CL . Rewrite it all in rust. That’s probably enough for today.
- celeritascelery 2y agoWhat advantage would you get by rewriting it in Rust?
- anthk 2y agoAgainst CL, maybe speed, but SBCL has native compilation. Also, with Lem you don't have to care about Rust. Just keep coding CL to achieve anything with a REPL. You don't have to wait weeks to recompile.
- narag 2y agoDisclaimer: my experience with Emacs is limited. I've only used it because it's the path of least resistence to learn Lisp. So for me it would be: everything that makes Lisp programming easier, like: - Use a Lisp implementation that's not tied to the editor. - Slime/Sly + Quicklisp functionality out of the box. - Integrated syntax awareness, preferably "syntax directed" for programming. There is more, but it'll be obvious (like updated defaults and looks) unless you want to make an outright clone, or at least a direct replacement option, I wonder if that's what you mean: "rewriting Emacs" seems to suggest it is. It's difficult. These big old projects like Emacs, and Lisp itself, have both succeeded and failed. There are features that made them last decades and others that made them stop attracting new users. How to capture the appealing parts without reproducing the quirks?
- mark_l_watson 2y agoI used to do a lot of consulting work using Common Lisp on remote servers and would frequently need to set up tmux, Emacs, SBCL, Slime, etc. on remote servers to do my work. Keep good notes, and it gets much easier and faster.
- narag 2y agoPast month I setup ssh accounts to access a remote server using Laravel. The guys doing the programming absolutely hate the console, but it turns out VS Code can work through ssh connections just fine. Not sure if it can also debug, but editing was seamless. I wonder if it uses sftp or escape codes.
- dannyfreeman 2y agoStarting with some kind of namespacing solution for emacs lisp would be nice.
- jiffygist 2y ago- throw away c language mode and and rewrite it from scratch - make dired more usable like a normal file manager. opening a file with the associated program that would persist after emacs closes should be its primary feature. ideally i want something like a mix of ranger/lf with dired - make it have fully-featured terminal, not dumb terminal. make it easy to open lots of terminal windows. add a way to change terminal directory with fido or dired - make working with ssh not so horribly laggy
- celeritascelery 2y agoAll of this is possible in the current Emacs. 1. You can already define what program opens a file in dired. You could even use detach it from the Emacs process so it stays open when Emacs closes. 2 we already have vterm, which has all the features you described. 3. There are ways to make this better. I am actually in the process of writing a blog post about working efficiently over tramp.
- jiffygist 2y agoThanks for vterm, that's just what I need. For dired I do have my bindings (one for xdg-open on a single file, another for custom command on a bunch of files).
- aidenn0 2y agoUse Common Lisp instead of making its own mac-lisp like dialect.
- taeric 2y agoThis will fall to the curse of most people answering didn't write emacs. That is, rewrites can work sometimes. You typically need someone who was involved in the last two for it to work, though. If you haven't written it once, you have no real idea on any compromises that were made. If you haven't tried to do it without a compromise, you don't know which compromises were unexpectedly vital.
- sevensor 2y agoMore to the point, emacs already has been rewritten substantially. There’s the initial rewrite from TECO to lisp, there’s the 80s implementations like uemacs (famously used by Linus), we had a major fork with xemacs in the 90s, there’s guile emacs (ready any day now), lem is almost but not quite a Common Lisp emacs, and it’s been making a lot of progress recently. So go ahead with your rewrite, you’re in fine company!
- jonjacky 2y agoAlso, there were other emacses that preceded GNU Emacs and were written from scratch: Bernard Greenberg's MULTICS Emacs, written in MacLisp [1], James Gosling's Unix Emacs, mostly written in C [2], and Daniel Weinreb's Zwei, written in Lisp Machine Lisp [3]. 1.https://multicians.org/mepap.html https://multicians.org/mepap.html 2.https://dl.acm.org/doi/10.1145/62402.62417 https://dl.acm.org/doi/10.1145/62402.62417 3.https://en.wikipedia.org/wiki/EINE_and_ZWEI https://en.wikipedia.org/wiki/EINE_and_ZWEI
- lr0 2y agoAlmost all the comments here are about things that really possible to do in current Emacs i.e. 'feature-requests' and not "fundamental pitfalls of this foundational application". For me, it would be just: - Redesigned with concurrency in mind. - Common Lisp, Scheme, or anything else other than Elisp. [Just the same way Neovim adapted Lua instead of VimScript] - More sane defaults for new users.
- throwaway17_17 2y agoHard agree that these are true ‘fundamental pitfalls’ of Emacs’ design. However I may go further on your third point. I would like to see a dedicated new user/learner mode that in addition to saner defaults would be pretty fully configured and pre-loaded with the most common extensions/plug-ins/etc. This could then lead to development of dedicated documentation/tutorials that assist the new user in becoming proficient in the common style/habits of Emacs usage. This could provide a much simpler full featured ‘base’ state for the app, that can then be customized from that point or can be stripped back by removing the more common add-ons and customized from the ground up. It would in some ways necessitate a strongly opinionated set of defaults and an additional focus on documentation, but I think in the long run the app would benefit from higher retention.
- jolmg 2y ago> in addition to saner defaults Isn't that cua-mode? https://www.gnu.org/software/emacs/manual/html_node/emacs/CUA-Bindings.html https://www.gnu.org/software/emacs/manual/html_node/emacs/CU... > would be pretty fully configured and pre-loaded with the most common extensions/plug-ins/etc. Doesn't it already do this? org-mode comes pre-installed for instance.
- orra 2y agocua-mode, yes, but the point is it's not the default. Similarly, recentf-mode exists but is not the default. Or has that changed?
- randmeerkat 2y ago
- clojureyoureyes 2y agoI'd rewrite in a Clojure-like language
- iLemming 2y agoI'd trade my dog to have Clojure-like maps and destructuring in Elisp. Comparing workflow with maps in Clojure and alist/plist in Elisp won't get any points to Elisp side.
- ruricolist 2y agoI'd replace the underlying data structure used to represent buffers (https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-Internals.html https://www.gnu.org/software/emacs/manual/html_node/elisp/Bu...) with something more sophisticated, like ropes or piece tables.
- binary132 2y agoWhy? Not saying it’s a bad idea, but I probably don’t understand what’s practically wrong with the simple design of emacs’ buffer class.
- celeritascelery 2y agoI wrote some comparisons here https://coredumped.dev/2023/08/09/text-showdown-gap-buffers-vs-ropes/ https://coredumped.dev/2023/08/09/text-showdown-gap-buffers-...
- randmeerkat 2y agoRealize that VI was the superior editor, give up on the endeavor, print out the code I had already written for emacs, shred it, then set the shredder unceremoniously on fire. For those that downvote me, worth it.
- kQq9oHeAz6wLLS 2y ago> For those that downvote me, worth it. Nay, quite the opposite; I scrolled down specifically looking for comments like these, because I knew they'd be here. Kind of comforting, really.
- randmeerkat 2y ago<3
- kunley 2y agoStrategically thinking, after setting the shredder on fire it will be harder to shred the code of the future emacs clones! :D
- randmeerkat 2y ago> Strategically thinking, after setting the shredder on fire it will be harder to shred the code of the future emacs clones! :D The most realistic future is that emacs begins shipping with a self-shredding feature. C-h s
- kunley 2y agoLove it already!
- iLemming 2y agoThat just means you have not reached the point of understanding the philosophy of Emacs. Comparing Emacs and Vim with a one-sided perspective like yours is like saying that motorcycles are better than trains. Sure, they both serve the purpose of reaching from point A to point B, but there's a lot more to it than just that. Similarly, Emacs is far more than just a text editor. Vim's model of navigation is an amazing, beautiful, powerful, and pragmatic idea. Have you ever used it anywhere else than Vim/Neovim? You see, the thing is, there's no such thing as a "vim-plugin", and I'm saying this with confidence of a die-hard vimmer. I've tried them all - different ones - IdeaVim for IntelliJ, Sublime Vim plugins, VSCode extensions, etc. All of them are pretty much filled with laughable deficiencies; they are not even shadows of the actual Neovim experience. With one notable exception, and that is the vim-implementation in Emacs. In Emacs, Evil-mode doesn't even feel like an extension, an afterthought; it feels like it's a baked-in, major feature of the editor. More than that, it can do certain things even better than you can do it in Neovim. If someone had built a passenger plane with vertical take-off/landing capability, a mere accidental feature of the aircraft that nobody was even supposed to use, I would still respect the heck out of it because the mere presence of it would be proof of ingenious engineering. If you think that "VI is a superior editor than Emacs", I'm afraid you still have a shallow understanding of both.
- abe-101 2y agoI wouldn't. I just used vim
- iLemming 2y agoYou could use MS Word of Photoshop if you want, we couldn't care less. We're not talking here about a mere text editor, we're discussing a Lisp machine with level of extensibility and programmability deeply ingrained into its design, something that Vim or Sublime or any other traditional text editor can never achieve.
- pton_xd 2y agoImprove performance handling large files and large numbers of buffers. Emacs has been my daily driver for the last 10+ years and yeah perf could use some help. Everything else is superb.
- celeritascelery 2y agoI have actually done some work on a rewrite of the Emacs core in rust[1], so I have thought a lot about this question. Most of the things you would want to change could be fairly easily added to the existing Emacs. The biggest ones that are hard to do with the current core is concurrency and collaborative editing. My particular core is focused on concurrency[2]. Unlike a lot of commenters here, I am trying to stay backwards compatible with elisp. It is not the best, but huge body of existing code is one of the strengths of Emacs. Unlike vimscript, elisp isn’t painful enough to be worth replacing. [1] https://coredumped.dev/2021/10/21/building-an-emacs-lisp-vm-in-rust/ https://coredumped.dev/2021/10/21/building-an-emacs-lisp-vm-... [2] https://coredumped.dev/2022/05/19/a-vision-of-a-multi-threaded-emacs/ https://coredumped.dev/2022/05/19/a-vision-of-a-multi-thread...
- dargscisyhp 2y agoHave never tried it personally, but this talk made me think collaborative editing is a solved or close-to-solved problem in Emacs: https://emacsconf.org/2023/talks/collab/ https://emacsconf.org/2023/talks/collab/
- ac130kz 2y agoIf I leapfrog over my generally cold attitude towards Lisp-like languages and my habit of Vim keys, the main problem is Emacs's sluggishness, even if it is natively compiled. Neovim fully packed with plugins, LSPs, settings and etc without lazy loading (!) is so much faster.
- iLemming 2y agoAnd? GIMP is too, much faster to start than Photoshop, yet there are a number of things for which sometimes you just need the heavy cavalry. I was doing some API testing today, I pressed a key, then a snippet expansion system added something like this into my notes: #+begin_src http GET http://localhost:5003/api/health #+end_src I ran the snippet, it sent the request and it failed. I realized that I needed a token. It is stored in an env var - not very secure, but it's okay - I'm not testing the prod endpoint. I just had to change the header into this: #+begin_src http :var token=(shell-command-to-string "echo $MY_TOKEN") GET http://localhost:5003/api/health Authorization: Bearer ${token} #+end_src I ran that, and Emacs picked up the env-var, fed that into the snippet, sent http request, got me some results. Then, I changed the endpoint to get some more data, I realized that I would like to examine it closer. I could've done this in Python, Javascript, any other language, even Elisp, but I know Clojure, it's good for data manipulation - so I chose that. I just had to feed the http request results to another block in Clojure. I spun up a Clojure REPL, went through the data, looked at the results, typed some Clojure data manipulation functions, right there where my notes were, ran them against the data, added some more notes - documenting my findings. I've tested some more endpoints, got some unfamiliar http error codes, so I just typed directly in my notes "RFC 2616", Emacs was smart enough to recognize what that was and it opened the RFC document, where I searched for the error code, read about it, refreshing my knowledge. Then I found the Jira ticket number in my yesterday's notes, copied over to my notes of today - Org-mode has a nice way of organizing daily notes in so-called date-trees. It's just a plain string - "TDL-26478", and once again, Emacs was smart enough to know what that was, I was able to read the description of the Jira ticket, without switching to the browser, without opening any pages, right there, from where I was composing my notes. And this is all within less than an hour. I was able to send http requests, analyze results, study relevant RFC document, work with Jira, all that while taking extensive notes, without opening a single web-page, without typing a single command in the terminal, all that done inside Emacs. Emacs basically within less than an hour in a single window was able to substitute for me - a note taking app like Obsidian or Notion; API client like Postman; Interactive computing platform like Jupyter; Project management client for Jira; RFC documentation site; Web-browser and the Terminal app. So tell, me which one of any of these activities do you normally do in Neovim? And btw, this is not even remotely "esoteric" stuff I do in Emacs. This is just an ordinary Tuesday for me.
- Decabytes 2y agoHonestly I think you could go a long way with default evil mode, and updated documentation with evil keybindings in mind.
- iLemming 2y agoI hope not. Watching the Emacs ecosystem evolving over the years, I'd wish that most things were not default or built-in but came in packages, and Emacs was a tiny, extremely small core. Packages outside of the Emacs core develop faster, evolve better, foster communities around them, have greater flexibility of choice - where to host them, how to license them, how to structure them, etc. Evil-mode, Magit, Projectile, CIDER, etc., they are all great because they were developed outside of the Emacs' core. I can only imagine how Evil+plugins would've slowly decayed with endless email threads on the Emacs-devel mailing list, where RMS would've annoyed everyone asking "why are we trying to build Vim in Emacs instead of Microsoft Word, I've dreamed about WYSIWYG, and you guys are ruining it...".
- geocrasher 2y agoI'd give it a good editor.
- iLemming 2y agoWhat constitutes "a good editor" in your mind? Emacs has an amazingly nice editor, especially for writing in plain language. It even supports right-to-left languages and things like Sanskrit. There are frequent posts in /r/emacs about using it for writing. Many novelists use Emacs for writing, some of them are well-known names - Cory Doctorow, Neal Stephenson, Vernor Vinge, Charles Stross, et al. There are a number of nice packages that help you with writing - spellchecking, thesaurus, dictionaries, translation, definition and etymology lookup, LLM integration, export capabilities, distraction-free modes, various text manipulation tools and more. The joke that Emacs is an operating system that simply needs a decent editor has not aged well. It's not even funny in the slightest; it's laughable in the face of the joke teller, telling more about them than Emacs and its editing capabilities.
- airtonix 2y ago[dead]
- worthless-trash 2y agoI'd ask the lem guys.
- znpy 2y agoI’d keep the possibility to use the ide both in the console as well as in a graphical environment for sure. I’m not sure i’d change the scripting language, despite all of its shortcomings it has proven itself way more than enough. Maybe better concurrency?
- kanodiaashu 2y agoI would 1. Make it more capable as a full GUI - currently I have trouble displaying jupyter notebooks with images/progress bars etc in it. 2. Make an 'emacs app store' where you can get paid plugins (I'm going for Cursor). 3. Make collaborative editing possible.
- swah 2y agoThe main quality I remember Emacs having compared to something like VSCode is its ease of extendability - but I don't know how to balance the liveness/messyness of a personal Emacs setup and wanting to package some of those bits to third parties. I think its a tension there...
- kuba-orlik 2y agoConcurrency, concurrency, concurrency. And scripting with JS/TypeScript. Kind of like emacs-ng attempted (https://github.com/emacs-ng/emacs-ng/ https://github.com/emacs-ng/emacs-ng/)
- aeonik 2y agoInstead of making it just an elisp interpreter, make it a generic platform where you can interpret any language and have them with together. Make it Programming Language Macros, PLMACS. Kind of life a POSIXs standard. Or the Truffle framework.
- drekipus 2y agoThat's bash
- anthk 2y agoPlan9's Acme, literally. Unix philosophy scripting an editor in and out
- anthk 2y agoJust use Acme under Plan9port. What you said it's the idea the plan9 guys had under to create a Unix 2.0 based 'Emacs' editor instead of vi and the pseudo graphical Sam.
- iLemming 2y ago> where you can interpret any language and have them with together. You can have multiple different source blocks in a single Org-mode document. All in different languages, and they can be passing results between one another. e.g., you can run a piece of bash that runs curl, then send the results of it to Python block, where it calculates something, then to Javascript block that uses some npm package and and then send the results to a SQL block that queries a database and generates a report.
- ristos 2y agoI wish it were built with a very small, minimal core, that was just the TUI with the lisp machine like functionality, scriptable using R7RS scheme instead of elisp. And then everything else is built on top in a more modular fashion, with "battery packs" that install many modular components into one higher level functionality, like an IDE. I'd like to eventually write something like this, there are a lot of things it would enable that you just can't do with emacs. It would be an emacs killer if implemented well, but it would also open up a whole new set of possibilities. I don't know how far I'd get just working on it on my free time, which is competing for time with other projects. I'm looking for funding for these sorts of projects. If anyone reading this is an investor and interested in funding this sort of thing, please reach out.
- bjourne 2y agoI would use Python as the extension language since it is omnipresent. ELisp has lots of terrible misfeatures that makes building large software in it difficult. I would also add better support for the services model. E.g., rather than adding spell-checking and syntax-highlighting modes you could defer those tasks to LSP servers.
- dataangel 2y agoStatic typing, lexical scope, good performance on huge files out of the box, extension sandboxing