Live data from Hacker News

Emacs Bedrock: A minimal Emacs starter kit

sr.ht

101–110 of 132 posts

Re: Emacs Bedrock: A minimal Emacs starter kit

#101

Earlier quoted context omitted.

Plus those keys work in bash shells (anything that uses readline) and a lot of other places too. Not only that but, the basic forward/back char, up/down line are caveman style navigation. Obviously they come in useful, but emacs has a much richer set of navigation options: M-f, M-b move forward/back by words, M-}, M-{ by paragraphs etc.

Amazingly... arrow keys also work in bash/zsh etc. shells, back to the late 80s. :-) Actually back then I used tcsh first because it was the one that commonly had niceties like.. arrow keys. In shell, I use the emacs bindings for kill-buffer, incremental search, and end of line jump, etc. but arrow keys for cursor movement. I suspect most people who aren't using vi bindings are much the same. To me the ctrl-n/ctrl-p…

In all the web browsers I've tried on Windows, Mac and Linux, up and down arrow scroll a little (roughly a twelfth of a page) and people spend more time in browsers than in editors.

I'm no exception, which is why I customized my editor to make the up and down arrow keys behave like they do in browsers. That means I would like to use some other pair of keys in my editor to move to the next line or previous line. Since there does not seem to be any convention for the choice of those 2 keys more entrenched than Emacs's convention of using ctrl-n and ctrl-p, that is what I use.

Like you, I am annoyed by comments that gush about how great it is for programs other than Emacs to interpret Emacs-specific keyboard shortcuts because in VSCode, the editor used by about 70% of the world's programmers, none of the Emacs-specific shortcuts work: e.g., ctrl-n / ctrl-p don't move to the next / previous line.

Re: Emacs Bedrock: A minimal Emacs starter kit

#102

Earlier quoted context omitted.

> Emacs is a relic People were saying that when I started using it, over 20 years ago. Apparently I was supposed to be using Notepad++ or some MS program du jour which no one remembers now. I wouldn't be surprised if I keep using it for the rest of my career. > it can take weeks of configuring More like decades ;) > to get it anywhere near as productive as something like VS Code or Jetbrains IDE Nope - it's significa…

Processing text is like 10% of time and 5% of effort of software development. emacs fails at basic core IDE features like semantic location of variable declaration and usage out of the box

That's why the gods of Unix created ctags.

Re: Emacs Bedrock: A minimal Emacs starter kit

#103
post #85

> When I started learning Emacs, my dad gave me his .emacs file This is the first time I'm hearing of digital tooling used as legacy in the actual meaning of the word. I can't really be surprised that Emacs is the one that pops up, but I'm wondering if anybody has had (or heard) similar experiences

[deleted]

Re: Emacs Bedrock: A minimal Emacs starter kit

#104
post #75

Earlier quoted context omitted.

> semantic location of variable declaration This can only work if the editor internalizes the corresponding language. That does not scale for all languages available. That’s exactly what the language server protocol is all about (and certainly what parsers like tree sitter are there for). Emacs can connect to those and acquire semantic analysis capabilities. The degree to which such a semantic language features will…

Unfortunately for the estimated 0.18%-language-share's worth of Raku devs it does not appear that finding references is supported: https://langserver.org/#implementations-server . So not even a great solution for the ~5% of languages that don't have dedicated commercial editors that actually just work instead of requiring devs to do extensive proprietary meta-programming to achieve a half-functioning IDE facsimile

> for the ... Raku devs it does not appear that finding references

So the Raku server has a deficiency, currently. Too bad. But in Emacs you can work around that by writing into your config file:

  (remove-hook 'xref-backend-functions #'lsp--xref-backend t)
if you use "lsp-mode.el" or equivalently

  (remove-hook 'xref-backend-functions 'eglot-xref-backend t)
if you happen to use "eglot.el". (There are two major language server clients available for Emacs.)

This will not turn off "finding references" completely because Emacs happens to have a default backend called "etags-xref-backend" based on a reverse index file. You can easily generate that in your project directory using a shell tool shipped with Emacs or even execute that automatically from inside a git commit hook. So Emacs can stand in until Raku's language server is fixed.

So ... while you would be in trouble with a commercial editor now, you can continue hacking happily thanks to Emacs' flexibility.

Re: Emacs Bedrock: A minimal Emacs starter kit

#105

Earlier quoted context omitted.

Unfortunately for the estimated 0.18%-language-share's worth of Raku devs it does not appear that finding references is supported: https://langserver.org/#implementations-server . So not even a great solution for the ~5% of languages that don't have dedicated commercial editors that actually just work instead of requiring devs to do extensive proprietary meta-programming to achieve a half-functioning IDE facsimile

