Emacs thread

emacs thread

Attached: emacs logo.png (1024x1024, 98K)

Other urls found in this thread:

tuhdo.github.io/c-ide.html
emacs.stackexchange.com/questions/34941/how-to-use-c-comments-in-c-mode
github.com/snackon/Witchmacs
youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n
orgmode.org/manual/Tracking-your-habits.html
orgmode.org/manual/TODO-Items.html#TODO-Items
orgmode.org/manual/Agenda-Views.html#Agenda-Views
twitter.com/SFWRedditGifs

How best to emacs for c++? Only ever really used it for lisp.

I've heard good things about lsp-mode, haven't used it for any big projects myself.

flymake and omnisharp and whatever always end up breaking for me. wish i hadnt installed the python package that uses a linter because it's just a distraction

and i still dont get auto parenthesis or highlighted matches

irony-mode and company-irony
You should've probably worded that better

tuhdo.github.io/c-ide.html
I use this guys setup. Works really slick.

cringe thread*

>emacs

Attached: 250px-Autism_Speaks_Logo_Updated.jpg (250x274, 14K)

cringe

Install Spacemacs and program in Clojure
comfy life

Attached: Screenshot_20190422_220601.png (1366x768, 144K)

don't die pls

I recently switched to emacs(evil) after being a vim user for a while. Since then I've spent 80% of work time learning emacs and configuring stuff.

Never have I had such a fun productivity killer.

How is emacs any better than notepad

How do I ban certain files from the recentf?
Everytime I fire up dashboard, the recent files are filled with org agenda files because dashboard checks their content.

Attached: 1555102324980.jpg (1280x720, 50K)

How do I get console Emacs to display images from dired?

There's apparently a browser and MPV integration for Emacs. At this point I'm thinking of actually trying it out as an operating system, or at least as a DE.

lsp + clangd

You can open the image directly in emacs, or you can use image-dired mode

Nice.

I'm gonna ask it here since it's related.
Is anyone else using Guile for Scheme in Emacs? I'm having weird problems in that if I try to evaluate the last expression with C-x C-e, it seems to stop at the newline (the expression is evaluated correctly if it's on a single line). I have no problem in Common Lisp + SLIME.
Anyone noticed a similar problem, and if you solved it, how?

Attached: 1526045688348.jpg (1000x1113, 1.16M)

What's the difference between Spacemacs and Emacs Evil?

Peep-dired.el

Have you tested with any other scheme implementation?

Look into CEDET and EDE mode (ede is included in CEDET)

for c/c++ use a proper IDE with good debugging tools like Clion, VS or xcode

How do I eval an entire buffer, with text output ? If I do "C-x C-e" (eval-last-sexp) on a print statement, it'll print. If I do" eval-buffer" it doesn't print, preview, tell me anything (if it evals correctly).

Anyone got an emacs start pack for me?
I'm talking recommended configs and addons plus proper tutorials.
Bonus for infographics. I'm a sucker for those.

I have only guile set in my geiser-active-implementations and it works for me.

Check the *Messages* buffer.

I think you have to add a regexp to recentf-exclude.

Hey thanks. Nothings there. I do get output if I do eval-last-sexp (twice even). "eval-region" doesn't print anything either.

Not yet, what do you use?
I'll try doing that meanwhile.

I tried to exclude everything in ~/org/agenda but it keeps showing up

Anyone knows how to use // for comments instead of /* */ in C mode?
I tried putting in my config (c-toggle-comment-style) as recommended on emacs.stackexchange.com/questions/34941/how-to-use-c-comments-in-c-mode but it didn't work.

spacemacs is an emacs distribution (emacs + packages + config), evil-mode is a package that provides emacs with vim keybinds.
spacemacs includes evil-mode.

config base
github.com/snackon/Witchmacs
tutorials
youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n

I had relatively decent experience with Chez but it hangs if I try to debug it on error
Fuck it, clojure is the best dialect

Emacs is beautiful. Org-mode is beautiful. I track my habits and tasks with it. Are there any other cool things I can do?

Attached: Screenshot from 2019-05-08 20-16-24.png (656x547, 230K)

