Slashdot Mirror


(Stupid) Useful Emacs Tricks?

Count Fenring writes "Since the Vi version of this question was both interesting and popular, let's hear from the other end of the spectrum. What are your favorite tricks, macros, extensions, and techniques for any of the various Emacs? Myself, I like 'M-x dunnet' ;-)"

29 of 412 comments (clear)

  1. A favourite (works well on both Ubuntu and Debian by rallymatte · · Score: 4, Funny

    I've found this very useful whenever I'm put in front of emacs C-x C-c sudo apt-get -y purge emacs vi

  2. Re:A favourite (works well on both Ubuntu and Debi by rallymatte · · Score: 5, Funny

    There, fixed that for me!

    I've found this very useful whenever I'm put in front of emacs
    C-x C-c
    sudo apt-get -y purge emacs
    vi

  3. XKCD by WK2 · · Score: 5, Funny

    C-X M-C M-butterfly

    --
    Write your own Choose Your Own Adventure. http://www.freegameengines.org/gamebook-engine/
    1. Re:XKCD by Anonymous Coward · · Score: 1, Funny

      C-C-C-COMBO BREAKER!

  4. Huh? by Anonymous Coward · · Score: 3, Funny

    the Vi version of this question was both interesting and popular

    Indeed. Probably because Vi is a popular and usable text editor (unlike Emacs).

    1. Re:Huh? by Dr+Caleb · · Score: 3, Funny

      I don't think cat+sed has any money. Plus, you'd have to prove damages.

      --
      "History doesn't repeat itself, but it does rhyme." Mark Twain
    2. Re:Huh? by Anonymous Coward · · Score: 5, Funny

      Emacs has a text editor now?

  5. Notepad tricks by Anonymous Coward · · Score: 1, Funny

    Dear Slashdot,

    For us Windows users, I would be very much interested in a similar topic for useful Notepad tricks.
    Please take this seriously, and don't say that Alt-F4 (or Alt-F, X) is the best trick.

    Yours sincerely,

    Fred Anboy

  6. Re:A big disappointment by include($dysmas) · · Score: 5, Funny

    it was posted from emacs, took a while to press all the keys.

  7. Re:A favourite (works well on both Ubuntu and Debi by pivo · · Score: 5, Funny

    Hmm.. that didn't work well for me. I tried it, but I ended up in an editor with functionality that was one step above punch cards.

  8. Re:Please Stop by cjfs · · Score: 4, Funny

    Hopefully this is the last story before we start with "Stupid pet tricks"

    Seeing as this is about emacs tricks, everything else is a subset. Including pet tricks.

    Don't get me wrong: Emacs is a great operating system -- it lacks a good editor, though.

  9. Check hard drive by digitalhermit · · Score: 4, Funny

    It's often the case when you need to check the sectors on your disk for corruption, or just during hard drive testing. One of the coolest things that Emacs allows you to do is check your filesystem. For example on CentOS:

          yum -y install emacs*

    This will proceed to fill up your hard drive with tons of software until the filesystem is full.

    (I kid, I kid)

  10. Emacs Lisp by tjwhaynes · · Score: 4, Funny

    Lisp is a language that CompScis see for two months at University before leaving it behind. But if you really want to learn tricks with Emacs, you should learn Emacs Lisp - I have all sorts of specials, such as "move text to marker" and modes for handling internal IBM dump formats, that would be impossible in vi.

    But if you want one quick piece of advice, here's one that should make someone smile

    M-x hippie-expand RET

    The ultimate, expand-this-thing-dammit-from-whatever-you-like completion trick.

    Cheers,
    Toby Haynes

    --
    Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  11. The apocryphal command by digitalderbs · · Score: 3, Funny

    I once knew a man that typed an emacs sequence, once locked in hidden, ancient papyri. Emacs conducted all of the research for his PhD, typed his dissertation, correctly formatted his bibliography (the most astounding feat of all), setup the defense with his advisory committee, presented and defended his thesis, printed, bound and submitted the dissertation.

    1. Re:The apocryphal command by Anonymous Coward · · Score: 1, Funny

      I know that man, I am his boss now. Imagine had he used vim, like me...

  12. Re:Not much of a trick... BUT... by homer_s · · Score: 2, Funny

    Now if anyone makes a Firefox plugin making it possible to do the same in a web browser that would be friggin awesome.

    So, you don't use Emacs to browse the web?

  13. My Favorite... by awshidahak · · Score: 3, Funny

    is M-x Viper \[esc]x eshell All the obscureness of vim combined with the bloat of emacs. Then I have lots of fun letting people borrow my computer and watch them get mad at my custom xmodmap while trying to figure out how to get to the "Start" menu because they don't know ratpoison.

  14. Re:Please Stop by alta · · Score: 5, Funny

    A whole series...
    Useful(Stupid) things to say to get modded Insightful
    Useful(Stupid) things to say to get modded Interesting
    Useful(Stupid) things to say to get modded Funny
    Useful(Stupid) things to say to get modded Troll
    Useful(Stupid) things to say to get modded Redundant
    Useful(Stupid) things to say to get modded Flamebate
    Useful(Stupid) things to say to get modded Overrated
    Useful(Stupid) things to say to get modded Stupid
    Useful(Stupid) things to say to get modded Useful

    --
    Do not meddle in the affairs of sysadmins, for they are subtle, and quick to anger.
  15. trying to figure something out by viridari · · Score: 4, Funny

    I like emacs but I'm not ready to change over to it 100% yet.

    Is there a way to dual boot between Vista and emacs?

  16. The old Emacs vs Vi story by raffe · · Score: 5, Funny

    I asked my email-pal: "UNIX or Windoze?". He replied "UNIX". I said "Ah...me too!".

    I asked my email-pal: "Linux or AIX?". He said "Linux, of course". I said "Me too".

    I asked him: "Emacs or vi". He replied "Emacs". I said "Me too. Small world."

    I asked him: "GNU Emacs or XEmacs?", and he said "GNU Emacs". I said "oh, me too."

    I asked him "GNU Emacs 19 or GNU Emacs 20"? and he said "GNU Emacs 19". I said "oh, me too."

    I asked him, "GNU Emacs 19.29 or GNU Emacs 19.34", and he replied "GNU Emacs 19.29". I said "DIE YOU OBSOLETE NOGOOD SOCIALLY MALADJUSTED CELIBATE COMMIE FASCIST DORK!", and never emailed him again.

    From an old slashdot story

    1. Re:The old Emacs vs Vi story by sootman · · Score: 2, Funny

      As the original post hints, this is an adaptation of and old Emo Phillips bit.

      I was walking across a bridge one day, and I saw a man standing on the edge, about to jump off. So I ran over and said "Stop! don't do it!"
      "Why shouldn't I?" he said.
      I said, "Well, there's so much to live for!"
      He said, "Like what?"
      I said, "Well...are you religious or atheist?"
      He said, "Religious."
      I said, "Me too! Are you christian or buddhist?"
      He said, "Christian."
      I said, "Me too! Are you catholic or protestant?"
      He said, "Protestant."
      I said, "Me too! Are you episcopalian or baptist?"
      He said, "Baptist!"
      I said,"Wow! Me too! Are you baptist church of god or baptist church of the lord?"
      He said, "Baptist church of god!"
      I said, "Me too! Are you original baptist church of god, or are you reformed baptist church of god?"
      He said,"Reformed Baptist church of god!"
      I said, "Me too! Are you reformed baptist church of god, reformation of 1879, or reformed baptist church of god, reformation of 1915?"
      He said, "Reformed baptist church of god, reformation of 1915!"
      I said, "Die, heretic scum", and pushed him off.

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  17. Re:What is next ? by kv9 · · Score: 4, Funny

    (Stupid) Useful Chat-up Lines

    hey, sexy mama. wanna kill all the humans?

  18. Re:A favourite (works well on both Ubuntu and Debi by aproposofwhat · · Score: 3, Funny

    I started on punch cards, you insensitive clod!

    --
    One swallow does not a fellatrix make
  19. Re:Favorite Acronym by 0xABADC0DA · · Score: 4, Funny

    It's a long time since Emacs has really been slow, but the jokes have long memories.

    Performance jokes are never garbage collected -- it would take too many cycles.
    Performance jokes are never garbage collected -- there's always a weak reference to them.

    I'll be here all week... or until tuesday if the alternate pickup schedule is in effect due to holiday or inclement weather.

  20. Mod me everything! by hardaker · · Score: 4, Funny

    Useful(Stupid) things to say to get modded Insightful

    • Emacs rocks!

    Useful(Stupid) things to say to get modded Interesting

    • Escape-: (message "Emacs rocks")

    Useful(Stupid) things to say to get modded Funny

    • Emacs: Escape Meta Alt Control Shift

    Useful(Stupid) things to say to get modded Troll

    • Emacs is better than vi

    Useful(Stupid) things to say to get modded Redundant

    • Emacs is better than vi

    Useful(Stupid) things to say to get modded Flamebate

    • Emacs is better than vi (really... Trolls are just flamers with green skin)

    Useful(Stupid) things to say to get modded Overrated

    • Emacs rocks!

    Useful(Stupid) things to say to get modded Stupid

    • What's emacs anyway?

    Useful(Stupid) things to say to get modded Useful

    • The its-all-text firefox plugin lets you edit slashdot posts in emacs
    --
    The next site to slashdot will be ready soon, but subscribers can beat the rush and start slashdotting it early!
  21. Re:Please Don't Stop by Mikkeles · · Score: 4, Funny

    '... is there any reason the VIM story ran first than the Emacs one?'

    Emacs was still loading when it came time to run the story.

    --
    Great minds think alike; fools seldom differ.
  22. emacs replies... by PPH · · Score: 4, Funny

    What are your favorite tricks?

    Why do you say what are my favorite tricks?

    --
    Have gnu, will travel.
  23. Re:Please Don't Stop by DiegoBravo · · Score: 5, Funny

    So by the next week we may the OpenOffice tricks?

  24. Re:vi is for building emacs by i.of.the.storm · · Score: 2, Funny

    I was talking about vi, I didn't know about vim to be honest. On Linux on my computer vi is aliased to vim but not on our Solaris servers at Berkeley.

    Also, a fun related quote from one of the professors here, Paul Hilfinger:

    In the interests of truth, beauty, and justice -- and to undo, in some small part, the damage Berkeley has done by foisting vi on an already-unhappy world -- Emacs will be the official CS61A text editor this semester

    --
    All your base are belong to Wii.