News for hackers. Stuff that matters.
Re:Sorting in Emacs by tom_ on Saturday August 12, 2023 @09:01AM (#37099744)
Org mode is recommended if you have tabular data, in case there are any Emacs users that still haven't tried it. (Which might sound ridiculous - but who knows? I still haven't used magit! I've been using Emacs since 2006.)

You can sort the table using M-x org-table-sort-lines.

(Org mode tables, while simple plain text, are very readable. Anybody not using Emacs is going to find them tedious to edit though.)

Re:Sorting in Emacs by jolux on Saturday August 12, 2023 @09:18AM (#37099875)
Go use Magit! Probably my favorite part of Emacs.
Re:Sorting in Emacs by itsmartapuntocm on Saturday August 12, 2023 @10:00AM (#37100255)
It’s my favorite git client altogether.
Re:Sorting in Emacs by jolux on Saturday August 12, 2023 @10:37AM (#37100619)
yeah, I keep Emacs open just for Magit even when using other editors.
Re:Sorting in Emacs by User23 on Saturday August 12, 2023 @12:44PM (#37101943)
Magit revolutionized my git workflow. Rebase went from being a chore that I put off to easy peasy. My coworkers think I'm some kind of git wizard.
Re:Sorting in Emacs by Conscat on Saturday August 12, 2023 @01:57PM (#37102628)
For me, being able to go straight from a selection in a code file to a log of all changes to that specific code, which I can then filter further, is what gets the strongest reactions from my coworkers.
Re:Sorting in Emacs by lordgrenville on Saturday August 12, 2023 @02:24PM (#37102847)
TIL magit-log-buffer-file...
Re:Sorting in Emacs by Conscat on Saturday August 12, 2023 @02:42PM (#37103007)
It's unfortunately hidden because it has no default keybinding iirc, but I love this feature. I think I discovered it by wondering if it exists, so I searched through the M-x candidates with orderless and typed in terms that I guessed could be part of the right name.
Re:Sorting in Emacs by duckerude on Saturday August 12, 2023 @02:56PM (#37103136)
C-c M-g l gets you there. (C-c M-g leads to a submenu that also has blame.)

Until this thread I didn't know it could also do regions.

Re:Sorting in Emacs by lsowen on Saturday August 12, 2023 @02:12PM (#37102743)
What?! How do you do this? I love magic but haven't discovered this.
Re:Sorting in Emacs by mbork_pl on Saturday August 12, 2023 @03:14PM (#37103291)
WHAT!? You can use M-x magit-log-buffer-file with an active selection and see only the changes to the selected portion? This is so obvious in hindsight and so cool... Thanks a million!
Re:Sorting in Emacs by Robdel12 on Saturday August 12, 2023 @01:06PM (#37102161)
It’s literally the reason that keeps me in emacs, honestly.
Re:Sorting in Emacs by abdullahkhalids on Saturday August 12, 2023 @02:30PM (#37102913)
Anyone with a recommendation for a magit tutorial? Thanks
Re:Sorting in Emacs by poidos on Saturday August 12, 2023 @03:24PM (#37103383)
The documentation is very good. The Getting Started[0] page has all you need for basic operations. I haven't watched this particular video[1], but Prot's other Emacs content is great.

[0]: https://magit.vc/manual/magit/Getting-Started.html

[1]: https://www.youtube.com/watch?v=2-0OwGTt0dI

Re:Sorting in Emacs by abdullahkhalids on Saturday August 12, 2023 @04:07PM (#37103780)
I watched the video. It is quite informative. The best thing about emacs videos are they creator is that all the keycommands show on the screen by default. Arguably one of the slickest features in emacs.
Re:Sorting in Emacs by rubicks on Saturday August 12, 2023 @04:18PM (#37103881)
I definitely tried and it definitely didn't work for me because something something ~/.Xdefaults or whatever.

But I hear good things.

Re:Sorting in Emacs by drunkpotato on Saturday August 12, 2023 @09:17AM (#37099858)
org-mode tables are great. So is magit, I highly recommend it! I'm comfortable with command line git, use it quite a lot, but I also use magit a lot, and magit is especially great as a much better `git add -p`.
Re:Sorting in Emacs by mbork_pl on Saturday August 12, 2023 @10:51AM (#37100771)
> org-mode tables are great

True, though they tend not to be very fast when they grow. (I have a table with almost 2000 rows and editing it lags a bit.)

Re:Sorting in Emacs by zelphirkalt on Saturday August 12, 2023 @07:25PM (#37105128)
I found that keeping tables narrow (not too many characters per line) helps. I try to build my tables so that most of the logic (I do spreadsheets with them) is oriented towards more rows instead of more columns.

However, I've not had 2000 lines tables yet. Perhaps a good trick is to divide them into multiple ones? Perhaps one for each category of things, if you have any different categories.

Re:Sorting in Emacs by kqr on Saturday August 12, 2023 @11:33AM (#37101210)
If anything, magit made me more comfortable with command line Git, by helping me discover things (--force-with-lease) and grok concepts (history editing) that I otherwise would not learn as quickly.
Re:Sorting in Emacs by pxc on Saturday August 12, 2023 @02:18PM (#37102786)
> magit is especially great as a much better `git add -p`.

In Git, except for when adding new files, I always use `git add -p` to stage changes. And it's definitely the number one thing I do with Magic in terms of frequency. I can confirm that if you're an `add -p` kinda person, you'll love Magit.

Re:Sorting in Emacs by pkkm on Saturday August 12, 2023 @04:05PM (#37103758)
If you use both git and Emacs but not magit, you're missing out. It's so good that it makes me keep Emacs open even when I'm using another editor or an IDE. These days pretty much everything has basic git integration, but few interfaces can match magit at doing non-trivial operations conveniently. With magit, it only takes a few keystrokes to selectively commit some changed lines, reword a past commit, do an interactive rebase, or use the reflog.