Gnu Emacs General /geg/

Let's try this out edition

>Wiki
emacswiki.org/
>Manual
gnu.org/software/emacs/manual/emacs.html
>Tutorials
C-h t (Interactive Tutorial)
gnu.org/software/emacs/tour/
tldp.org/HOWTO/Emacs-Beginner-HOWTO-1.html
ergoemacs.org/emacs/emacs.html
youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n (general introduction)
youtube.com/playlist?list=PLVtKhBrRV_ZkPnBtt_TD1Cs9PJlU0IIdE (org-mode)
>Self Documentation
C-h k (Keybinds)
C-h f (Functions)
C-h v (Variables)
>Programming in Elisp
gnu.org/software/emacs/manual/eintr.html
ergoemacs.org/emacs/elisp.html
github.com/bbatsov/emacs-lisp-style-guide

>Packages
melpa.org (package repo)
pastebin.com/KUAbRwJR (short list of recs)
github.com/emacs-tw/awesome-emacs (the big list)
>Premade Distros / Configs
Make your own
github.com/hlissner/doom-emacs/tree/develop
github.com/syl20bnr/spacemacs (heavy)
github.com/snackon/Witchmacs (Basic config with sane defaults)

>Muh Startup Time
use-package defer
pastebin.com/mrPsnUas (increase GC during startup)
emacswiki.org/emacs/EmacsAsDaemon
emacswiki.org/emacs/EmacsClient

Attached: emacs2.png (256x258, 33K)

Other urls found in this thread:

github.com/abo-abo/lispy
ftp.lispworks.com/pub/software_tools/reference/HyperSpec-7-0.tar.gz
github.com/rosbo018/q4
github.com/davexunit/yon-chan
mswift42.github.io/themecreator/
github.com/zx2c4/password-store
github.com/NicolasPetton/pass
github.com/ecraven/ivy-pass
github.com/emacs-helm/helm-pass
github.com/walseb/espy
twitter.com/SFWRedditVideos

First for we need to make a Jow Forums-mode so I can shitpost here directly from emacs

use vim faggot

top geg
cant you just run firefox with Jow Forums-x in exwm?

I could but firefox isn't a part of emacs and having a Jow Forums major mode would be cool. I'd like to shitpost right from emacs itself.
I already am, while calling it evil in emacs of course :^)

Attached: 1244837842829.jpg (480x480, 65K)

Biggest issue would be the captcha. You can use eww to post on lainchan (which has no captcha), but on Jow Forums i dunno how we could work around the google captcha

Simple, we burn down google

That's what I'm thinking as well. There are 2 options to tackle this problem. The first would be finding a way to solve those captchas from emacs. This would probably be pretty hard but if we succeed we might as well make a separate package for the captcha so more people can use it. The second option would be to require Jow Forums passes, however that would be pretty gay tbqfhwy so that should be a last resort.

Attached: d4b27ce3d9ed3ca2206ed67fde9b5a7970110e63.jpg (1000x1000, 64K)

Then again, a few bucks per year is a small price for never having to leave Emacs.

Oh fuck yes, a thread for my people.

Who else /doom/ here?

Attached: doom-emacs.png (1532x944, 197K)

A few bucks isn't the problem. The problem is that it's pretty gay to give them to hiro.
Own config right here. But if you tell me what the best parts of Doom are I'll steal them shamelessly for my own config.

Attached: d35bec2887fbc229eab6db0ce52ff2eb0e78cb85.jpg (371x353, 13K)

hey /geg/

Attached: IMG_20190602_130438.jpg (3456x3456, 2.76M)

>using a premade config

Attached: auctex.jpg (1049x677, 112K)

Best IRC client for emacs?

>vimuser.org
No thanks.

Is is me or in the last years Emacs is getting much more attention?

Best guys finish last ;);););););)

Wtf does this have to do with what I said?

i'm too lazy to organize my init again, it got messed up a bit

My nibba needs to use use-package

ido.

I prefer ivy

use-package is worthless with its meme syntax

good luck moving your config to a new machine

It moves pretty fine, what's your point?

Yep. Henrik Lissner is the perfect balance of autism and talent.

Attached: maxresdefault.jpg (1280x720, 45K)

Evil/vim is worthless when editing lisp code. Something like paredit/smartparens/lispy is much better.
There should be something like it for other, C-like languages. Treating code like code, not text.

>meme syntax
It's regular old Common Lisp syntax. What's your point?

>implying you can't have both at the same time

