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"
    (set-mark 0)
    (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"
    (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)))
master–procraster replied to your post “i’ve been replaced by my closest friends, but that’s okay, that’s…”

You alright duck xx

yeah, it’s just that my ex is in town and my friends know that the reason i hate him is because he says shit like “most women who report rape are lying” and “if you’re ever attacked, fighting back will just make your attacker angry.” so basically they knew they had to choose between him and me. and they chose him. i should’ve known.


… is really no joke and no fun! It is not the same as laziness, one looses even any motivation / fun in doing one’s hobbies, one feels bad, one accuses oneself  non stop and it becomes worser because the time is running or because the task you are avoiding is really, really important to you and matters to you and you just don’t want to mess up but not only that , you are also feeling like it would not be not manageable, especially because you already cannot be as good as you might have been if you would started earlier, but you haven’t because you procrastioned, and therefore you already worse than you might have been…. (negative spiral) …..

Procrastination is the practice of carrying out less urgent tasks in preference to more urgent ones, or doing more pleasurable things in place of less pleasurable ones, and thus putting off impending tasks to a later time, sometimes to the “last minute” before a deadline.

“Now we’ve got bad blood. So take a look what you’ve done.”

Partly blaming sleep depravitation and sticking a song on repeat for this one yeah pretty much staright off the bat and being motivated to finish something off in one full session not been able to that for ages anyway I just wanted to do something simple that wouldn’t require much work really.

Yes I’m a lazy fuck at the moment but I honestly don’t care I’ve now read 105 books this year I have every right to procrast as much as I like.

Available to purchase through Society6, Crated, DeviantART & Redbubble:–so-take-a-look-what-you-ve-done–by-djlediperehodov?product=FP&size=10%7C21&frame=BF&edge=250MA


Made a new Tumblr account purely for procrast purps. Expect the occasional good post amongst the sea of cute memes.