Tags: beginner

RSS - Atom - Subscribe via email

Getting started with Emacs? Empty your cup

Posted: - Modified: | emacs

Frustrated with Emacs because you're just not as productive as you are with your old editor? Copying configuration snippets from the Web in order to force it to work like what you're used to, but running into problems with conflicting code or obscure error messages?

Here's something I've realized. To learn Emacs well, try emptying your cup. This is the story as told on the C2 wiki:

A master was trying to explain something to a student. Now this student was not a brand new student, but a senior student who had learned many things. He had knowledge and experience aplenty to draw upon. But each time the master tried to explain something new to the student, the student kept trying to hold it up against his own notions of the way the world is and how it ought be, and he was unable to see the lessons in what the master was trying to teach him.

Finally, the master poured a full serving of tea into his own cup, and into the cup of the student. Then he told the student he wanted to give to him some of the tea from his own cup. He began pouring tea from his cup into the student's cup, but the student's cup was already full, and all the tea from the master's cup spilled out over the cup onto the surface below.

The student said, "Master, you can't pour anything into my cup until I empty it to make room for what you are trying to give me.", and the master replied "Yes I know." "And I can't give you any new thoughts or ideas or perspectives on life's lessons until you clear out some thoughts that are already teeming in your mind to make room for what I have to teach you." Then the master paused for a brief moment, meeting the student's eyes with his own knowing look and calmly but sternly said: " If you truly seek understanding, then first, empty your cup!"

The student pondered for a moment with a look of absolute bewilderment. Then a look of enlightenment came over him, followed by a smile, and a look of receptiveness. The master started to explain again, and this time the student saw what the master was trying to say.

2015-01-13 Emacs and the beginner's mind -- index card #emacs #beginner

It's natural to get frustrated when you expect something should work a particular way and it doesn't, or you're used to working quickly and you have to slow down. "Why can't I use Ctrl-X to cut? Why is it called 'killing text'? Why doesn't it work like __?" I know what that's like; even after years of using Emacs, I sometimes still struggle to configure things that people who use other editors take for granted.

Some differences seem easy to address with code you can get on the Net. But if you do that – if you give in to your initial discomfort – you may find yourself fighting more and more of Emacs as you go along, without the skills to properly understand or integrate your changes.

It's better, I think, to approach Emacs as a beginner. Empty your cup and let go of your expectations. Pretend this is your first editor. Go through the tutorial. Start with the basics. Try doing things the Emacs way.

In the beginning, you might feel agonizingly slow. You may need to do this after hours instead of when everyone is counting on you to deliver a time-sensitive project. It's okay to open up Vim or your previous editor so that you can get something done, while you keep learning Emacs in the background. It's okay to use the menu and the toolbar while you get the hang of the most common keyboard shortcuts.

As you become familiar with the system, you learn how to work within it. Slowly configure things. Get used to the changes before you introduce more. Eventually, you'll understand the configuration snippets that other people post. Reading Emacs Lisp is the first step to being able to modify Emacs Lisp, and from there you can learn how to write Emacs Lisp. But you don't have to start knowing that right away. Many people use Emacs for years before writing Emacs Lisp, and many people use it without customizing it.

But if you start learning Emacs by getting frustrated with it and trying to force it to be what you want, you might never get to the point where you can enjoy it and work with it. Be a beginner. Give yourself time and space to learn, even if you feel you're learning slowly. Then, as you improve your understanding and skills, you'll learn how to coax Emacs to fit you even better.

View or add comments (Disqus), or e-mail me at sacha@sachachua.com

Beginner web dev tip: Use Inspect Element to learn more about HTML and CSS on a page

Posted: - Modified: | geek

One of the neat things about learning web development is that the Web is full of examples you can learn from. You can use your browser's View Page Source or View Source command (available from the right-click menu in Google Chrome, Mozilla Firefox, or Internet Explorer). An even better way to explore, though, is to use the Inspect Element action from the right-click menu in those browsers. If you right-click on the item you want to learn more about, you'll be able to see the HTML and the current CSS applied to the page.

