[ / / / / / / / / / / / / / ] [ dir / film / gdp2083 / imouto / leftpol / maka / sw / tijuana / vore ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.838331>>839531 >>839896 [Watch Thread][Show All Posts]

http://www.myrkraverk.com/blog/2017/12/xemacs-sorting-key-value-lines-by-value/

A whole lot of ramblings and totally unnecessary code when you can just

sort -n -k2 -t: $file

 No.838337

It's ten lines of code that provide their own implementation, meaning you can adjust the behavior in any way you want and that it works anywhere Emacs is supported, even MS-DOS.

A lot of similar use cases are already fulfilled by the built-in functions sort-fields, sort-columns and friends.

Of course you can also enter your external sort command by selecting the text and pressing C-u M-|. Emacs knows how to use external processes. It's very flexible.


 No.839531>>839666

>>838331 (OP)

>XEmacs

>not using SXEmacs

Seriously bud?


 No.839586>>839601

m-x sort-fields


 No.839601

>>839586

Did you read the comment on the blog? Apparently his "real world data" has spaces in the keys.


 No.839653

I use C-u M-| a lot with sed/sort/expand actually. I spent too much time learning sh/awk so I can't go back now.


 No.839666

File (hide): 0bd10e4d939698d⋯.jpg (694.2 KB, 1543x1200, 1543:1200, stallman-sex.jpg) (h) (u)

>>839531

>SXEmacs

>not SEXmacs

Seriously nigger?


 No.839896>>840904

>>838331 (OP)

I thought xemacs was dead? Didn't they announce it was discontinued around last December?


 No.840904

>>839896

emacs has been virtually the exact same thing for many years though, who cares

would most people notice if they were using a 10 year out of date copy of emacs? no


 No.840950>>840953 >>840958

Get a real text editor, son.

:sort /[^:]*:/


 No.840953

>>840950

Does that sort in lexicographical or numeric order?


 No.840958

>>840950

Numeric if you use `:sort n /.../`.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
11 replies | 1 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / film / gdp2083 / imouto / leftpol / maka / sw / tijuana / vore ][ watchlist ]