Emacs tips and tricks

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

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

^ 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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

Madness and uselessness are unstoppable: https://github.com/fitzsim/slime-volleyball
User avatar
GekkoP
Emacs Sancho Panza
Posts: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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

Yes, fun times.
User avatar
GekkoP
Emacs Sancho Panza
Posts: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

Init time: 0.72521613 seconds

Achievement unlocked, as the kids use to say nowadays.
User avatar
GekkoP
Emacs Sancho Panza
Posts: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

^^ 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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

It was bound to happen: systemE, a "lightweight" systemd replacement written in Emacs lisp.
pidsley
Hermit
Posts: 2539
Joined: Wed Oct 17, 2012 12:31 pm

Re: Emacs tips and tricks

Unread post by pidsley »

^ 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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

Screenshot from 2020-02-12 09-43-59.png
Screenshot from 2020-02-12 09-43-59.png (11.26 KiB) Viewed 3385 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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 6278
Joined: Wed Oct 17, 2012 11:32 am
Location: FR
Contact:

Re: Emacs tips and tricks

Unread post by wuxmedia »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 6278
Joined: Wed Oct 17, 2012 11:32 am
Location: FR
Contact:

Re: Emacs tips and tricks

Unread post by wuxmedia »

^ 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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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: 5374
Joined: Tue Sep 03, 2013 7:05 am

Re: Emacs tips and tricks

Unread post by GekkoP »

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

Re: Emacs tips and tricks

Unread post by GekkoP »

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