tables
blogs
presentations

;; C/C++ Development Config
(semantic-mode 1) ;; CEDET holdover
(global-ede-mode 1) ;; CEDET holdover
(setq c-default-style "bsd") ;; BSD/Allman brackets
(setq c-basic-offset 4) ;; 4-space indent
(add-hook 'c-mode-common-hook 'company-mode)
(add-hook 'c-mode-common-hook 'linum-mode)
(add-hook 'c-mode-common-hook 'irony-mode)
;; (Conditional) C/C++ Keybinds
(add-hook 'c-mode-common-hook 'flycheck-mode)
(add-hook 'c-mode-common-hook
(lambda () (local-set-key (kbd "") 'company-complete)))
(add-hook 'c-mode-common-hook
(lambda () (local-set-key (kbd "C-c j") 'find-tag)))

There are variables that controls that. I don't remember their name and I don't have my laptop right now, but you can do M-x apropos-library newcomment to find it. It's something like comment-style, comment-start, comment-end.

github README.org

>linum-mode
you should switch to the non-ancient
(global-display-line-numbers-mode 1)

>I track my habits and tasks with it.
How?

He makes a diary entry for every eight ball of coke he buys

irony + company

Diary entry in what? A text file? Markup? Are there maybe some fancy graphs?

In org-mode.

orgmode.org/manual/Tracking-your-habits.html
orgmode.org/manual/TODO-Items.html#TODO-Items
orgmode.org/manual/Agenda-Views.html#Agenda-Views

emacs org-mode, read the docs u pleb

Write notes with embedded executable code blocks.

You smart. I'll do it. Thanks friend.

Compile your notes to pdf or html formats from org
sell them to other students / give them out for free
you could even write blog posts from it

terminal emacs or gui emacs?
i always do emacs -nw and use zathura for pdf stuff

Attached: 1471792132494.png (420x420, 78K)

Doesn't matter, unless you compiled emacs without X. Also, the entire redisplay library is as fucky as they come.

>terminal emacs or gui emacs?
No real reason to use terminal emacs if you have to ask this.

who do i believe?
i want to fit in here

Why does it take 6,3 seconds for me to be able to edit a file after typing 'emacs file.txt'? What the fuck? Even atom is faster.

Not a helpful response but it depends what I'm doing. If I want to write code then I use Xemacs but if I just want an IRC client open I just open it in a terminal emulator.

Because you're too retarded to set up the emacs daemon and understand that you don't open emacs on each new file, you just keep an instance running.

Emacs is a runtime environment for emacs lisp. The elisp event loop needs to fire up before the editor does.

Can you have Emoji in emacs? I need them for my work.

Change work.

I need to add my text editor as a fucking service in systemd so that it's always running? No other text editor needs me to do this.

I would if I could. I just need to work with Emoji in my source files and documentation, otherwise my coworkers think I'm weird for not using them.

Change.
Work.
Now.

>emacs
>text editor
Do you have a reading disability? see >systemd
Found your problem. Seriously though, where do I mention systemd? Do you have Stockholm syndrome? Why do you immediately associate daemons with systemd?

beginner here
emacs automatically indents C files with 2 spaces
how do I change this behavior? (I want it to be 8 spaces instead)

Attached: 1553514078291.png (607x428, 165K)

(setq c-basic-offset 8)

org-mode your emacs config

No reason not to use termianl emacs, apart from the image display problem. Which was always a bit much to ask of a text editor desu

You can have kanji if you use fcitx, mathematical symbols with LaTeX. At the very least you can do 2channel ASCII. See how your coworkers like that.

use use-package with :defer t to speed up your loading time, also increase garbage collection on startup.
;; Make Emacs startup faster by increasing garbage collection during boot
(setq startup/gc-cons-threshold gc-cons-threshold)
(setq gc-cons-threshold most-positive-fixnum)
(defun startup/reset-gc () (setq gc-cons-threshold startup/gc-cons-threshold))
(add-hook 'emacs-startup-hook 'startup/reset-gc)

or just use the daemon

>You can have kanji if you use fcitx
Speaking of fcitx, can you set an emacs-internal keybinding to activate it? I use M-` to globally switch between different modes, but that keybining gets intercepted by emacs.

I'm afraid 2ch ASCII art won't cut it here. It's a shitty webdev team so we're forced to attach emoji which have our gender and race to our commits, among other shit.

thank you fren

>:defer t
Can't find any proper documentation on what it does. Can you explain? Should I put it everywhere or only to some specific packages?

This is using a daemon. The load time is still unacceptable.

Attached: eh0Ertg52W.gif (1200x800, 55K)

It specifies to emacs that the package should only be loaded if some other already loaded package demands it, or if you trigger some keybinding to activate it. You shouldn't use it for stuff like dashboard, which you want immediately as emacs starts up.

>spacemacs
found your problem.

What is it with retards and spacemacs?

Attached: 1553887346113.png (800x800, 250K)

Also, it's easier to just set
(setq use-package-always-defer t)

and selectively add :defer nil to some packages. Alternatively, install esup to profile your load times and set :defer t only on heavy packages.

it postpones the package until you actually request its functionality, I have it on anything that has either a hook or a keybind activating it.
$ time emacs test.sh

real 3.128s
user 2.224s
sys 0.146s

to start typing

7/10 bait

Thank you for explanation. I don't use many packages, but I noticed some startup speed difference anyway.

spacemacs is bloat, do your own ricing if you want good performance

There is absolutely zero reason to use terminal Emacs unless you're constrained in a text-only environment, such as a SSH session or a tty.
If you're running it on your local machine, and you already have a GUI running, not using the additional functionality provided by the GUI version is needlessly crippling yourself.

Attached: __jeanne_d_arc_and_jeanne_d_arc_fate_grand_order_and_etc_drawn_by_emoto_reishi__f04ede9118d2ec997262 (1165x1654, 619K)

Still slow without it. Other editors like vim or nano etc all load within 8 ms.

Attached: YBrT7nuhu1.gif (1200x800, 26K)

I have finaly seen the light and am getting comfy woth emacs. However, I do not want to spend countless hours to fit it to my needs 100%. What is missing in the following list of packages and concepts I need to know to be productive in programming, blogging, etc.?

- Helm (decided for it since it seems the most general solution)
- Basic buffer/window/frame managment. Hope that I don't need a package for this
-org-mode for Notetaking and later on, LaTex
- learn how to work with tags
- how to use C-h and the gang
- the editing commands obv.

Who cares? Emacs is meant to be used for long coding sessions. Vim *can* be used for long coding sessions too, but needs plenty of external tools or stuff written in an ugly language to get comfy. Nothing wrong with firing up Vim for short editing and doing complex coding with emacs (without having to contextswitch all the time).

You don't actually point GUI emacs to a file from the terminal. You use a keybinding from within emacs to search for the file you want to open.

>Nothing wrong with firing up Vim
You mean nothing wrong except having emacsclient -t installed which opens files with the exact same speed.

Attached: output.webm (1366x768, 702K)

alright, I set up the daemon, note that this is as fast as I can press C-x C-c
$ time emacsclient -c
real 0.211s
user 0.000s

I tried using esup but it wouldn't show any packages, what gives? for the record, I have my config written in org mode

esup doesnt work nicely with org-mode configs, I also tried to get it working, got a bunch of errors, and in the ticket on github the writer states esup "isnt magic" and he isnt actively maintaining it.

What a cunt

It works perfectly on my machine. I don't see how the way you write your config should matter, as you just generate a .el file from it anyway. Maybe the init.el wasn't loading it in a way esup likes? Here's my entire init.el
(require 'org)
(org-babel-load-file (expand-file-name "config.org" user-emacs-directory))

I do the same in mine, but even when I just did a
(load-file config.el)

that was generated by babel, it wouldnt work, probably something specific in my config

I love spacemacs man

so anyway to convert this to an alias with working file autocomlete?
emacs() {emacsclient -c -a '' "$1" & disown}

emacs() { emacsclient -c "$1" &> /dev/null & disown; }

using emacs for lisp is so much easier than working only through an interpreter

Attached: Screenshot from 2019-05-08 19-56-34.png (1096x712, 37K)