Live data from Hacker News

Magit 3.0

emacsair.me

131–140 of 144 posts

Re: Magit 3.0

#131
post #125
post #108

Earlier quoted context omitted.

I have the same experience. Being on master and nativecomp probably helps, and I also think eglot is tad smoother than lsp-mode. I am using 10 year old laptop, no friction at all with tsserver, elixir-ls or gopls. However I think the server itself is the biggest difference maker, because all hell breaks lose when I try dart/flutter even in a simple project. But to be fair, my neovim setup struggles with that too (nvi…

I use Dart/Flutter LSP (lsp-dart) in Emacs all the time very successfully. “All hell breaks loose” sounds like maybe you have a project cloned or created but not yet `flutter pub get`’d, in which case I have seen it act like practically every token is an error.

Okay, I think I am hitting some weirdness in Dart-mode itself. But it's to do with something unrelated in my config perhaps, because now I can't reproduce this with `emacs -Q`, and my dart-mode setup itself is only `(use-package dart-mode)`.

Basically even doing something mundane like C-n/C-p in a dart-mode buffer takes up a lot of memory (~800mb), which causes very high GC pressure and everything visibly stutters. Here is the `profiler-report` output just now:

https://paste.gnugen.ch/paste/5zED

But it's not helpful beyond pointing out that `line-move` when called from `next-line` for some reason is memory intensive.

Re: Magit 3.0

#132

Earlier quoted context omitted.

Interesting! Is that workflow similar to what Quilt [1] or Stacked Git [2] is used for? And how do you achieve that now? [1] https://savannah.nongnu.org/projects/quilt [2] https://stacked-git.github.io/

Those look interesting. If I understand them right they've for mailinglist-based dev where you email patches around? I prefer a model where you use a forge for collaboration, and don't rewrite shared history. However, you use rebase extensively locally. Right now I use magit with fixup. It's just more keystrokes. I want to be able to highlight a change to the workdir, hit a key and select a local commit (right now it…

> If I understand them right they've for mailinglist-based dev where you email patches around?

You're right, but I think they are not limited to it. Stgit has a command to directly convert patches to commits. Quilt deals only with patches. So the patches will have to be applied to working tree before they can be committed.

> I want to be able to highlight a change to the workdir, hit a key and select a local commit

> I just discovered today that intellij has the concept of named changesets (i.e multiple staging areas, and you select 1+ to commit).

I am still learning stgit, but I think this is what stacked patches essentially achieve. The patches can effectively be used as multiple staging areas. You can design multiple commits simultaneously and commit them independently. Here is my novice assessment of that workflow: https://gitlab.com/-/snippets/2126398

> I also want to be able to partially stage a newly created file (right now it's cut and paste part of it into a temp file)

That sounds like interactive staging (`git add -p` or `git add -i`). You can do the same in magit, in the status window by selecting the diff lines you want to stage. I use evil-mode and use visual mode for that selection. Am I missing something about your requirement?

Re: Magit 3.0

#133

Earlier quoted context omitted.

I upvoted you but... How comes Emacs is laggy for you? I'm running a beefy Emacs setup and it is really responsive. If anything Emacs in the nineties was "Eight Megabytes And Constantly Swapping" but... We're in 2021 now and now it's still 8 MB, so it's a rounding error (I'm only exaggerating a bit). It's one my lightest app: starting Emacs, eval'ing some elisp, and exiting takes... 81 ms. Eighty-one milliseconds. To…

Perhaps this is about MacOS vs Linux. I'm also suffering from slow emacs on mac, and no combination of flags seems to help. Use case: open a yaml file with syntax highlightning, scroll it with the mouse. The latency should be as low as possible.

I don't find emacs especially laggy on mac os.

Re: Magit 3.0

#134
post #6

Emacs is too laggy for me as my main editor. But Magit is so good that I start emacs up just to use it as my Git interface if I can't get by just with the CLI. Sadly there is no Vim plugin that is competitive. There is vimagit [1], but it's not on par. [1] https://github.com/jreybert/vimagit

You could give tig a try, for anything git related i use that, its an tui with vim like mappings, and very customizable

Re: Magit 3.0

#135
post #128

Earlier quoted context omitted.

> "git at the speed of thought" describes magit quite well. Not under Windows, unfortunately.

Is that magit or emacs on Windows in general?

Magit on windows needs something like libgit2, spawning processes is too slow on windows. Emacs runs fine.

Re: Magit 3.0

#136

Magit must be one of the best software tools ever written. I sorely missed it when I had to use IntelliJ for a few projects, so I wrote a TUI tool like Magit that can be used inside the console window of most IDEs like IntelliJ etc. Still haven't gotten around to releasing it properly, but it's easy to setup and works well enough to be a working MVP. https://github.com/hugit-project/hugit

You haven't touched its core code for two years, what happened? Gave it up?

Like the sibling comment says, I don't use IntelliJ much anymore. Willing to manage this repo if people are interested, though.

Re: Magit 3.0

#137
post #17
post #7

Earlier quoted context omitted.

Tried native-comp? https://news.ycombinator.com/item?id=24117853

I have, on macOS, and somehow, it has much much worse lag than Mitsuharu Yamamoto's Emacs "Mac port," [1] which is still based on Emacs 27.2. The native comp version was so slow that I gave up and switched back to Mitsuharu's port, which is snappy enough for my needs even without the native compilation bits. From what I gather, mainline Emacs was adversely impacted by changes in Mojave. [2][3] The end result, for me,…

> hoping that Mistuharu rebases his work on the native-comp

Yeah, otherwise you're not comparing apples to apples ;)

Re: Magit 3.0

#138
post #131
post #125

Earlier quoted context omitted.

I use Dart/Flutter LSP (lsp-dart) in Emacs all the time very successfully. “All hell breaks loose” sounds like maybe you have a project cloned or created but not yet `flutter pub get`’d, in which case I have seen it act like practically every token is an error.

Okay, I think I am hitting some weirdness in Dart-mode itself. But it's to do with something unrelated in my config perhaps, because now I can't reproduce this with `emacs -Q`, and my dart-mode setup itself is only `(use-package dart-mode)`. Basically even doing something mundane like C-n/C-p in a dart-mode buffer takes up a lot of memory (~800mb), which causes very high GC pressure and everything visibly stutters. H…

> gc

you could maybe try the two lines here (set the megabyte count, the third number, to your own liking): https://emacs.stackexchange.com/questions/34342/is-there-any...

Re: Magit 3.0

#139

Earlier quoted context omitted.

Those look interesting. If I understand them right they've for mailinglist-based dev where you email patches around? I prefer a model where you use a forge for collaboration, and don't rewrite shared history. However, you use rebase extensively locally. Right now I use magit with fixup. It's just more keystrokes. I want to be able to highlight a change to the workdir, hit a key and select a local commit (right now it…

> If I understand them right they've for mailinglist-based dev where you email patches around? You're right, but I think they are not limited to it. Stgit has a command to directly convert patches to commits. Quilt deals only with patches. So the patches will have to be applied to working tree before they can be committed. > I want to be able to highlight a change to the workdir, hit a key and select a local commit >…

> That sounds like interactive staging (`git add -p` or `git add -i`). You can do the same in magit, in the status window by selecting the diff lines you want to stage. I use evil-mode and use visual mode for that selection. Am I missing something about your requirement?

At least in magit, you get the error "new file ... depends on old contents" if you try to stage a hunk of a newly created file.

(i.e. echo "foo\nbar" > file, then stage only "bar")

Re: Magit 3.0

#140

Earlier quoted context omitted.

I upvoted you but... How comes Emacs is laggy for you? I'm running a beefy Emacs setup and it is really responsive. If anything Emacs in the nineties was "Eight Megabytes And Constantly Swapping" but... We're in 2021 now and now it's still 8 MB, so it's a rounding error (I'm only exaggerating a bit). It's one my lightest app: starting Emacs, eval'ing some elisp, and exiting takes... 81 ms. Eighty-one milliseconds. To…

Emacs is still (AFAIK) entirely single-threaded. If you are performing some operation that blocks (e.g. a network call, a shell command such as "git clone") all other windows are blocked until that completes. I would guess if you have something like FlyMake configured for on-the-fly syntax checking, you could also get a "laggy" feeling. Just launching and using a vanilla emacs session feels quite snappy in my experie…

magit runs git clone and such asynchronously. There's usable concurrency support in Emacs for things like network calls and external processes even though UI and pure elisp stuff is still single-threaded
Post reply on HN