GNU Emacs 26.2 is out

GNU Emacs thread

Attached: emacs.png (1170x641, 62K)

Other urls found in this thread:

github.com/mutewinter/dot_vim
twitter.com/SFWRedditGifs

First for mememacs
I noticed that cider becomes a memory hog for large projects and that debugging is slow. Any tips?
I also tried statically compiling Emacs with musl but had no luck. ideas welcome

I don't know. I compile GNU Emacs with the GNU C compiler.

I can't into it.

you suffer but why?

It works perfectly.

spacemacs is the only way to use emacs right now, the default configuration is completely retarded

I'm looking forward to using that in five years.

>any piece of software
>working perfectly
That has not been so since the day `true` stopped being an empty executable

cat >true.c

>muh it's not POSIX complient blah blah blah

Attached: massacred.jpg (474x261, 12K)

Bros, is learning Emacs difficult? I'd say I'm quite proficient with Vim, but am curious about the esotericism of the program and its supposed "ecosystem". I have a shit ton of leisure time atm; how long would a newbie take to get comfortable with GNU Emacs?

Attached: 1549685708641.jpg (600x400, 89K)

Try spacemacs, it's basically vim but better.

Since you're comfy with vim, start with Spacemacs.
Try to do everything you can in it: email, irc, rss, watching youtube and listening to music (look up emms)
Once you got them set up and comfortable, start going through the Emacs manual, learn the language and the editor internals. You'll have fun.

It's just an editor. You can use the features that you need. Or add whatever you feel is going to help you. You don't have to use it as email client / music player / window manager if whatever you use now works for you

He doesn't have to, but it's a neat exercise

Can I use GNU Emacs to run and monitor multiple Python scripts at the same time? I use PyCharm for that but it is CPU and memory hog

Attached: 0015 - 2QB5Org.png (4500x4334, 776K)

I disagree. Most of the time the emacs package for anything is worse than the alternative that you would normally use, except for maybe org mode and you just waste time configuring something to end up with subpar functionality

Yeah so how do I change styles? How about an index, citations, embedded images? This is all basic stuff, I'm sure an editor this advanced can do it with ease.

It's pure correct C89.

You mean in latex? There is auctex package for it

>download this meme because autists will not shut up about it
>try the tutorial
>this thing is telling me with a straight face that I should be using 2 keys to literally perform the exact same functions as the arrow keys do
YIKES! Immediately uninstalled this trash right after that.

first for neovim

Regarding Vim and Emac's text editor, what does Emacs actually have to offer? Is all the buzz about Emacs only because it can be extended outside of the editor? If I only cared about which text editor was better, AFAIK, Emacs would be irrelevant.

Attached: 1551484972238.jpg (569x400, 86K)

Not him but my Auctex is malfunctioning recently.
It makes my whole emacs unresponsive.
The issue somehow disappeared when updating to the new emacs version. Or maybe I'm just lucky.
Also I somehow can't wrap my head around narrowing the buffer to a section for distraction free editing nor automatically collapsing (hiding) those giant verbose tikz figures.
Other than that, auctex + reftex is top comfy. Toc navigation is the goat way too navigate

Attached: 11487486867187.jpg (311x362, 18K)

Yeah, stock emacs is garbage. Though once you get comfy with the emacs bindings, vim becomes heresy.

I strongly suspect POSIX was made to condemn the world to yet more decades of UNIX braindamage.

Should I read the Unix hater handbook?

Attached: 1554831242267.gif (540x603, 188K)

Personally, I like breaking up my latex projects instead of having a single .tex. The main file has the preamble and begin/end documents then inputs each section which is in its own tex file in ./sections tikz figures are in ./figures and tables in their own subdir. This keeps whatever I’m corrently working on clean and focused.

Emacs isn't like vim where they do things through key chords, which is basically fighting game combo attacks. As far as I know, there is no single key commands, so you type as is. Also emacs has a hard on for Ctrl key or Alt key combinations. Elisp is really cool, which is why emacs is the better program than Vim.

What's wrong with
touch true
chmod +x true

Bloated. You need an interpreter to run it.