I use Google Chrome most of the time, so I'll show you Inspect Element screen in that browser. Here we're looking at the button on CSS-Tricks.com:

2014-11-10 15_37_06-CSS-Tricks.png

You'll see the HTML on the left side and the CSS on the right. You can check or uncheck different CSS rules, and you can double-click on things to edit them. Check out the right-click menus for even more options.

Sometimes you may need to click on a different element in order to see the CSS rules that are relevant to what you're curious about. As you hover over different elements, you'll see them highlighted on the page.

If you click on the Console tab, you can experiment with Javascript too. If you want to view both the inspect element information and the Javascript console at the same time, click on the icon that looks like a > on the right side. This is particularly handy if you have a large screen.

Hope that helps!

View or add comments (Disqus), or e-mail me at sacha@sachachua.com

How to update the Org 7 that comes with Emacs to Org 8 (more configuration! better exports!)

| emacs, org
Update 2014-05-12: Simplified thanks to Sebastian's note that Org 8 is available in the built-in package repository, yay!

The Org Mode included in Emacs 24 is version 7. Version 8 has lots of new configuration variables and the exporting mechanism has been rewritten. However, it needs to be installed in an Emacs that has not yet loaded any Org code or files. Here's how you can upgrade your Org:

  1. Start Emacs with emacs -q. This skips your personal configuration.
  2. You will need an Internet connection for this step. Type M-x package-install, and type in org. This will install the latest version of Org from the built-in package repository.
  3. Edit your ~/.emacs.d/init.el (or ~/.emacs, if you're using that instead). Add the following code to the beginning of the file:
    (package-initialize)
    (setq package-enable-at-startup nil)
    

    This will load the installed packages when you start Emacs, overriding the buit-in Org 7 with the Org 8 version that you installed.

    Advanced note: If you've downloaded Emacs Lisp code that should override code already installed through packages, you need to change this to (package-initialize nil) instead, and add (package-initialize t) after your load-path settings.

  4. Check your configuration for references to the older version of Org. In particular, look for any configuration related to exporting (ex: (require 'org-html)). You can change those lines to their Org 8 equivalents (ex: (require 'ox-html)), but it's probably easier to just comment them out for now. You can comment out lines by adding ; to the beginning.
  5. Save your init.el and restart Emacs (this time, without the -q option). M-x org-version should now start with Org-mode version 8.
  6. Review your Emacs configuration for any changes that you will need to make. You can ask the Org Mode mailing list for help if you get stuck.

Good luck!

View or add comments (Disqus), or e-mail me at sacha@sachachua.com

Emacs beginner resources

Posted: - Modified: | -Uncategorized, emacs
Sometimes it's hard to remember what it's like to be a beginner, so I'm experimenting with asking other people to help me with this. =) I asked one of my assistants to look for beginner tutorials for Emacs and evaluate them based on whether they were interesting and easy to understand. Here's what she put together! – Sacha

Emacs #1 – Getting Started and Playing Games by jekor
Probably the most helpful Emacs tutorial series on YouTube. Goes beyond the “what to type” how-tos that other tutorials seem bent on explaining over and over. Emphasizes games and how they help users familiarize themselves with the all-keyboard controls. 5/5 stars

Org-mode beginning at the basics
What it says on the tin. Essential resource for those who are new to Emacs and org-mode. Provides steps on how to organize workflow using org-mode written in a simple, nontechnical, writing style. 5/5 stars

Xah Emacs Tutorial
Though the landing page says that the tutorial is for scientists and programmers, beginners need not be intimidated! Xah Emacs Tutorial is very noob-friendly. Topics are grouped under categories (e.g. Quick Tips, Productivity, Editing Tricks, etc.) Presentation is a bit wonky though. 4.5/5 stars

RT 2011: Screencast 01 – emacs keyboard introduction by Kurt Scwehr
Keyboard instruction on Emacs from the University of New Hampshire. Very informative and also presents some of the essential keystrokes that beginners need to memorize to make the most out of the program. But at 25 mins, I think that the video might be too long for some people. 4/5 stars

Emacs Wiki
Nothing beats the original- or in this case, the official- wiki. Covers all aspects of Emacs operation. My only gripe with this wiki is that the groupings and presentation are not exactly user-friendly (links are all over the place!), and it might take a bit of time for visitors to find what they are looking for. 4/5 stars

Mastering Emacs: Beginner's Guide to Emacs
The whole website itself is one big tutorial. Topics can be wide-ranging but it has a specific category for beginners.
whole website itself is one big tutorial. Looks, feels, and reads more like a personal blog rather than a straightforward wiki/tutorial. 4/5 stars

Jessica Hamrick's Absolute Beginner's Guide to Emacs
Clear and concise. Primarily focused on providing knowledge to people who are not used to text-based coding environments. It covers a lot of basic stuff, but does not really go in-depth into the topics. Perfect for “absolute beginners” but not much else. 3/5 stars

Jim Menard's Emacs Tips and Tricks
Personal tips and tricks from a dedicated Emacs user since 1981. Not exactly beginner level, but there's a helpful trove of knowledge here. Some chapters are incomplete. 3/5 stars

Emacs Redux
Not a tutorial, but still an excellent resource for those who want to be on the Emacs update loop. Constantly updated and maintained by an Emacs buff who is currently working on a few Emacs related projects. 3/5 stars

Jeremy Zawodny's Emacs Beginner's HOWTO
Lots of helpful information, but is woefully not updated for the past decade or so. 2/5 stars

This list was put together by Marie Alexis Miravite. In addition, you might want to check out how Bernt Hansen uses Org, which is also pretty cool.
View or add comments (Disqus), or e-mail me at sacha@sachachua.com

Getting started with blogging when no one’s reading

Posted: - Modified: | blogging, writing

“So I’m planning to start a blog… How do I do it? How do I build an audience?”

It’s okay. Don’t worry. Write anyway.

Write notes for yourself, because writing can help you think and remember. Write about what you’re learning. Write about your answers to other people’s questions. Write about your own questions, and write about the answers you find.

At some point—and earlier than you think you’re ready—make it easy for people to come across your blog. Add it to your e-mail signature. Add it to your social media profiles. Let people find you, read you, and learn more about you.

Look for more questions to explore. Share your notes on your blog. Answer them where you found the question, too, and share a link. Soon you’ll find yourself saying in conversations, “Oh yeah! I wrote about that recently and…”

Read blogs, news, books, whatever you enjoy. Blog your questions, your thoughts, your lessons learned. Name-drop liberally: link to the person who wrote the post you’re thinking about, and maybe they’ll follow that back to find you. (Lots of people regularly search for their names, and many bloggers look at their analytics to see incoming links.) Comment on other people’s blogs, too – share what you’re learning from them and what questions you may have.

You find your community, person by person. But you can start by building your blog for yourself, this ever-growing accumulation of things you’re learning and things you’re curious about, this time machine that’s going to be an amazing resource when it’s 2023 and you’re wondering what you were like ten years ago. The conversations are icing on the cake.

My early blog posts are almost unintelligible. That’s because they were my class notes and computer notes, back when I was trying to figure out how to get a text editing program to publish web pages and maybe this newfangled idea of a “web log.” Your first blog posts don’t have to be ready for the New York Times. Just start, and don’t worry if no one’s reading. You can get plenty of value out of writing even on your own. (But post in public anyway, because the conversations are a lot of fun and you’ll learn a lot from people’s questions and insights.) Enjoy!

You might also like this: Six Steps to Sharing

View or add comments (Disqus), or e-mail me at sacha@sachachua.com