[ / / / / / / / / / / / / / ]

# /emacs/ - Emacs

GNU Emacs and Friends
Sorry, a server crashed and we went down for a few minutes. Server back online and good to go now.
Name Email Select/drop/paste files here (Randomized for file and post deletion; you may also set your own.) * = required field [▶ Show post options & limits]Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
 dice sides modifier

Allowed file types:jpg, jpeg, gif, png, webm, mp4, swf, pdf
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 5 per post.

Welcome to /emacs/!

Welcome to /emacs/, newcomers! This is ∞echan's board dedicated to discussing the family of highly-extensible text editors called Emacs, primarily GNU Emacs.

Don't think that board discussion is confined to text editors, though. /emacs/ is a board dedicated to discussing the spirit of Emacs, as well as the religion of Emacs, the philosophy of Emacs, and all aspects of life through the broad lens of Emacs.

Rules

• NSFW Content

/emacs/ is a SFW board; however, NSFW (nudity, gore, etc.) material may be uploaded so long as it is spoilered. Assume spoilered images are not safe for work.

• Posting Images

Images aren't required in order to post an OP, so don't feel compelled to post one if you don't have an image related to the content you are discussing, especially for the sole purpose of garnering attention. It's okay if you post an image unrelated to the topic of this board or thread if it relates to a conversation in a thread, but don't be disrespectful to fellow board-goers.

Using GNU Emacs

• Where to Start

Emacs Tutorial:

C-h t 

See Resources for further information.

Preventing RSI

RSI is a real issue and should not be taken lightly, especially if someone's job depends on it. If there's one thing you should take from this, do not work through the pain; that simply exacerbates the issue. Consider these solutions:

• Using a Better Keymap

File: aebb87e293cf4e1⋯.jpg (15.14 KB, 200x300, 2:3, wpid-amelia1.jpg)

https://www.networkworld.com/article/2221149/opensource-subnet/interview-with-a-pirate.html

>A friend who was much older than me told me that I would need Emacs to write TeX

>I didn't know that it wasn't true, so I learned how to use Emacs. It's almost 10 years later now, and I'm not a mathematician nor am I particularly good with TeX, but I do still use Emacs and org-mode.

w2w (Want to Wife)

File: 4d8bf7ce8932e28⋯.gif (214.03 KB, 580x580, 1:1, out_1.gif)

Full disclosure, I nuked the other thread because it was old. This is your friendly reminder that you really shouldn't be moving the cursor everywhere you go. "A GNU Emacs package for jumping to visible text using a char-based decision tree" doesn't sound useful, but it really is.

It might not seem useful on Vi or some facsimile because it's really specific and you could just scroll down or move the point to the word you want, but, honestly, Avy is very much worth how disorienting it might be to use if you're used to just interacting with visual lines.

Especially if you're not interacting with visual lines, and there's a specific word you want to interact with—like, say, to browse-url at point. Or to lookup a word with dictionary.el at point if you're reading a book. Unlike most editors, GNU Emacs thrives on interacting with things with your pointer. There are a billion functions and could feasibly write now that you can leverage Avy.

No.74

File: 03fa24c08f6ac59⋯.png (237.6 KB, 957x1080, 319:360, 2018-04-15-152602_1920x108….png)

