Emacs tips and tricks

Forum rules
Share your brain ;)
User avatar
GekkoP
Emacs Sancho Panza
Posts: 5204
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP » Wed May 08, 2019 11:51 am

Code: Select all

(use-package goto-last-change
  :ensure t
  :bind ("C-x C-x" . goto-last-change))
Old but always good.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Wed May 29, 2019 1:08 pm

^ Following those lines: https://github.com/manuel-uberti/goto-last-point

Useful when C-u C-SPC fails you.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Thu Jun 13, 2019 12:24 pm

Ditched the built-in ansi-color for this: https://github.com/atomontage/xterm-color

M-x shell looks pretty now.

[I know I am alone in my quest for Emacshalla, but I'll keep bothering you people because I love doing it.]

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

Re: Emacs tips and tricks

Unread post by GekkoP » Sat Jul 06, 2019 10:37 am

Memento mori: https://github.com/lassik/emacs-memento-mori

I don't like too much stuff in my mode-line, so I quickly hacked a solution to have a motivational/scary message as soon as Emacs is loaded:

Code: Select all

(defun mu-display-memento-mori ()
  "Display my current age by leveraging `memento-mori-age-string'."
  (interactive)
  (let ((first-name (car (s-split-words user-full-name)))
        (age (s-trim memento-mori-age-string))
        (msg "%s, you are %s, don't waste your time!"))
    (run-with-timer 2 nil
                    (lambda ()
                      (message msg first-name age)
                      (run-with-timer 3 nil
                                      (lambda ()
                                        (message nil)))))))
And this is the message I see:

Code: Select all

Manuel, you are 34.82 years old, don’t waste your time!
Damn, gotta work harder now.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Jul 09, 2019 10:18 am

Madness and uselessness are unstoppable: https://github.com/fitzsim/slime-volleyball

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

Re: Emacs tips and tricks

Unread post by GekkoP » Thu Oct 03, 2019 9:05 am

I moved my setup to https://github.com/raxod502/straight.el

Yes, fun times.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Oct 15, 2019 12:54 pm

Init time: 0.72521613 seconds

Achievement unlocked, as the kids use to say nowadays.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Wed Nov 06, 2019 3:25 pm

Code: Select all

(setq-default exec-path (append (parse-colon-path (getenv "PATH")) (list exec-directory)))
And bye bye to exec-path-from-shell.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Fri Nov 29, 2019 10:19 am

^^ And now: 0.399250765 seconds

I feel like the good ol' days of tweaking Linux boot with pidsley are back.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Fri Jan 10, 2020 11:25 am

It was bound to happen: systemE, a "lightweight" systemd replacement written in Emacs lisp.

pidsley
Hermit
Posts: 2522
Joined: Wed Oct 17, 2012 12:31 pm

Re: Emacs tips and tricks

Unread post by pidsley » Fri Jan 10, 2020 9:26 pm

^ Interesting. I think calling that a systemd replacement is a little like calling a bicycle an M1-abrams tank replacement. It does show how little an "init" system really has to do, though.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Wed Feb 12, 2020 9:45 am

Screenshot from 2020-02-12 09-43-59.png
Screenshot from 2020-02-12 09-43-59.png (11.26 KiB) Viewed 2163 times
Helm has an ugly mode-line, so why don't make it simple and pretty? This is me taking useful bits from doom-modeline without installing the whole package just for the Helm segments.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Tue Mar 10, 2020 2:04 pm

My current light theme: https://www.youtube.com/watch?v=TIUXYDaq9AY

And if you pay attention closely, I am in that video too.

User avatar
wuxmedia
Grasshopper
Posts: 6178
Joined: Wed Oct 17, 2012 11:32 am
Location: FR
Contact:

Re: Emacs tips and tricks

Unread post by wuxmedia » Wed Mar 11, 2020 12:24 pm

I sat through that to see you... saw you.

Nice theme, good to see people getting to using light themes, like myself :D I think mine is just tango with the green darkened a bit.
"Seek, and Ye shall find"
"Github | Chooons | Site"

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

Re: Emacs tips and tricks

Unread post by GekkoP » Wed Mar 11, 2020 1:20 pm

I was a Solarized Light user for a long while, then Tomorrow Night took over everything on my screen. Right now the yellowish background of Solarized Light doesn't suit me any more, but Modus Operandi is gorgeous: simple, clean, always promptly readable. I've been working all day with it for a couple of weeks and my eyes can't complain.

Add to that the patience of the theme's author with me opening issues on random Emacs packages, and we have a winner.

User avatar
wuxmedia
Grasshopper
Posts: 6178
Joined: Wed Oct 17, 2012 11:32 am
Location: FR
Contact:

Re: Emacs tips and tricks

Unread post by wuxmedia » Thu Mar 12, 2020 9:12 pm

^ big question; is there a terminal version ?
i just like black text and not too faded colours not too FF0000 either, if you know what i mean
i like the dark terminal - although I tried one out last night and it just looked weird, liked I selected (inverse) everything, which is correct I suppose.
"Seek, and Ye shall find"
"Github | Chooons | Site"

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

Re: Emacs tips and tricks

Unread post by GekkoP » Fri Mar 13, 2020 7:23 am

Not sure about the terminal version. The theme's author doesn't provide it, so I guess there isn't.

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

Re: Emacs tips and tricks

Unread post by GekkoP » Mon Mar 23, 2020 8:35 am

Started a series of article just do something for the Emacs community in these dark times: https://www.manueluberti.eu/emacs/2020/ ... ldoc-eval/

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

Re: Emacs tips and tricks

Unread post by GekkoP » Thu Apr 09, 2020 6:21 am


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

Re: Emacs tips and tricks

Unread post by GekkoP » Fri Apr 17, 2020 8:28 am

Power up the built-in Icomplete with:

- https://github.com/oantolin/icomplete-vertical
- https://github.com/oantolin/orderless

You may even end up forgetting about Ivy and Helm.

Post Reply