It's not difficult at all, but it will take a few days to get used to.
You don't have to give up Vi keybindings: vanilla Emacs already includes Viper mode, but you're better off installing Evil mode, which is much better, and offers a near-perfect Vim emulation.
If you decide to use the default keybindings, however, make sure you map modifiers to a more comfortable position. No, swapping Caps Lock and Ctrl is a suboptimal solution.
Look at pic related. Notice how modifiers are placed. The most used ones are close to the spacebar, easily accessible with your thumb, while the others drift further and further apart.
What I do on "standard" keyboards is swap left Ctrl with left Alt, and leave the right side unchanged. That way, I can press both Ctrl and Alt with my thumbs, avoiding any awkward pinkie stretch and overall feeling very comfortable when working in Emacs, even with the default keybindings.
I actually came to like them after remapping my modifiers this way, but I'm planning on making my own keybindings.
I'm thinking about using WASD to move, like in gayms, but I'm not sure yet.
That said, keybindings aside, Emacs is objectively better software.
Not only it's much more extensible, thanks to a much better language which most of the program itself is also written in, it also takes full advantage of GUIs, unlike GVim, which is really just a window with an embedded terminal.
If you don't like using internal panes, for example, a single Emacs instance can spawn multiple windows which you can manage with your window manager, for example. I use Xmonad and that's what I do. Notice that this is different from using daemon+client.
It's well known that Emacs does a lot more than merely editing text, but more often than not, this additional functionality proves useful, as it's much more closely integrated with your text editing tasks.
If you religiously uphold the Unix philosophy, don't bother. But if you try it out with an open mind, Emacs may surprise you.

Attached: 1526014517822.jpg (1024x768, 154K)

Yes. Mind you, there is some bullshit too, but was refreshing to see some bashing on Unix instead of the usual worship it receives.

The really good things about Emacs are not so much related to text editing itself: is the way it integrates text editing with complementary tasks that makes it great.
For instance, do you program in any language that offers a REPL? Emacs makes interfacing with it from your session incredibly easy, to the point that you can write code in your editor and IMMEDIATELY run it with a single key combination, saving the environment each time and being able to rewrite the program itself as it runs.
Now, sure, Emacs is not the only way to achieve these things. But no other program does it as easily as seamlessly.

I wonder how they made spacemacs if you can't change the default config.

Just write an optimizing compiler for the subset of sh which only has
touch true
chmod +x true

compile it for windows already,msys version is not the same

You don't like my 3 lines C code to implement true?

just start with org mode for your task management, and use any keybindings you find sane. if you use vim just install evil emacs

org-mode is easy to start with, just a hierarchical file like
** Computer Stuff
*** TODO use emacs
*** TODO try org-mode for tasks

and you can start with very basic todo list as a master tasks reference. then you can get into time stamping, deadlines, scheduling, habits, etc for tasks and tags, custom agenda views, etc

I don't believe in the C language.

emacs can do everything vim can do, the same can not be said for vim. emacs contains vim's functionality, but the converse is not true.

>inb4 "vimscript is turdnig complete" argument

and elisp >>>>>> vimscript

>rubout
Lewd.

>3 lines of code to implement a trivial program
Lisp doesn't have this problem.
((λ () true) true)

You need an interpreter to create it but do you need one to run it?
and as far as bloat is concerned, your C example comes in at about 13K, while touching a file has size 0.

Look at my true and false generator.
#include
#include

#include
#include
#include

#define LENGTH(a) (sizeof (a) / sizeof ((a)[0]))

static char *const cfile = "test.c";

static char *argv[] = {
"gcc",
"-std=c89",
"-pedantic",
"-Wall",
"-Wextra",
"-Werror",
"-Wfatal-errors",
"-Ofast",
"-o",
"",
cfile,
NULL
};

struct config_t {
const char *ret;
const char *prg;
};

static const struct config_t configs[] = {
{ "SUCCESS", "true" },
{ "FAILURE", "false" }
};

static int write_file (const struct config_t *conf) {
FILE *f;
f = fopen (cfile, "w");
if (f == NULL) {
fprintf (stderr, "can\'t create %s\n", conf->prg);
return -1;
}
fputs ("#include \n", f);
fputs ("\n", f);
fputs ("int main (void) {\n", f);
fprintf (f, " return EXIT_%s;\n", conf->ret);
fputs ("}\n", f);
fclose (f);
return 0;
}

static int compile_file (const struct config_t *conf) {
pid_t pid;
pid = fork ();
switch (pid) {
case -1:
fprintf (stderr, "fork failed\n");
return -1;
case 0:
argv[9] = (char *) conf->prg;
execvp (argv[0], argv);
fprintf (stderr, "exec returned\n");
exit (EXIT_FAILURE);
default: {
int status;
wait (&status);
if (!WIFEXITED (status) || WEXITSTATUS (status) != EXIT_SUCCESS) {
return -1;
}
}
}
return 0;
}

