Emacs tips and tricks

Forum rules
Share your brain ;)
User avatar
slartie
Grump
Posts: 416
Joined: Tue Jun 18, 2013 12:35 pm
Location: Denmark
Contact:

Re: Emacs tips and tricks

Unread post by slartie » Mon Mar 14, 2016 11:57 am

Gekko: What did you have before? The stuff you just listed has worked since Emacs 24 was released.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Mon Mar 14, 2016 12:00 pm

^ Yep, but instead of add-to-list, this was working before:

Code: Select all

(setq package-archives
       `(("gnu"   . "https://elpa.gnu.org/packages/")
         ("melpa" . "https://melpa.org/packages/")))

User avatar
slartie
Grump
Posts: 416
Joined: Tue Jun 18, 2013 12:35 pm
Location: Denmark
Contact:

Re: Emacs tips and tricks

Unread post by slartie » Mon Mar 14, 2016 12:07 pm

Yeah, that should work. Unless of course you're using a nightly build?

Edit: It works on 24.4.1 and 24.5. Haven't tried the latest source.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Mon Mar 14, 2016 12:08 pm

I track Emacs latest developments. It was working until yesterday, but no problem, I leave it with add-to-list.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Wed Mar 16, 2016 11:16 am

A life saver:

Code: Select all

(setq confirm-kill-emacs #'y-or-n-p)

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Fri Mar 25, 2016 3:15 pm

I use dired a lot. Pragmatic Emacs has a couple of neat suggestions that improved my daily workflow:

- dired-narrow: http://pragmaticemacs.com/emacs/dynamic ... ed-narrow/
- recently visited directories: http://pragmaticemacs.com/emacs/open-a- ... revisited/

Simple stuff, but really handy.

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: Emacs tips and tricks

Unread post by Dr_Chroot » Mon Mar 28, 2016 11:21 pm

So I went ahead and jumped into this head-first: spacemacs.

It isn't its own application, per se, but rather a .emacs.d configuration.
Spacemacs is a new way to experience Emacs -- a sophisticated and polished set-up focused on ergonomics, mnemonics and consistency.

Just clone it, launch it, then press the space bar to explore the interactive list of carefully-chosen key bindings. You can also press the home buffer's [?] button for some great first key bindings to try.

Spacemacs can be used naturally by both Emacs and Vim users -- you can even mix the two editing styles. Switching easily between input styles makes Spacemacs a great tool for pair-programming.
"Installation" was a breeze.

Code: Select all

git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
I think its an interesting project, although it probably won't replace just plain old GNU Emacs with a simple .emacs.
Attachments
spacemacs-python.png
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Emacs tips and tricks

Unread post by machinebacon » Tue Mar 29, 2016 6:19 am

this looks pretty and pretty interesting. thanks for testing it. is there anything you really like or hate about it?
..gnutella..

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: Emacs tips and tricks

Unread post by franksinistra » Tue Mar 29, 2016 6:45 am

^^ Interesting, seems to be a well thought out project. RTFMed a bit, uniformed key-bindings are cool, and adding personal layers are pretty easy. That mode-line though... too distracting, and 211 packages installed is a cause of concern.
Will try it tonight, for the sake of curiosity.
rice no more.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Mar 29, 2016 7:58 am

I tried it.

It is a very nice piece of software, well-documented and able to bring the best of Emacs and Vim together.

Personally, I'm too proud of my own Emacs setup to move on to another configuration. As much as I appreciate the effort behind Spacemacs, I just like the way my setup is organised. And I'm not concerned about the bloat, because my setup is not light either.

I know Spacemacs is not a starter kit, of course, but well, maybe it's just me being childish.

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: Emacs tips and tricks

Unread post by franksinistra » Tue Mar 29, 2016 12:26 pm

^ Your configs are just as good (I know because sometimes i steal one or two trick from your configs)

anyway i tried spacemacs, de-bloat it a bit (cleaned all traces of 'evil'), add some sprinkles (circe, mingus). Aside from a few opinionated things i think this is pretty cool.
Attachments
2016-03-29-181908_1803x1052_scrot.png
rice no more.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Mar 29, 2016 2:14 pm

^ Great job.
An interesting read about "why Spacemacs?": http://www.lunaryorn.com/2016/01/26/why-spacemacs.html

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: Emacs tips and tricks

Unread post by Dr_Chroot » Tue Mar 29, 2016 5:32 pm

@machinebacon To be honest, there really isn't anything that I particularly hate about it, except for perhaps the rather large size the default is. What I do love is that it is new and interesting :D Something new to play with...
I just like the way my setup is organised.
Gekko, you already have a wonderful Emacs setup :D I suppose this is just more for someone like me who hasn't mastered the art of Emacs-fu quite yet.

And yes, frank, can't forget the mingus! It has replaced ncmpcpp almost entirely on my installs.
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Mar 29, 2016 5:38 pm

^ :) Thanks. Although Spacemacs is intriguing, because it's a new way of thinking about configuring your favourite editor. It took me a while to get used to use-package, maybe it'll take me just a while longer to become a Spacemacs lover.

User avatar
franksinistra
Ivana Fukalot
Posts: 1093
Joined: Mon Jan 27, 2014 2:03 am
Location: 印尼国

Re: Emacs tips and tricks

Unread post by franksinistra » Tue Mar 29, 2016 6:24 pm

^^ yup i like mingus interface...
rice no more.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Thu Mar 31, 2016 11:05 am

If you fancy gaming, have a texty fun: http://sami.salkosuo.net/elite-for-emacs/

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Sat Apr 02, 2016 9:10 am


User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Apr 05, 2016 4:43 pm

Down the rabbit hole with modules: http://diobla.info/blog-archive/modules-tut.html

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Emacs tips and tricks

Unread post by machinebacon » Thu Apr 07, 2016 9:22 am

^ that's very interesting... never heard of it before.
..gnutella..

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5877
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Thu Apr 07, 2016 3:20 pm

^ It's all very GPL-driven, so I don't know how many will be able to contribute actually. Living in the Emacs "ecosystem", I've come to understand that not many are willing to comply with that license.

Post Reply