Emacs Introduction and Demonstration

Поделиться
HTML-код
  • Опубликовано: 10 июл 2024
  • This presentation was originally given at the Open Source Bridge in Portland, Oregon on 26 June 2014. I re-recorded it at home based on feedback that I had not sufficiently explained all "the magic" I set up...that's right, I did program my presentation in Emacs. ;-)
    Links mentioned in the Talk:
    * Why Learn Emacs? www.howardism.org/Technical/Em...
    * My Getting Started Guide: www.howardism.org/Technical/Em...
    * Start with Aquamacs, a Mac-ish Emacs version: aquamacs.org
    * Install Prelude for good IDE support: github.com/bbatsov/prelude
    * Mastering Emacs may take Ten Years: t.co/4BQuIzJIDr
    * Use KeyRemap4MacBook to gain a new Control key: pqrs.org/macosx/keyremap4macb...
    * Online Emacs Tutorials: • .Emacs #1 - Getting St...
    * Check out orgmode.org org-mode
    * Mastering the Emacs Shell: www.howardism.org/Technical/Em...
    * github.com/magit/magit/blob/m...
    * github.com/magnars/expand-reg...
    * github.com/magnars/multiple-c...
    * github.com/smihica/emmet-mode for quickly writing HTML

Комментарии • 96

  • @10xSRK
    @10xSRK 7 лет назад +10

    This is precisely what I was looking for (and more) as an introuction to Emacs. Thank you.

  • @moebius435
    @moebius435 10 лет назад +3

    Very nice showcase for the power of Emacs as a computing and development tool.

  • @MartinClausen
    @MartinClausen 10 лет назад +8

    For those who are curious, the live html view magic used in this video is Impatient Mode github.com/netguy204/imp.el

  • @Novascrub
    @Novascrub 10 лет назад

    Great intro. Thanks for sharing this.

  • @sridhard7877
    @sridhard7877 6 лет назад

    Great Video. Thanks for sharing it.

  • @abiezercoppe8886
    @abiezercoppe8886 8 лет назад +11

    Great advice at the end. Starting to use GNU Emacs in a simple way, after running the tutorial, I think is a very good way to start. You'll pick up more stuff as you go along and want to do more. Using Emacs is the best way to learn and remember things.
    Another thing. Read the manual! I don't nessesarily mean, read it all in one go. But, do read it, look up things in it, and learn about the Emacs help system. So many of the simple questions (as well as complex ones) that are routinely asked on the web about Emacs are answered clearly in the manual ... yes, I am saying rtfm :-D
    And to those who think that this video shows real Emacs "awesomeness" ... well, not really. OK, I'll clarify. No, I am not saying that this video is bad in any way, I think it's very good and well presented (if only other people would take note). What I mean is that this is pretty much everyday stuff for an Emacs user, it's not unattainable wizardry, we just do it.
    Oh, and if you think this is "awesome", just wait till you start using and extending Emacs for yourself :-)

  • @alexjones3035
    @alexjones3035 9 лет назад +20

    Wow, this is incredible! I've been a VIM user for a couple years now, but recently, I've been looking to get more from it. Unfortunately, VIM just doesn't expand well, and every attempt of mine to add some features on to it has been a complete disaster. I was hoping to just maybe get some better completions or something, but WOW! You could _live_ in this! The biggest drawback I've heard of though is the sheer depth of EMACS, and having tried to configure it over the last couple days, I think that's a big one. I was hoping to see what a working setup looked like, and maybe glean some insight as to what I was doing wrong. But you've provided such an excellently documented starter configuration! I'll probably just piecemeal together my own, and it won't be nearly as large or as comprehensive as this, at least not for a couple years. But if I can get even 10% of the stuff shown here, I'd be ecstatic. In particular, org-mode looks amazing. I've heard it makes organizing ideas easier, but I thought it was just some little collaboration extension or something. But those features were incredible! Org-mode _alone_ could probably save me hours every week, and that might just be EMACS' killer feature for me. Thank you so much for producing such an eye opening demo!

    • @howardabrams1
      @howardabrams1  9 лет назад +7

      True. Emacs is deep, and there are as many recommendations for learning it as there are Emacs users, but perhaps you could start with the evil mode.

  • @charlessmyth
    @charlessmyth 9 лет назад +5

    That was fun :-)

  • @DavidJeng
    @DavidJeng 9 лет назад +11

    I am sold! Off my way to Emacs land....:)

  • @DanielRiveroPadilla
    @DanielRiveroPadilla 10 лет назад +10

    Holy shit, this video blew my mind. I use Emacs and I know the power but I never have that power :(

  • @ElizaberthUndEugen
    @ElizaberthUndEugen 8 лет назад

    Why do I get "symbol's function definition is void" when I copy your code from 7:36 ?

  • @rtacconi
    @rtacconi 8 лет назад +8

    Thank you Howard

  • @VirgateCrawdad
    @VirgateCrawdad 7 лет назад

    AWESOME!

  • @raulvazquez3511
    @raulvazquez3511 8 лет назад

    Hi! This is awesome! Great video! is there a reference on how to change the Caps Lock and Return keys to behave as Control? what other rebindings do you recommend?

    • @howardabrams1
      @howardabrams1  8 лет назад

      +Raúl Vázquez Have you looked into Karabiner? pqrs.org/osx/karabiner/

  • @umunsiow1520
    @umunsiow1520 10 лет назад +2

    I like your powerline at the bottom of the emacs. Any hints on how to implement this?

    • @howardabrams1
      @howardabrams1  10 лет назад +3

      Yes, my mode line and the rest of my .emacs configuration is on github: github.com/howardabrams/dot-files/blob/master/emacs-mode-line.org

  • @stepankrivanec4644
    @stepankrivanec4644 8 лет назад +1

    The sound of keyboard you are using is really nice. Which keyboard and switches are you using?

    • @howardabrams1
      @howardabrams1  7 лет назад +1

      Just an old Kinesis that I've had for many, many years.

  • @asbjrnandersen8595
    @asbjrnandersen8595 9 лет назад

    how do you make emacs look like that??

  • @clyt9636
    @clyt9636 7 лет назад

    hi Howard,
    how do you enable multiple cursors in emacs. can you explain what you did at 12:50 in the video

    • @howardabrams1
      @howardabrams1  7 лет назад

      Check out my configuration for that here: github.com/howardabrams/dot-files/blob/master/emacs.org#multiple-cursors

  • @east_wood
    @east_wood 8 лет назад +2

    When you were creating the ul>li in emmet mode how did you navigate down to the next empty list item so fast?

    • @howardabrams1
      @howardabrams1  8 лет назад

      +Clint Ryan In order to make the video quicker (you don't want to wait for me to type my examples), I wrote some programmatic, but highly specific, functions to jump around and insert text quickly... (Sorry to show you the man behind the curtain).
      On a daily basis, I currently use `avy-mode` (github.com/abo-abo/avy), and bind something quick to `avy-goto-word-1`
      Another approach is the `iy-go-to-char` (github.com/doitian/iy-go-to-char), where you would bind something easy to use to `iy-go-to-char-key-forward` ... this one is better when you make keyboard macros, and the avy approach is better for overall jumping.
      Hope that helps.

  • @panitanwongse-ammat598
    @panitanwongse-ammat598 9 лет назад

    Which packages you installed that change the theme or the colors of your status bar in the video?
    Great Video!

    • @howardabrams1
      @howardabrams1  9 лет назад

      The theme is Tomorrow (see my configuration here: github.com/howardabrams/dot-files/blob/master/emacs-client.org)
      The Mode line uses the powerline package (see my configuration of that here: github.com/howardabrams/dot-files/blob/master/emacs-mode-line.org)

  • @tatsu0616
    @tatsu0616 9 лет назад

    New user to emacs here, switched to it after watching the handmade hero videos which i highly recommend checking out for anyone trying to learn C++. I have one question about your emacs though. When you enter the minibuffer it shows you a bunch of completions and things like that inside the minubuffer, how do you set your emacs to do that? Keeping all the stuff on one line gets hard to look at after a while. Thanks for the video :D

    • @howardabrams1
      @howardabrams1  9 лет назад

      Two approaches that people take.
      - helm mode puts the options in another buffer window and many people like it as you see most of the options.
      - ido mode (with flx and a vertical mode added) is what you see there. I like that since it doesn't use as much screen estate (both are transient, so the difference is moot).
      The approach in the video takes a wee bit more work than helm, but the code is all on Github.

  • @JamesSagerSC
    @JamesSagerSC 8 лет назад

    thanx!

  • @MoreChannelNoise
    @MoreChannelNoise 9 лет назад +2

    I always preferred it to vim but found it slow to start up etc so I learned vim, now that computers have more memory and are much faster I find emacs usable and have gone back to it.

    • @abiezercoppe8886
      @abiezercoppe8886 8 лет назад +1

      +MoreChannelNoise
      Personally, since I'm basically using GNU Emacs all the time, I open it up once and don't close it. Therefore startup times (though not exactly slow) aren't a real issue.
      If you want to open and close Emacs windows quickly for short editing sessions, you might like to try the Emacs server and emacs-client. Details in the manual ... www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html

  • @Ahabite
    @Ahabite 8 лет назад

    Have you changed keybindings at all -- if so, what would you recommend?
    Thanks for your time and work

    • @howardabrams1
      @howardabrams1  8 лет назад +1

      +Ahabite While everyone has preferences on this subject, I'm not sure what I would recommend as a rule. Some general guide lines:
      * Do you know the VI key-bindings and would rather have "key sequences" instead of "key chords", then check out Spacemacs
      * Do you not know Emacs key-bindings? You may want to start with more modern and consistent approach recommended by ErgoEmacs
      I learned Emacs many years ago and have committed those bindings to finger memory. So I usually add new features with `C-c` and some single letter (those are reserved for the user), or if I do rebind an existing key-binding, it will an improved version of a function, for instance, `C-x C-f` is `ido-find-file` (instead of the regular `find-file`).

    • @Ahabite
      @Ahabite 8 лет назад

      +Howard Abrams Thank you so much for your response - it's really helpful.
      You mentioned the very things I was pondering.
      At this point all that remains is to try it out.
      Thanks again

  • @guillaumesimard4257
    @guillaumesimard4257 10 лет назад

    Will you forgive my superficial questions but: what font are you using ? What is this color theme ?

    • @howardabrams1
      @howardabrams1  10 лет назад

      ***** I'm using the sanityinc's Tomorrow theme, and the font, I believe is normally Adobe's Source Code Pro ... however, the variable width presentation files are done in Helvetica ... I think.

  • @artjohnden
    @artjohnden 7 лет назад

    How did you make your text lightblue and marked with a bluemarker?

  • @MiNombreEsGabo
    @MiNombreEsGabo 9 лет назад +5

    Did you mention you're running a web server within emacs? How can I do that? :D

    • @howardabrams1
      @howardabrams1  9 лет назад +8

      I use the 'impatient-mode' which contains the HTTP server. See this introduction: www.50ply.com/blog/2012/08/13/introducing-impatient-mode/

  • @mathatistics
    @mathatistics 8 лет назад +2

    OMG, you have created really lots of thrust to learn Emacs

  • @howardabrams1
    @howardabrams1  10 лет назад +17

    Everything you see is Emacs. I mean how could I make such a presentation with Keynote driving it? The driver is 'demo-it" (github.com/howardabrams/demo-it), and I've made it into a library that you can use to make your own demonstrations (I find I do similar things at the end of every sprint retrospective).
    Prettifying the org mode text on the left side of the screen was done using org-tree-slide.

    • @22lordnik22
      @22lordnik22 7 лет назад +4

      Did you record also with emacs ? xD

    • @howardabrams1
      @howardabrams1  7 лет назад +16

      Yes. Using a package called demo-it.

  • @daburx
    @daburx 8 лет назад

    Hi I have been at this for 2 weeks in ReSt mode trying to google how you switched around your table values (in org mode) and how you made the table auto-correct indentation. l understand you did it in Org Mode, but what were your commands then?
    Did you add functions that would handle that?
    Are they preset?
    How on earth do l get emacs rest-mode to autofill to the end of the title?
    please & thank you so much

    • @howardabrams1
      @howardabrams1  8 лет назад

      org-mode automatically recognizes tables with the initial | character. Hitting the TAB key to jump from column to column automatically will re-format the table to align the columns. Does that explain it?
      Typing meta and the left or right arrow keys will move the column left or right (is that what you meant by "switched around your table values"?)
      Regarding the question "rest-mode to autofile to the end of title" ... are you using ob-http (github.com/zweifisch/ob-http) or ob-restclient (github.com/alf/ob-restclient.el) for restclient (github.com/pashky/restclient.el)?

    • @daburx
      @daburx 8 лет назад

      That does not work. When l hit TAB in org-mode the echo area says "Use C-c ' to edit table.el tables".
      YES! Thank you for explaining how to switch col values.
      Well, l was trying to auto-complete a header section with * or + or = in the rest-mode. l found out that you need to have more headers in order to get different levels. When l was testing it out with one header it only allowed for 2 types of headers, but l got more when l added more headers.
      Thank you for answering my questions!
      l guess my last question is still how to get the org-mode to fix the table value?

    • @howardabrams1
      @howardabrams1  8 лет назад

      Danielle Chaung In a table, try M-x org-cycle ...

  • @RIHEN234
    @RIHEN234 9 лет назад

    you are running emacs in terminal mode? what theme has affected your status bars? how much time will it take to get accustomed to emacs after using 2 years of vim?

    • @howardabrams1
      @howardabrams1  9 лет назад +1

      I'm actually using a GUI version of Emacs on the Mac... but in full-screen mode. This allows me to display inlined graphics images and font sizes, etc. Most themes may adjust those.
      As far as how much work it will take to customize Emacs? Hard to say. I've been adding and removing things to my Emacs for decades, and my customization files reflect that: github.com/howardabrams/dot-files
      Perhaps begin with my Getting Started with Emacs guide: www.howardism.org/Technical/Emacs/getting-started.html
      As a VIm user, you may feel more comfortable after installing Powerline and Evil mode.

    • @seanallred
      @seanallred 9 лет назад

      Just a note: I generally use different themes for when I'm using a window system as opposed to when I'm not. Thankfully, elisp makes this pretty straightforward: `(when window-system …)`

  • @walter0bz
    @walter0bz 9 лет назад

    emacs is great, but I wish elisp was a lisp-1 with some other tweaks. (fun callable objects etc)

  • @ObserverZero
    @ObserverZero 8 лет назад +1

    Hey, dude :) I tried to find this question in the comments here, but I'm either blind, stupid or impatient, so I'll ask:
    How did you do the trick with the function character? :)
    (thx for great vid)

    • @howardabrams1
      @howardabrams1  8 лет назад

      +Observer Zero If you check out my .emacs files for JavaScript here: github.com/howardabrams/dot-files/blob/master/emacs-javascript.org
      You'll notice a bit of Emacs Lisp that does it. With the later versions of Emacs, there is an even simpler approach, that still works.

    • @ObserverZero
      @ObserverZero 8 лет назад

      Thanks! This just looks very very interesting. I will be installing a bunch of these! Thank you for the video, dude. I will be looking into your others :) nice day to you.

  • @timmellis5038
    @timmellis5038 8 лет назад

    How did you open that scratch editor at 3:24?

    • @howardabrams1
      @howardabrams1  8 лет назад

      To make this demonstration go quickly without watching me fat-finger commands, I put together a simple Emacs Lisp package that allows me to string Emacs functions together, so that hitting a single key executes the next function in the list.
      That said, I often need to pull up either an eshell or scratch buffer in a side window, that I did write a function for that. For an example, check out github.com/howardabrams/dot-files/blob/master/emacs-eshell.org#shell-here

  • @CmdrStukov
    @CmdrStukov 7 лет назад +2

    Absolutely lost it when I saw those 5 cursors.

  • @daburx
    @daburx 8 лет назад

    What is your advice on getting on your level at emacs?

    • @howardabrams1
      @howardabrams1  8 лет назад +1

      Do what you're doing ... that is, try new things while still getting good use out of your tool. When you are ready to level up, check out sachachua.com/blog/2014/06/read-lisp-tweak-emacs-beginner-14-try-emacs-lisp/ When it comes to getting problems solved, you might want to either post questions to Stack Overflow or drop me questions on my website: www.howardism.org

    • @daburx
      @daburx 8 лет назад

      Awesome advice! Thank you! l will. Also, your website has great content!

  • @OthmanAlikhan
    @OthmanAlikhan 7 лет назад

    Thanks for the video =)

  • @sasuke2910
    @sasuke2910 8 лет назад +1

    What's the extension you're using to automatically shorten function to *f*?

    • @howardabrams1
      @howardabrams1  8 лет назад +3

      +Jeru Sanders Check out the source code here: github.com/howardabrams/dot-files/blob/master/emacs-javascript.org

  • @PAFAGENIUS
    @PAFAGENIUS 9 лет назад +5

    Off-topic:
    What is Pinkie Pie doing in the presentation?

    • @thegoodhen
      @thegoodhen 9 лет назад +3

      pafagenius Me: Pfft... Vim is soooo much better, why should I even learn Em- Ooooh, Pinkie! :3 :3 Okay, I'm sold.

  • @VulcanOnWheels
    @VulcanOnWheels 7 лет назад +2

    Nice video, but I keep hearing a loud tap.

    • @howardabrams1
      @howardabrams1  7 лет назад +3

      Yeah, that would be my mechanical Kinesis.

  • @sonyj87
    @sonyj87 9 лет назад

    Is it better than i3

    • @howardabrams1
      @howardabrams1  9 лет назад

      As sniperbro997 said, i3 is a window manager (I prefer ratpoison), however, with all the features and interfaces to other applications, one could stay within the world of Emacs the entire time. I often do...at least for long periods of time. For my virtual machines, I use Emacs as an editor, but in full screen and don't bother with a window manager: www.howardism.org/Technical/Emacs/new-window-manager.html

  • @consistent1
    @consistent1 9 лет назад

    The "Online Emacs Tutorials" URL is -
    ruclips.net/video/MRYzPWnk2mE/видео.html
    (the '=' was encoded as %3D).
    Great intro!
    BTW, Org mode (and the butterfly function) rule! :)
    Thanks a bunch.

    • @howardabrams1
      @howardabrams1  9 лет назад

      I've updated the links. Thanks for the catch.

  • @FlashManinSpace
    @FlashManinSpace 8 лет назад

    Save your pinkie and get Evil mode for Emacs :p

  • @SebastianPappG
    @SebastianPappG 8 лет назад +2

    I am curious why emacs has more demand and usage than atom io, sublime text and notepad++ ?

    • @howardabrams1
      @howardabrams1  8 лет назад +2

      Are you just trolling? ;-)
      Emacs isn't for every one. It requires a bit of learning to get the most out of it, but it has a lot of benefit if you want to craft your editor (see this essay: howardism.org/Technical/Emacs/why-emacs.html).
      The appeal becomes more apparent when you realize that not everything has to be simple, see this essay: www.wired.com/2015/02/on-the-joy-of-mastery

    • @SebastianPappG
      @SebastianPappG 8 лет назад

      thanks for your feedback, No I am not trolling...is the first day of my life hearing about this one...and I am in programming field for about 7 years...is this the best editor text to have in 2016 ??? I am using Atom io and sublime text right now...is worth the switch ?

    • @hajovonta
      @hajovonta 8 лет назад

      yes, it is.

    • @SebastianPappG
      @SebastianPappG 8 лет назад

      I fall in love with webstorm IDE, and sometimes using atom io text editor and sublime text 3 as well.

  • @MC4IOSgamer
    @MC4IOSgamer 8 лет назад

    I have emacs installed but not matter what I cannot get anything to actually type into the window

    • @howardabrams1
      @howardabrams1  8 лет назад

      +FaLL_Nemesis00 Perhaps you want to put the question with more context on Stack Overflow?

    • @MC4IOSgamer
      @MC4IOSgamer 8 лет назад

      +Howard Abrams for instance, I can open the window open over. But I cannot enter any code

  • @Adiounys
    @Adiounys 8 лет назад

    16:44 my god! Why so much redundancy? Why to put only a single return in new line?
    Why to even write "else" after conditional block with return statement?
    I would write something like this :P
    if(n == 2 || b == 3) return true;
    if(n < 2 || b % 2 == 0) return false;
    l = parseInt(Math.sqrt(n));
    for(var i = 4; i < l; i++) {
    if(n % i < 1) return false;}
    return true;

    • @howardabrams1
      @howardabrams1  8 лет назад +5

      I just need a lengthy example with a bit of nested blocks of code so that I could demonstrate this feature in Emacs, and this seemed like something easy for people to parse without getting distracted with what the code was doing. :-)

  • @bogdanb78
    @bogdanb78 8 лет назад +4

    Are you an alien? :))

  • @jonkiparsky7369
    @jonkiparsky7369 7 лет назад

    I don't understand why you'd throw away the caps lock key - what, you never use named constants? - for half a control key. Real keyboards have control and alt on the bottom row, left and right of the space bar, where they belong. If for some reason you have to use a mac keyboard, while you're waiting for a real keyboard to arrive you can remap command and option to control and alt, respectively, and you're set. (map the silly left-hand control key that apple gives you to command, so you can use it to reload tabs in your browser and stuff like that)

    • @Palacinka13
      @Palacinka13 7 лет назад +2

      try swapping caps and ctrl. i've loved it from the moment i tried it. it's just more natural for me to rest my pinky on caps, than on ctr, and considering how often i press ctrl compared to caps i'd rather have my finger already there instead of bending it into an uncomfortable position every time i want to press it.
      and why exactly do ctrl and alt belong in the bottom row? because casuls with baby hands like typing in allcaps more then pressing ctrl.

  • @Broadsmile1987
    @Broadsmile1987 9 лет назад

    To avoid name collisions you add "my/" prefix? What if others use the same technique? Now you still risk name collisions, LOL!

    • @alterverwalter9299
      @alterverwalter9299 9 лет назад +3

      Marek Smoliński no, because developers will use my/ only for their own functions. If someone decides to publish his function to the public, he will use his pseudonyme or real name as namespace because he wants to be recognized. Did you ever see a book author write " - by me" on the book shelf?
      In the rare occasion that someone is called "my" or his initials are M. Y., then you yourself still have the option to edit the function mr. M. Y. published and change the namespace.

    • @Broadsmile1987
      @Broadsmile1987 9 лет назад

      Al Jay OK, thanks for your explanation. :)

  • @JeffreyGroves
    @JeffreyGroves 8 лет назад +2

    You glossed over the one item that I was trying to figure out. Meta. You just used it without explaining how to do it. :-(

    • @howardabrams1
      @howardabrams1  8 лет назад +2

      Ah ... "Meta" is one of those old terms that I should have translated. When Emacs was developed, many of the keyboards had lots of "modifier" keys (see the Space Cadet keyboard en.wikipedia.org/wiki/Space-cadet_keyboard). This included Shift and Control (which most keyboards still have), but also, Meta, Super, and Hyper. They just specified a different key code that the computer could interpret.
      Since most keyboards now have Control, Option and the Windows/Apple key, we often use the Option key for those Meta-bindings that Emacs was built to expect.

    • @JeffreyGroves
      @JeffreyGroves 8 лет назад +1

      Yikes! I thought that I'd seen some intense keyboard layouts in my time, but this space-cadet layout is over the top!
      Thanks for the explanation. I believe that I've figured-out why the option/alt key wasn't working for me using iTerm2 on a Mac. Perhaps I'll be able to finally figure out how to exit out of emacs without having to "kill -9" it :-)

    • @JeffreyGroves
      @JeffreyGroves 8 лет назад

      I love this error message when I change the options key behavior in iterm2:
      puu.sh/paNu7/d8f965ac68.png

    • @howardabrams1
      @howardabrams1  8 лет назад

      Yeah, look at the Space Cadet prior to looking at newer keyboards like www.keyboard.io ;-)
      Hard to debug configuration under RUclips comments, but perhaps post your iTerm2 profile for the Keys section on something like Stack Overflow. One option that may get you going is to select the Options to be Escape. I believe the history was once simple keyboards with only a Control and no other modifiers became popular, the Escape key became a "Prefix" modifier to replace the need for a Meta. So to launch a function by name, you could press Meta-x or Escape and then "x". The iTerm trick sends the Escape signal to Emacs, which can pick that up as if it were an old system, but still allow you to move forward by words with just the Option key.