procrastivity

Emacs: Stop worrying about indentation

A while back I had the following exchange with a friend:

  • ‘Hey Puerco, how do I indent the whole buffer? [in Emacs]’
  • 'Just C-x h ’
  • 'But then my cursor is left at the beginning of the buffer’
  • 'Just pop the mark twice’
  • 'The mark? What is that?’
  • 'Like the kill ring but for the mark’’
  • 'huh?’

But I digress, I am telling you this because my friend got me thinking, am I as lazy I thought? Why I am doing all this keypresses. So I got to writing:


  (defun indent-buffer ()
    "First Approach"
    (interactive)
    (set-mark 0)
    (end-of-buffer)
    (call-interactively 'indent-region))

But then, there would not be an easy way to return the cursor to where it was. After a quick googling I reached this solution which didn’t move the cursor so didn’t create the problem of returning it. Also it showed me that I was in the wrong frame of mind: trying to do a macro:


  (defun indent-buffer ()
    "indent whole buffer"
    (interactive)
    (delete-trailing-whitespace)
    (indent-region (point-min) (point-max) nil)
    (untabify (point-min) (point-max)))

While pasting on irc, I am frequently admonished that my indentation is wrong, remembering I had a command for that I thought hmm why don’t I automatically indent buffers before saving them.


    (add-hook 'before-save-hook (lambda () (indent-buffer)))
To do tomorrow:

1. Fill out application missing parts [fix things]

2.  Write Introduction letter.

3. TALK TO boss ON MONDAY JESUS STOP PROCRASTING

4. Clean up room further

5. put together furniture pls stop procrasting

6. finish gou’s neckalce and Kosuke’s necklace

idk man 

anonymous asked:

Free Satori from Amber's oppression!

“Me? Oppressed? Don’t be silly, just what could that person do to me? Procrastinate the life out of me? She’s a prime example of why surfacers are annoying and lazy. Just… look.”

((I HAVE BEEN PROCRASTING MY DRAFTS AND HAVE BEEN WATCHING STEVEN UNIVERSE FOR DAAAYYYSSSS))

anonymous asked:

you've been getting a lot of questions but no one has asked you about your day. So how was your day? :)

It’s actually been really good, I’ve started to like spending time with my family more, but I’m still procrasting my homework tho 😁

instagram

Just chilling out, watching tv… #procrastation #Instagram #newhouse #video #singlelife #blonde