You are right, you can. But I think a great part of evil/vim's functionality overlaps to that of those other packages. That's why I prefer the more minimal Emacs' defaults (kill-word, backward-kill-word, kill-line, etc.).

My point is that there's no reason to introduce a third party package to manage your packages/configuration. Sure he plans to merge it to core but good luck with that.

i need this so much

That's a fun opinion you have there.

i like the bar with the nice lsp integration and the theme

>"meme"
Opinion dicarded.

>got conned into using a `with-eval-after-load' wrapper

I don't organize my init really. I just throw in a ;;; heading for whatever package or general setting for the thing. The only thing I'm worried about is when sections start getting very large, like my ;;; My Functions heading I have, it might keep growing larger and larger as I write my utilities. It might be worth splitting that into its own file. But then again I can just collapse everything nicely with lispy (pic-related). How do you guys keep organized?

Attached: emacs.png (1594x872, 93K)

Does lispy let you do that? Nice.
I did the same with Org babel. It's really no use to split it in different files.

Yup, shift+tab to expand or collapse everything, press j and k to go up and down between headings, press i to expand and collapse a specific heading. It's damn comfy.

Does Lispy work on other non-lisp languages?
I'm willing to try one of these big code editing packages but I would only use it for Emacs Lisp. I would love something similar for C or even Org mode. By something similar I mean a more or less modal editing package (it is modal depending on the position of point). I would like it being universal.

Lispy works mostly thanks to the nature of Lisps, that being s-expressions. I don't think this sort of thing can be universal. Lispy currently supports Racket, Scheme, Clojure, Common Lisp, and Hy, and apparently some non-s-expression languages: Python and Julia.

github.com/abo-abo/lispy

I guess you are right. I just kind of feel awkward using the vim keys now that I've settled on using Emacs without Evil.

I love the semi-modal nature of lispy since I get short keybindings (j, k, etc) without losing normal emacs keybindings. Also, there is nothing wrong with using Evil :)

>How do you guys keep organized?
minimal init.el with 1 giant org file for configuration

I am just kind of "forcing" myself to use Emacs defaults without Evil. I like the idea of them being universal (dired, emms, etc. modes use the "f", "b", "n", ... keys) and I also want to keep a more or less minimal config.

I am liking Lispy so far. It really is extensive! I can see a lot of it's functionality making sense in other, different C-like languages or even Org mode though. I hope someone someday implements a universal editing model (obviously adapted to each language and language family), semi-modal and that treats code like code and not like text.

I would happily use Lispy for programming in C (if it where adapted to it).

You can change the keys to Paredit ones:

(lispy-set-key-theme '(special paredit c-digits))

Thanks for the tip! I wonder why does it have those 3 values though.

That's to retain the extra key bindings when you put your point over a paren (like pressing 'e' to evaluate etc.). The README explains it a bit more.

Thanks, I'll check it out. Btw, could it be that that function needs to be evaluated before loading Lispy? It doesn't take effect.

use-package already makes things pretty organized

Attached: 2019-06-27_13-55.png (568x688, 81K)

After loading lispy

What's this on your modeline? Some kind of git/file-state indicator?

Attached: scrot.png (49x20, 433)

I don't like to leave Emacs while I'm in a heavy programming session, which I usually do in Common Lisp, so this is for the CL users out there. Download the hyperspec from ftp.lispworks.com/pub/software_tools/reference/HyperSpec-7-0.tar.gz I extracted mine to ~/.emacs.d but you can adapt the code to where you want it. This just changes the hyperspec root to the local copy and modifies three of the slime documentation lookup functions, C-c C-d h, C-c C-d #, and C-c C-d ~, respectively, to use EWW so you stay inside emacs.

(setq common-lisp-hyperspec-root (concat "file://" (expand-file-name user-emacs-directory) "HyperSpec/"))

(defun user/browse-clhs-with-eww (original-fn &rest args)
(let ((browse-url-browser-function 'eww-browse-url))
(apply original-fn args)))

(mapc (lambda (fn)
(advice-add fn :around #'user/browse-clhs-with-eww))
'(slime-documentation-lookup
common-lisp-hyperspec-lookup-reader-macro
common-lisp-hyperspec-format))

Ivy or Helm?

Attached: 1556816730948.webm (480x480, 2.54M)

flycheck

Why not both?

No one man should hold all that power.

Attached: 1559279258897.jpg (435x571, 48K)

something already exists
github.com/rosbo018/q4

Ivy, but the default minibuffer read is good for most cases.

I'll save your thread from page 10 guys

So I was thinking of getting into Emacs because Vim is somewhat more opaque to customize, and I'm no longer fine with the default control scheme.

Question is, how do I make evil visual selection (region?) work "normally", ie how it works in default Emacs, where it doesn't include an extra character on the right into the selection? I'm fine with editing evil source code, I just can't find the place where the region gets expanded one character to the right.

ways to safely manage your passwords on Emacs?

looks like it was done before but it's abandoned

github.com/davexunit/yon-chan

but I like my penis

wait, can you do that with lispy? I use outshine, a dirty hac- I mean a package who uses outline-mode and add some nice stuff.

I use org-babel for my init.el

yeah bro lispy does it all

gpg-encrypted org file

>managing your passwords on a device attached to the internet
kek

Attached: 14259-200LX_2813_base.jpg (2160x1438, 213K)

delete-selection-mode IIRC

Daily reminder to remap your keys:
remove mod1 = Alt_L
remove mod4 = Super_L
remove control = Control_L

add mod1 = Super_L
add control = Alt_L
add mod4 = Control_L

keycode 0x12 = 9 bracketleft
keycode 0x13 = 0 bracketright
keycode 0x22 = parenleft braceleft
keycode 0x23 = parenright braceright

Is there a tool to make my own themes?

mswift42.github.io/themecreator/
it can export the theme you made as an el file for configuration. would be nice to have in the op pasta.

That's an intended feature of evil, since in vim text objects like w, aw, and ap include a space after them. If you don't want the space use e, iw, ip, etc instead.

M-x customize-create-theme is all you need

github.com/zx2c4/password-store
github.com/NicolasPetton/pass

github.com/ecraven/ivy-pass
github.com/emacs-helm/helm-pass

based, thanks

is this safe?

as long as you don't give your secret key to anybody, it is. i have an alias for something like that. got inspired by something i saw on a lainzine.
note() {
tmpfile=$(mktemp)
gpg --yes -o "$tmpfile" --decrypt "$HOME/docs/notes"
emacs -nw "$tmpfile"
gpg --yes -ar "" -o "$HOME/docs/logs/notes" --encrypt "$tmpfile"
srm "$tmpfile"
}


[[emacs newb here]]
what is the sidebar package?
how can i contract my parens like that?

nice, I am trying this

github.com/walseb/espy

it like you said but with fast access without opening the file (you have to open it only when you want to input new passwords).

>how can i contract my parens like that?
evil-mode comes with a fold functionality, it works for anything that has an opening/closing character, even html tags

I keep coming back to emacs to try it, but something always ends up fucking up and infuriating me and I rage quit. at the moment, I'm trying doom-emacs, and whenever I type text and hit space, it goes to the beginning of the buffer

I would like to suggest you to:
>complete the emacs tutorial
>install better-defaults.el
>customize
>themes, electric mode, etc
>start turning it into an environment of your own
You can get a LOT of resources just from the OP, if you need something else, search and ask about it and you can find bits and pieces of code you end up taping together until you acquire more expertise to organize it.

>complete the emacs tutorial
>install better-defaults.el
>customize
>themes, electric mode, etc
>start turning it into an environment of your own
I think the problem is that I want all "the good shit" that makes emacs good, but it ends up having too many minor modes or whatever enabled at once and ends up stealing my focus or going modal silently and I can't figure out what my text input is being fed into... I think I will try again from a vanilla install.

Please do, user. What makes emacs good is it's customization power, being able to make it YOUR text-editor.
When I came from vim, people suggested me spacemacs because gud evil-mode, but I found it really hard to understand what I was doing and what was going on. Instead I started trying to learn the default emacs bindings and started getting the hang of it that way. I personally think that learning since the base and then installing packages when you actually know why to use them is much better than diving head-first into custom emacs builds.

Is there no good built in way to swap modifiers only in emacs?

Attached: 1533692550401.jpg (719x719, 226K)

Anyone using Julia?
Is ESS the best way to /Julia/ in emacs?
I want to do something like the Matlab ide. A script window. A repl window. Easily send the script to the repl. Easily keep track of the defined variable and clear the workspace.

Emacs is not an operating system, so no.

i want to start doing this, but i'm on spacemacs and it's my first week. pretty impressed actually

press escape v

Can someone explain to me the difference between ido, helm and ivy? All I know is that they do completion, I'm new to this shit.

I tried doing that but in the end my hands hurt. So I installed Evil.

ido is emac's built in completion. It does what it says, but lacks fancy features like incremental completion, fuzzy search, ripgrep integration, etc.

Helm is the big completion monster, full of features although arguably bloated.

Ivy takes a more modular approach, and consists of a suite of three plugins. Ivy (the core), Counsel (completion replacement for emacs commands), and swiper (search buffer text).

What you prefer is anyone's guess.

I would advise you to keep using Spacemacs for some more weeks for it has great discoverability and you'll see what Emacs is capable of. Then go for vanilla Emacs. Do the tutorial (it's brief, ~1h or less). Install a couple of essential packages (IMO: use-package and ivy). Then try to use as much built-in functionality as possible. Besides all the great modes (Org, Dired, etc.) Emacs has a lot of really useful built-in commands that a lot of people don't use because they use worse (in terms of functionality and power) third-party equivalents. Some of these are 'occur', 'imenu', 'set-selective-display', etc.

It is true that RSI is a thing for some users, but it is much less common than what you'd think by looking at online posts. But yeah, I, like you and many others, find that using the Ctrl key that much is uncomfortable. A solution would be to remap the commands within Emacs but I actually prefer to swap the Ctrl key with the R-Alt key at a OS level (in Linux and Windows it's very easy to do). Then you are more comfortable with Emacs and all the other programs with just a simple change.

Thanks, gonna try them

To add something more: A good thing about Emacs base text-editing commands (C-f, C-b, etc.) is that they are universal in terminals. Most terminals use them too.
But something that is even better is this: you can use them everywhere if you want. At a OS level (I do it with EXWM 'input-simulation-keys', but you can do it using something else, you don't need Emacs' WM).
I have these mappings:
C-f: right arrow
C-b: left arrow
C-i: TAB
C-m: RET
C-a: HOME
C-e: END
C-v: PgDOWN
M-v: PgUP
M-f: C-right arrow (next word)
M-b: C-left arrow (prev word)
M-backspc: C-backspace (kill prev word)
M-d: C-right C-backspace (kill next word)
(and some more)

And obviously, a command to enable-disable these keys (since you may need them in some programs).
This mappings + having Ctrl swapped with R-Alt is incredible experience. I am using these key bindings while typing this text in Firefox. It feels so natural and fast, it is like I'm still inside Emacs.

I suggest ivy + counsel. Counsel has a lot of great commands to substitute the default ones (e.g. 'counsel-switch-buffer', 'counsel-M-x'. You don't actually need 'swiper' though, I find the built-in 'occur' is better.

Spacemacs and Doom emacs have lowered the barrier to entry.

I probably would not have switched from other editors quickly if it wasn't for spacemacs. I remember I tried vanilla emacs and it just felt like a mountain to climb. Spacemacs is ready to go out of the box, very comfy and adhd-friendly.

Damn you are right, it makes a lot of sense. Out of curiosity, did you stick to Spacemacs or have you changed to vanilla?

I think that Emacs maintainers should learn from this. Emacs should be newcomers-friendly by default.

>Out of curiosity, did you stick to Spacemacs or have you changed to vanilla?
I'm still on spacemacs. At first, when I got started, I thought that spacemacs was the noob way and I might as well start with emacs right away. Then I started with spacemacs, figuring I would at some point switch to vanilla when I got a bit more comfortable. But the more I use spacemacs, the less I feel like switching. I love that I can just open a file in a language I never used before and it's ready to go in seconds, no reading about which package or major mode to install, it's all there and it's ready to use. Not to mention I'm constantly discovering new keybindings and functionality that it would have taken me years to come up with myself. The editor feels like what I would personally have come up with if I had 10 years to develop my own config.

>what is the sidebar package?
treemacs, I use neotree as its more minimal

That's awesome. The work that they've put into it is incredible. I used it for a couple of months and really like it. Sometimes I think about going back to it but there are a couple of reasons I don't do it. I don't like having another abstraction layer on top of Emacs (which it itself is one on top of a lot of GNU and terminal utilities). Maybe it doesn't really matter but I can't help but feel this way. Another thing is that I don't know how well it is implemented for the Emacs bindings (instead of Evil). It seems like they focus on Evil bindings and all the documentation is written for them.
I do really think that the out of the box experience of Spacemacs is something great and that Emacs maintainers should learn from it in a lot of ways, but at the same time I'm never sure 100% if it's worth it for me at this moment.