|
From: | Tyler Smith |
Subject: | Re: elisp syntax for .emacs code beginners help (inserting "" marks example) |
Date: | Sat, 05 Sep 2009 12:37:50 -0400 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
rpd wrote:
Everything between double quotes gets inserted. This means that if you want to insert a double quote, you need to escape it. If you don't emacs interprets the second quote as the end of the string to be inserted, and the third quote as the beginning of another quote.Then I wanted to insert whitespace between the quotation marks. Again I cannot find documentation for doing this but this code: (insert "[Event \" \ \ \ \"]\n") does output spaces between the quotation marks ie it outputs:
Spaces are not special. As you've already seen, any space occurring between two quotes gets inserted. Escaping has no effect on spaces, except to make your code uglier. So you could use:
(insert "[Event \" \"]\n")
Most Emacs distributions come bundled with the very useful Introduction to emacs lisp as part of the info system. Ctrl-h i opens the info browser, and you'll find the Intro to emacs lisp listed under the heading Emacs. It's a very gentle introduction to elisp programming. If you already know how to program in elisp, then the documentation for escape syntax is found in the node Character type in the elisp manual. You can get there by evaluating (info "(elisp)Character type"), or just by browsing through the elisp manual in the info system.[Event " "] (using space-backslash escaped syntax) Is there clear documentation in any lisp/elisp or emacs help manuals anywhere to help one learn this syntax?
HTH, Tyler
[Prev in Thread] | Current Thread | [Next in Thread] |