Live data from Hacker News

My Emacs Productivity Tricks/Hacks

mycpu.org

51–60 of 210 posts

Re: My Emacs Productivity Tricks/Hacks

#51
post #47

What is the emacs equivalent of package.json? (whenever I git clone my dotfiles on a new machine I usually have to comment out a bunch of stuff in my ~/.emacs because it's referencing packages which aren't installed, and I forgot where I installed them from, what version, etc...)

I use straight.el[0] for a reproducible package list. It basically clones the packages and stores a map of package->commit, so you can freeze your packages and reproduce them on another machine.

You could also use the Guix package manager[1] or the Nix package manager[2] to achieve a similar effect.

Reproducible software is much more stable!

[0]https://github.com/raxod502/straight.el

[1]https://guix.gnu.org/#guix-in-other-distros

[2]https://nixos.org/nix/

Re: My Emacs Productivity Tricks/Hacks

#52
post #17

I've used Emacs for decades and still feel like I'm barely scratching the surface. What would really help me with articles like this one is more narrative on _why_ these particular modes are so useful. For example, it took me a long time to learn org-mode because I just didn't know what to do with it! I feel like Helm is similar, I've tried it briefly, but I'm not sure if or how it would fit into my workflow.

helm is a vessel that opens up many other things to shine... swoop is fantastic and uses helm for that, the ability to add spaces to your search and it do a match on two fields independently instead of a rigid string match is great too. many things use helm to show lists of things.

Re: My Emacs Productivity Tricks/Hacks

#53
post #41
post #38

It seems a lot of people have used emacs for years and love it. I never saw the point of learning as it seemed cryptic. In 2020 is it worth putting the effort to learn now? I figure with vim and IDEs I dont really need it.

I switched to emacs in 2019 after using primarily vim for 12 years, and I think it's more than worth it. It's not an editor, it's not an IDE, it is kind of like an operating system where you can have a text editor, debugger, notes, mail, whatever you want. If you dig that, you'll love emacs. It's extensible in a way you've probably not experienced anywhere else, so if you like honing your tools so they fit the way yo…

> not an editor

It's "editing macros," so yes, it's an editor first and foremost.

> not an IDE

It's integrated; mostly used by developers; it's an environment.

Re: My Emacs Productivity Tricks/Hacks

#54
post #47

What is the emacs equivalent of package.json? (whenever I git clone my dotfiles on a new machine I usually have to comment out a bunch of stuff in my ~/.emacs because it's referencing packages which aren't installed, and I forgot where I installed them from, what version, etc...)

By default, Emacs doesn't have an equivalent. Although, if you want to use a package manager that supports version lock files, I would recommend straight.el.

Re: My Emacs Productivity Tricks/Hacks

#55
post #50

Earlier quoted context omitted.

This is why I regularly create hydras for every emacs mode that I use. That way I don't have to remember any extra keystrokes, as the hydras will remind me.

What's a hydra? (in this context)

A cluster of Emacs keybindings that share a common prefix, implemented using the hydra library:

https://github.com/abo-abo/hydra

Re: My Emacs Productivity Tricks/Hacks

#56
post #47

What is the emacs equivalent of package.json? (whenever I git clone my dotfiles on a new machine I usually have to comment out a bunch of stuff in my ~/.emacs because it's referencing packages which aren't installed, and I forgot where I installed them from, what version, etc...)

Being emacs, there's a bunch of different ways to do this.

I use Cask: https://cask.readthedocs.io/en/latest/guide/installation.htm...

Let's consider Homebrew bundle etc outside of scope and assume you have some workflow that works for you to init a new machine with emacs and some other apps, and you're just worried about the zillions of little emacs packages you are testing or using.

So, I have a file called at ~/.emacs.d/Cask, that is just a list of packages on which I depend. This is the only way I install packages. Update the file and do "cask install".

This also means if you're packages get weird, or you have some sort of transient .elc problem you can just blow away ~/.emacs.d/.cask and do a 'cask install' (basically .cask ~= node_modules)

Re: My Emacs Productivity Tricks/Hacks

#57
post #43

Earlier quoted context omitted.

I completely agree. I used vanilla Emacs for about a decade before finding list-packages. (I know, I know. I was really behind.) But stuff like org-mode never clicked for me. I had to sit down with the manual and read it to finally get a handle on what it is. I'm currently drafting an essay on what makes org-mode compelling, rather than how to use it. I think I'll do the same for other tools I use.

> I completely agree. I used vanilla Emacs for about a decade before finding list-packages I think it helps to think of Emacs as just another platform - and a nice stable one. You may or may not use, or know about, all the "applications" available for it. New stuff comes along that you haven't heard about; you might occasionally want to review things; and it doesn't really matter if you don't. I've been using it for…

As an Emacs neophyte and vi vicenarian, I'd love to know why you ended up ditching evil alongside the other goods. I see the ortholinearity of e-mail and vcs in an editor, but evil seemed to me living within the editor, rather than atop it. Appropriately: a minor mode rather than a major. Like, say, editorcfg. Was this not your experience?

Re: My Emacs Productivity Tricks/Hacks

#58
post #43

Earlier quoted context omitted.

> I completely agree. I used vanilla Emacs for about a decade before finding list-packages I think it helps to think of Emacs as just another platform - and a nice stable one. You may or may not use, or know about, all the "applications" available for it. New stuff comes along that you haven't heard about; you might occasionally want to review things; and it doesn't really matter if you don't. I've been using it for…

As an Emacs neophyte and vi vicenarian, I'd love to know why you ended up ditching evil alongside the other goods. I see the ortholinearity of e-mail and vcs in an editor, but evil seemed to me living within the editor, rather than atop it. Appropriately: a minor mode rather than a major. Like, say, editorcfg. Was this not your experience?

Oh, evil wasn't something I ditched - I never used it. I just mentioned it because it's so often cited as a vital thing. (ooh, nice potential pun there in vi-tal... hm) Same goes for the colour scheme. It's the higher-level applications that have come and gone. Sorry to be unclear.

Re: My Emacs Productivity Tricks/Hacks

#59
post #17

I've used Emacs for decades and still feel like I'm barely scratching the surface. What would really help me with articles like this one is more narrative on _why_ these particular modes are so useful. For example, it took me a long time to learn org-mode because I just didn't know what to do with it! I feel like Helm is similar, I've tried it briefly, but I'm not sure if or how it would fit into my workflow.

> I feel like Helm is similar, I've tried it briefly, but I'm not sure if or how it would fit into my workflow.

Prefix-based autocompletion is always good enough for you? I don't use Helm, at least not yet, but thought the Helm demo image in the article was enlightening.

Post reply on HN