Emacs tips and tricks

Forum rules
Share your brain ;)
User avatar
GekkoP
Emacs Sancho Panza
Posts: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 4840
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: 2471
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.
"The prettier the user interface, and the fewer odd replies the system allows you to make, the dumber you once appeared in the mind of the designer." -- Ellen Ullman

Post Reply