int main (void) {
size_t i;
for (i = 0U; i < LENGTH (configs); i++) {
const struct config_t *conf;
conf = &configs[i];
if (write_file (conf) != 0) {
return EXIT_FAILURE;
}
if (compile_file (conf) != 0) {
return EXIT_FAILURE;
}
}
remove (cfile);
return EXIT_SUCCESS;
}

Attached: girl-at-computer.png (400x246, 147K)

>inb4 "vimscript is turdnig complete" argument
It's true, though. But I agree that it's a shift argument, and you know why? Because it would be horrible and painful to reimplement emacs in vim.
So conversely, if you wanna use vim, why reimplement it in emacs?

Alright now how many lines of code are needed to bootstrap the interpreter and actually run this code

Start with Spacemacs.

Yes. Emacs and Vim+tmux can both be fantastic Python environments.

Alright so spoonfeed me this please.

I know and like vim (specifically neovim for the last year or two). I use, and will use, it for C, C++, shell script, Python, Haskell, and maybe web development too occasionally if I can't avoid it (PHP/JS/HTML+CSS/all that suffering). I don't currently use it, but would like to, for Latex. Finally I take ascii notes sometimes, sometimes I do some sort of markdown.
My biggest issue with vim is the lack of a good, semantically aware completion engine. I used IntelliSense a long while ago in VS2008 or something and it was fantastic. But even more basic completion is often weird. Currently I'm using deoplete.

Say I install Emacs right now. What packages should I look into for the stuff I want? What are some resources I should read or concepts I really need to research? Can I get good, quality completions and utilities (linting, error highlighting, integrated REPL/debugger as applicable) for all the languages I listed?

Keep in mind it was written about proprietary unices circa 1994. Modern GNU/Linux and BSD (and Haiku) solve most of the problems therein.

You don't need an interpreter to run this code. Just call
(disassemble (λ (x) 0))

in any lisp implementation (say SBCL) with a disassemble function to generate machine code for your `true` program.

I do this to for large docs like a thesis. But not within a chapter of for s paper

@70534784
@70534786
@70538874
>Spacemacs

Attached: remi_yuck.png (551x491, 261K)

You should be banned.

Vim is a great editor which suffers from poor extensibility. Have you ever noticed how every significant vim plugin feels like a hack?
On the other hand, emacs is an extremely extensible program with an RSI-inducing editor. So if you like vim but don't want to deal with a hacked-together collection of plugins then it makes a lot of sense to use vim emulation in emacs.

Spacemacs has experimental support for an EXWM layer. Going straight from tty/dm into Emacs and embedding other X11 programs like a browser, a PDF viewer, mpv, or a better terminal inside is magic.

>It's true, though.
Listing off true statements isn't always relevant in a discussion.
>if you wanna use vim, why reimplement it in emacs?
Because it's comparatively trivial to do and you gain a good editing scheme.

>if you wanna use vim
Nobody wants to use vim, not even vim users. Some of them just confuse vim with vi and think they're using ""minimalist"" software.

That's true but vim doesn't need a lot of plugins. I think that's part of the problem: people who do things like this github.com/mutewinter/dot_vim aren't using Vim right, and they'd really be better off with either emacs or more likely an actual, heavy IDE with a vim keybinds plugin. In reality, vim's biggest flaws are its default configuration, and perhaps lacklustre OotB completion. Maybe a few things can be configured to preference - if you want your git status in your statusline, you do you - but if one finds themselves installing dozens upon dozens of plugins, they should really rather ask whether they really need most of this stuff or whether it just looks kinda cool but won't actually be useful at all. And, again, consider a different IDE instead.

Modal editing is just one aspect of vim, though. You were talking about how emacs is a superset of vim and can reimplement it in its entirety.
If we're talking just about keymapping, I am fairly certain copying the emacs scheme would be pretty trivial (just stay in insert mode forever, disable keybinds to enter normal mode, and add the emacs keybindings to insert mode).
True, most people these days want to use neovim

>Modal editing is just one aspect of vim
Modal/vi-style editing is the only good aspect of vim and it's not even vim-exclusive, whereas emacs' extensibility is unmatched by any other editing program. The only reason any sane person would use vim/neovim over vi or emacs is if they're already deeply invested or just don't know any better.