> for the ... Raku devs it does not appear that finding references So the Raku server has a deficiency, currently. Too bad. But in Emacs you can work around that by writing into your config file: (remove-hook 'xref-backend-functions #'lsp--xref-backend t) if you use "lsp-mode.el" or equivalently (remove-hook 'xref-backend-functions 'eglot-xref-backend t) if you happen to use "eglot.el". (There are two major language…

It's not happy hacking to have to think about the internal configuration of how broken my IDE's language support is. Emacs is cool for what it is but it's objectively deficient for modern professional development

Re: Emacs Bedrock: A minimal Emacs starter kit

#106
post #72

Earlier quoted context omitted.

Well, Emacs is all about choice and flexibility -- not 1-click convenience. If you do not want to spend some time learning your tool, it's definitely not for you. I respect that. See, if you hate "lsp-mode" and "lsp-ui" you can go for the more minimal "eglot.el". Similarly, you can exchange "company.el" with "corfu.el" if you prefer the latter. It's all about freedom of choice. Emacs means to many people different th…

Lol at the arrogance of thinking I do not take the time to learn or customize my tools while you advocate usage of a development environment that objectively lacks essential features for efficient professional programming such as functional semantic code search and navigation

Not sure why you're going so hard at OP. Just don't use the tool and move on, man :) Its totally OK if you like different tools. The acerbic response is totally unnecessary.

Re: Emacs Bedrock: A minimal Emacs starter kit

#107
post #40

I have switched last year from custom configuration to Doom Emacs. I liked the framework, but over time, I think this makes me rely on external people too much and some of the stuff is too overengineered (but the good design makes it easy to tweak). I would prefer to keep things lean and I am pondering using Doom Emacs without any builtin modules as the framework itself is very good. I have looked at other starter ki…

I went Doom a few years back after declaring init file bankrupcy. I haven't looked back. I now just run pretty bare doom config with a couple extra modules for org-journal, etc.... I've even embraced the VIM bindings. I definitely love the leader key access to the options.

Re: Emacs Bedrock: A minimal Emacs starter kit

#108

Earlier quoted context omitted.

I'm a casual emacs user for 30 years. Decided to give prelude a try after reading this... 2 minutes in: "" keybinding is discouraged! Use instead." Ok, well, then. Time to uninstall.

Fair enough, though that notice can easily be disabled. For what it's worth, I happened across bbatsov/prelude in 2011, not long after it started being developed, having no prior emacs experience. The notice you mentioned was one of several that nudged me to learn and use the various key combinations, so I'm grateful for the notices, but I understand that not everyone would be.

So I tried again and disabled guru mode (had to hunt for how and had to read the author's opinionated nonsense about the "one true way to use Emacs is by using it the way it was intended to be used " (phbtbt... nonsense... have you looked at the Space Cadet keyboard?).

So far I like the bundling of lsp and so on, it worked nicely out of the box to bring in my Rust projects ... it's nice to have it all set up.

But there's more... opinionated stuff in here that's frustrating. C-x u for undo is wonky, and C-g does not appear to be working to abort/get out of prompts. My fingers were tripping all over the place.

I feel like by the time I'd unpeeled enough of this guy's opinions and undone all the non-standard stuff in here, I'd be best to just start over.

Re: Emacs Bedrock: A minimal Emacs starter kit

#109
post #3

If you’re running emacs 29+ I posit you get less value out of a starter kit or framework than beforehand. Treesitter is baked in for syntax, eglot is baked in for language servers (intellisense), project and tab-bar give you scoped workspaces. use-package is baked in for downloading and configuring dependencies. Modus-themes are also built in now, so you can use modus-operandi and modus-vivendi out of the box. Two in…

Is there code-completion/intellisense baked-in as of Emacs 29? I think not. Why can't something that is built into IDEs like Intellij be built into Emacs even after 30+ years of development?

It is built in, and it’s better with eglot. It’s just not enabled by default because emacs isn’t used exclusively for programming.

Re: Emacs Bedrock: A minimal Emacs starter kit

#110

Earlier quoted context omitted.

Fair enough, though that notice can easily be disabled. For what it's worth, I happened across bbatsov/prelude in 2011, not long after it started being developed, having no prior emacs experience. The notice you mentioned was one of several that nudged me to learn and use the various key combinations, so I'm grateful for the notices, but I understand that not everyone would be.

So I tried again and disabled guru mode (had to hunt for how and had to read the author's opinionated nonsense about the "one true way to use Emacs is by using it the way it was intended to be used " (phbtbt... nonsense... have you looked at the Space Cadet keyboard?). So far I like the bundling of lsp and so on, it worked nicely out of the box to bring in my Rust projects ... it's nice to have it all set up. But the…

Maybe there's been a recent change, but I use C-g all the time every day to get out of prompts, etc.

For me, C-x u opens a buffer for undo-tree, not sure if that's what you meant or not.

It's possible I customized for C-g and or C-x u; I haven't changed much in .emacs.d/personal recently, except for adding a few scripts.

In any case, glad you gave it another shot, but perhaps it isn't your cup of tea. It's great that Emacs is (and has long been) able to adapted to a variety of needs and preferences.

Post reply on HN