Also, you can get key hinting in the new Firefox with Saka Key (https://github.com/lusakasa/saka-key). It's the most thorough extension I could find.

Firefox isn't as powerful as that of Emacs, obviously, but, then again, the workflow is also different. You could always follow links by tabbing through them or through Firefox's search function, but, ironically, Saka is more intuitive as a key hinting tool because it's more of a visual interface than search.

Unfortunately–and this is probably because of the Firefox itself–but Saka also isn't as powerful as Vimperator, although Saka is better than Vimperator in other respects, like, for example, its cross-platform nature and editor-agnostic presentation. It's good enough to open tabs in the foreground, background, same tab, new window as well as download files from hyperlinks, but you won't be able to yank tab URLs to your clipboard. I can easily imagine why the Firefox team doesn't want extensions to have that freedom. You can work around that freedom, although it is unfortunate.

What is fortunate is that, while the stupid Arch ricers lament Mozilla's strategic compromises and, of course, the good ol' SJW boogeyman, I was able to work my way around most of Firefox's neutering, in part with Emacs. This solution doesn't need Emacs, though, to work, although it helps. It's actually literally built in, because C-l is literally bound to focusing on the address bar in Firefox. So just "cut" the URL with C-x and it'll be added to your kill ring. At that point, you can open a new tab (C-t), highlight the address bar again (C-l) or open a new "window" (C-n), and "paste" (C-v) the url to that address bar.

You won't be able to write a macro because of a long-standing bug, but you can very easily Emacs-ify these things by taking advantage of EXWM's translation keys. Use this snippet:

      ;; address bar      ([?\C-o] . ?\C-l)                ; focus address bar      ([?\C-l] . ?\C-o)                ; go back      ;; cut/past

File: a42bceb6c717f6a⋯.gif (21.44 KB, 550x124, 275:62, out_1.gif)

This is a thread for small things you've learned in Emacs.

A lot of Emacs users preach about "learning Emacs" and its huge bank of editing features by learning just one little thing every day. I don't know if that's really an apt replacement for just reading the manual, but I will say that, even having read what has to be a dozen of these Emacs manuals by now, it does fell like drinking like a firehose to get everything down in just a few sittings.

The thing is, most things are learned out of necessity. Language is learned from the frustration that rises from being pulled from your mother's tit, so you're forced to interact with the external world. First you babble and then meaning arises.

The functions of tools are internalized when there's a problem that needs application. Babbling isn't onerously trying out every key binding, babble in Emacs terms is experimenting and exploring, and I'm making this thread to explore the subtle things that you gloss over in a manual.

No.68

File: cca7d8623d7e194⋯.gif (25.16 KB, 650x150, 13:3, out_2.gif)

So I should probably share something. The picture in the OP is an example of the function capitalize-word (M-c), which capitalizes a word after point. I could have used the prefix commands, but I wanted to show capitalize-word as kind of the staple of the capitalize functions family, if that makes sense.

For the record, capitalize-region isn't bound to anything by default, but I usually bind it to C-x C-c so as to parallel upcase-region (C-x C-u). In edition to that, there's also upcase-word.

As the OP pic suggests, upcase-region is pretty useful for more things than just upcasing titles after without having to annoyingly manually capitalize the start of every word, although I think that in itself is enough to justify its being bound to a key command. It's good for manipulating files quickly when combined with dired and some kind of macro, too, which makes things much more clean in my opinion.

There's also downcase-word (M-l) and downcase-region (C-x C-l).

As a recap, there's the upcase word family:

    upcase-word M-u    downcase-word M-l    capitalize-word M-c

And their "region" counterparts:

    upcase-region C-x C-u    downcase-region C-x C-l    capitalize-region    upcase-initials-region

Also, here's a picture of me using the prefix command.

No.69

>>68

Oh, I forgot to mention that these features are disabled by default, which is why I made that post in the first place. You can enable them like every other disabled command:

(put 'upcase-region 'disabled nil)(put 'downcase-region 'disabled nil)

As their disabled state would imply, they're kind of destructive. User noambitions has a solution for this:

(advice-add 'upcase-region            :around            '(lambda(oldfun &rest args)               "Only apply upcase-region when region active."               (when (region-active-p)                 (apply oldfun args))))(advice-add 'downcase-region            :around            '(lambda(oldfun &rest args)               "Only apply downcase-region when region active."               (when (region-active-p)                 (apply oldfun args))))

File: 6f1c6f5fda10123⋯.png (594.34 KB, 1280x1112, 160:139, 6f1c6f5fda10123220bf94a858….png)

Yes… let the emacs flow through you

No.56

No thanks.

No.57

File: 2c20d042a9d7e71⋯.jpg (44.25 KB, 506x600, 253:300, 1519371703642.jpg)

>>56

y not

No.58

>>57

I'm too cool for that kind of stuff.

No.63

dude just use gnu nano

File: 1455714552528.png (417.67 KB, 600x700, 6:7, keep-calm-youre-going-to-c….png)

Gnu Emacs has become extremely dangerous to use with C modules.

And maybe even without them.

https://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00151.html

No.41

>UNIX way: broken programs crash. developers fix their code.

>Microsoft way: broken programs crash. developers fix their code 3 months later.

>Apple way: broken programs crash. developers try to fix the code several times before giving up and getting rid of the feature entirely.

>GNU way: broken programs don't crash. what if a user lost some data? OH NO! we'll fix them… later… probably never… it's free software, uh, fix it yourself.

>Nearly every major security advisory "affecting linux" is entirely related to GNU software

:^)

No.43

>>41

Do you not realize how much of linux GNU really is?

No.44

>>43

meh, GNU has definitely served a purpose, but at this point it isn't necessary

GNU is good drop in unix, i.e. backwards compatible with every major vendor

if you forward thinking or a startup it isn't necessary

not gnu:

Linux

x11, firefox/chromium, KDE

openssh, apache, OpenNTPD, PureFTPD

mysql, PHP, python, perl, rust, go

init systems, package managers

languages:

every language supported by GCC that isn't C&C++ usually has a superior alternative compiler/runtime (i.e. fortran, java, ada)

guile - racket (and countless others)

clisp - SBCL

gforth - millions of implementations

cobol - who fucking cares is its free software?

common utilities:

gcc - clang

bash - ash, dash, rc, zsh, pkdsh

gawk - nawk

screen - tmux

found in *BSD:

m4, sed, yacc, lex, find, grep

shouldn't even exist tier:

autotools, ncurses

gnu exclusive:

wget, gdb, emacs

everything tier:

busybox

No.46

>>41

>muh UNIX way

more like process signals hell and handler mess no program on Earth implements well.

also enjoy the brain-dead job control paradigm. such a minimalist system amirite :^)

>>44

>languages

find me a better free replacement for GNU R and GNU Octave

>m4, sed, yacc, lex, find, grep

are you on drugs. GNU definitely wins here.

>init systems, package managers

what is GNU shepherd, what is GNU guix

No.52

GNU Emacs is an old-school C program emulating a 1980s Symbolics Lisp Machine. And LM's were written with maximum comfiness in mind, not maximum security. And security in general is basically just capitalizing on technical inefficiencies and hoping that everyone's too lazy or just too dim to put in the extra work to exploit said software.

File: 1469274140158.png (89.59 KB, 1022x1024, 511:512, Vimlogo.svg.png)

No.49

>>47

Emacs is my guilty pleasure, but because it's so large I use zile on my friends' machines. Vim is good, but doesn't have W3.

No.51

>>49

Do you not know what tramp is?

File: 1452641208022.gif (10.26 KB, 388x145, 388:145, xemacs.gif)

According to the XEmacs beta mailing list, the development of it is now officially dead.

Does that make you happy, or sad? Or are you just "who gives a shit?"

No.39

Delete Post [ ]
[]
Previous [1] Next | Catalog | Nerve Center | Cancer
[ / / / / / / / / / / / / / ]