>talking about how emacs is a superset of vim and can reimplement it in its entirety
I don't see that anywhere in the posts you replied to. Someone just pointed out how it has the entirety of vim's functionality, and how the converse isn't true. Nobody cares about writing a vimscript interpreter to ""reimplement"" "vim in its entirety". That's about as autistic as claiming how they're equivalent because of a result in CS, when what we're discussing only concerns engineering, not CS.

>apt install emacs

You should compile it yourself.

I waste enough time with tweaking autism as is

Is there a Jow Forumsmacs book?

Not necessarily a vimscript interpreter - he said "functionality". That means stuff like the ed-like commands, all the minor shit like visual mode or marks or whatever, etc.

Yeah, all of that is included in his statement of how it has at least the same functionality as vim. Nobody would use it if you couldn't do basic things in it.

Emacs is bloated af.
Vim is the best editor.

Attached: bestEditor.png (1200x1202, 106K)

Emacs is bloated af, use Vim instead

install gentoo

>muh software minimalism
>uses a web browser with png support

I use w3m, bitch

"Eight Meg and Continuously Swapping" trololo
This meme was true when compared to vi
Vim is actually more bloated than emacs.

lies

Give me your org capture templates

Attached: peekaboo.png (1280x720, 997K)

Vim is bloated and harmful af, use Plan 9's acme instead.

Attached: 1429581050322.jpg (1936x2592, 661K)

exwm is already a thing outside spacemacs
it's not the greatest though, I prefer to use stumpwm

>he's still on emacs 26
>not running the bleeding edge of master branch
(setq org-capture-templates
'(("t" "Todo" entry (file org-file-tasks)
"* TODO %?\n %i\n %a")
("r" "refile todo" entry (file org-file-refile)
"* TODO %?\n")
("g" "refile" entry (file org-file-refile)
"* %?\n")
("j" "Journal" entry (file+olp+datetree org-file-journal)
"* %?\nEntered on %U\n %i\n %n" :empty-lines 1)
("l" "Log" entry (file+olp+datetree org-file-log)
"*
Entered on %T by %n
%^{mood|good|bad|ok|angry}
%^{brainfog|none|mild|severe}
possible cause of brainfog:
- %?
other thoughts:
-
" :empty-lines 1)))

Attached: 1555133167844.jpg (480x360, 20K)

>browser, a PDF viewer, mpv, or a better terminal inside is magic.
Why does anybody want this bloated shit in their text editor?

I also don't understand why some anons want to have a bloated text editor

>text editor
He's talking about emacs, not about a "text editor".

Why is there no good program for people that just want a text editor? Vim is bloated, bogged down with legacy nonsense, is not extensible and has really primitive autocompletion. Emacs is an operating system. You'd think programmers would create something good since we deal with plaintext all day.

w3m is bloated. Use curl instead.

What's the Tim Pope of emacs

>NOtepad++

>You'd think programmers would create something good since we deal with plaintext all day.
It's called emacs.

neck yourself

Attached: neckurself.jpg (736x1012, 57K)

It's called ed which is the standard editor

Why is this allowed

Attached: 2019-04-13_22-05-21.png (635x139, 5K)

sudo is harmful, use doas instead.

flycheck for linting/error(and warning) highlighting.
company and irony (company, company-c-headers, company-irony, irony) for c/c++ completion engine (shows suggestions on how to finish what you're currently writing).
yasnippet for some fancy completion (like typing mainTAB to get the full main function typed out in C/c++ etc).
magit is great for git.
latex-preview-pane is great for latex.
I personally like to use telephone-line as it integrates with alot of other packages very well and looks better than the default mode bar.

main(){;}

it comes with a bunch of optional libraries that are dynamically loaded when needed

Ok so should I go balls deep with spacemacs or try to autistically figure out my own? Like another post itt says loading a billion packages in vim defeats the purpose, and I would never even consider some premade "config" with nearly 100 packages, but emacs seems to be different and instead embraces extensibility.

Emacs has actual documentation and it's also self-documenting.
just run `info emacs`. If you know how to read you won't have issues.

By the way, the info reader which hosts the full documentation of anything that has full on-line documentation available on a GNU system was originally part of emacs and was only later ported to a unix program. The full documentation reader for your operating system comes from this editor.

How long until it gets multi threading

problem with stumpwm is that it's a common lisp program and its the ONLY use i have for common lisp

otherwise its more stable than exwm, yeah.